History

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.

Paul Durrant committed 8 years ago

Commit 3ad08761 parent 4bf2cc97 files · +291 −21Browse files

Showing the changes to include/uapi (1 of 7 files). Show all

Unified · Split

include/uapi/xen/privcmd.h+11−0
@@ -89,6 +89,15 @@ struct privcmd_dm_op { · 88 unmodified lines
8989 const struct privcmd_dm_op_buf __user *ubufs;
9090 };
9191
92+struct privcmd_mmap_resource {
93+ domid_t dom;
94+ __u32 type;
95+ __u32 id;
96+ __u32 idx;
97+ __u64 num;
98+ __u64 addr;
99+};
100+
92101 /*
93102 * @cmd: IOCTL_PRIVCMD_HYPERCALL
94103 * @arg: &privcmd_hypercall_t
@@ -114,5 +123,7 @@ struct privcmd_dm_op { · 19 unmodified lines
114123 _IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op))
115124 #define IOCTL_PRIVCMD_RESTRICT \
116125 _IOC(_IOC_NONE, 'P', 6, sizeof(domid_t))
126+#define IOCTL_PRIVCMD_MMAP_RESOURCE \
127+ _IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource))
117128
118129 #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t