xen/arm: p2m type definitions and changes
xen/arm: Add mem_event domctl and mem_access memop.

Define the handling of XEN_DOMCTL_mem_event_op and the handling of
copy-back data. Also setup the memop handling of XENMEM_access_op
with the required masking of the operation with MEMOP_CMD_MASK.

Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>
tools/libxc: Allocate magic page for mem access on ARM

Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>
xen/arm: Data abort exception (R/W) mem_events.

This patch replaces the stub p2m functions with the actual ones required to
store, set, check and deliver LPAE R/W mem_events. As the LPAE PTE lacks
available bits to store the p2m_access_t bits, we use a separate radix
tree (mem_access_settings) to store the permissions with the key being the
gfn.

Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>
---
v2:
    Add definitions of data abort data fetch status codes (enum dabt_dfsc)
      and only call p2m_mem_access_check for traps caused by permission violations.

    Only call p2m_write_pte in p2m_lookup if the PTE permission actually changed.

    Properly save settings in the Radix tree and pause the VCPU with
      mem_event_vcpu_pause.
xen/arm: Instruction prefetch abort (X) mem_event handling

Add missing structure definition for iabt and update the trap handling
mechanism to only inject the exception if the mem_access checker
decides to do so.

Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>
---
v2: Add definition for instruction abort instruction fetch status codes (enum iabt_ifsc)
       and only call p2m_mem_access_check for traps triggered for permission violations.
tools/tests: Enable xen-access on ARM

On ARM the guest memory doesn't start from 0, thus we include the
required headers and define GUEST_RAM_BASE_PFN in both architecture
to be passed to mem_access as the starting pfn.
We also define the ARM specific test_and_set_bit function.

Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>