diff options
author | Paul Durrant | 2018-05-15 18:40:53 +0200 |
---|---|---|
committer | Stefano Stabellini | 2018-05-31 21:04:55 +0200 |
commit | d3c49ebbe26b48615e14b8baa88a59cd33761ea6 (patch) | |
tree | 6870f8466e12ac41d0999562fdd997bc00e3f995 /include/hw/xen | |
parent | xen/hvm: correct reporting of modified memory under physmap during migration (diff) | |
download | qemu-d3c49ebbe26b48615e14b8baa88a59cd33761ea6.tar.gz qemu-d3c49ebbe26b48615e14b8baa88a59cd33761ea6.tar.xz qemu-d3c49ebbe26b48615e14b8baa88a59cd33761ea6.zip |
xen-hvm: try to use xenforeignmemory_map_resource() to map ioreq pages
Xen 4.11 has a new API to directly map guest resources. Among the resources
that can be mapped using this API are ioreq pages.
This patch modifies QEMU to attempt to use the new API should it exist,
falling back to the previous mechanism if it is unavailable.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'include/hw/xen')
-rw-r--r-- | include/hw/xen/xen_common.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h index bbf207dcef..93f631e5bf 100644 --- a/include/hw/xen/xen_common.h +++ b/include/hw/xen/xen_common.h @@ -119,6 +119,22 @@ static inline int xendevicemodel_pin_memory_cacheattr( return xc_domain_pin_memory_cacheattr(xen_xc, domid, start, end, type); } +typedef void xenforeignmemory_resource_handle; + +#define XENMEM_resource_ioreq_server 0 + +#define XENMEM_resource_ioreq_server_frame_bufioreq 0 +#define XENMEM_resource_ioreq_server_frame_ioreq(n) (1 + (n)) + +static inline xenforeignmemory_resource_handle *xenforeignmemory_map_resource( + xenforeignmemory_handle *fmem, domid_t domid, unsigned int type, + unsigned int id, unsigned long frame, unsigned long nr_frames, + void **paddr, int prot, int flags) +{ + errno = EOPNOTSUPP; + return NULL; +} + #endif /* CONFIG_XEN_CTRL_INTERFACE_VERSION < 41100 */ #if CONFIG_XEN_CTRL_INTERFACE_VERSION < 41000 |