]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/privcmd: Add IOCTL_PRIVCMD_DM_OP
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 13 Feb 2017 17:03:23 +0000 (17:03 +0000)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 13 Sep 2017 04:37:53 +0000 (21:37 -0700)
commit5ee958b7ad83911a8f6a7bd2ba273e8a161d45c7
treeaf31e195fb4cc8a394fec8500e666cbaab398d73
parent95d02b554669fd2d9b1fbbfe04c53ca7952d4762
xen/privcmd: Add IOCTL_PRIVCMD_DM_OP

Recently a new dm_op[1] hypercall was added to Xen to provide a mechanism
for restricting device emulators (such as QEMU) to a limited set of
hypervisor operations, and being able to audit those operations in the
kernel of the domain in which they run.

This patch adds IOCTL_PRIVCMD_DM_OP as gateway for __HYPERVISOR_dm_op.

NOTE: There is no requirement for user-space code to bounce data through
      locked memory buffers (as with IOCTL_PRIVCMD_HYPERCALL) since
      privcmd has enough information to lock the original buffers
      directly.

[1] http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=524a98c2

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
OraBug: 26662731

(cherry picked from commit ab520be8cd5d56867fc95cfbc34b90880faf1f9d)
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Conflicts:
arch/arm/xen/enlighten.c
arch/arm/xen/hypercall.S
arch/arm64/xen/hypercall.S
        (uek doesn't define HYPERVISOR_vm_assist() for ARM)
        arch/arm/include/asm/xen/hypercall.h
        (Upstream defines HYPERVISOR_dm_op() in
         include/xen/arm/hypercall.h, which uek4 does not have)
arch/arm/include/asm/xen/hypercall.h
arch/arm/xen/enlighten.c
arch/arm/xen/hypercall.S
arch/arm64/xen/hypercall.S
arch/x86/include/asm/xen/hypercall.h
drivers/xen/privcmd.c
include/uapi/xen/privcmd.h
include/xen/interface/hvm/dm_op.h [new file with mode: 0644]
include/xen/interface/xen.h