xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 9 May 2018 13:16:12 +0000 (14:16 +0100)
committerJuergen Gross <jgross@suse.com>
Mon, 14 May 2018 13:25:37 +0000 (15:25 +0200)
commit3ad0876554cafa368f574d4d408468510543e9ff
tree7fade80924630151265270e68355d3f68b029bad
parent4bf2cc9645599382e34b7d0cbe5a13d0de98194e
xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE

My recent Xen patch series introduces a new HYPERVISOR_memory_op to
support direct priv-mapping of certain guest resources (such as ioreq
pages, used by emulators) by a tools domain, rather than having to access
such resources via the guest P2M.

This patch adds the necessary infrastructure to the privcmd driver and
Xen MMU code to support direct resource mapping.

NOTE: The adjustment in the MMU code is partially cosmetic. Xen will now
      allow a PV tools domain to map guest pages either by GFN or MFN, thus
      the term 'mfn' has been swapped for 'pfn' in the lower layers of the
      remap code.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/arm/xen/enlighten.c
arch/x86/xen/mmu.c
drivers/xen/privcmd.c
include/uapi/xen/privcmd.h
include/xen/interface/memory.h
include/xen/interface/xen.h
include/xen/xen-ops.h