mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
04a8f72e87
commit
d3c49ebbe2
4 changed files with 75 additions and 17 deletions
5
configure
vendored
5
configure
vendored
|
@ -2231,12 +2231,17 @@ EOF
|
|||
#undef XC_WANT_COMPAT_DEVICEMODEL_API
|
||||
#define __XEN_TOOLS__
|
||||
#include <xendevicemodel.h>
|
||||
#include <xenforeignmemory.h>
|
||||
int main(void) {
|
||||
xendevicemodel_handle *xd;
|
||||
xenforeignmemory_handle *xfmem;
|
||||
|
||||
xd = xendevicemodel_open(0, 0);
|
||||
xendevicemodel_pin_memory_cacheattr(xd, 0, 0, 0, 0);
|
||||
|
||||
xfmem = xenforeignmemory_open(0, 0);
|
||||
xenforeignmemory_map_resource(xfmem, 0, 0, 0, 0, 0, NULL, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue