qemu/include/hw/xen
David Woodhouse c412ba47b2 hw/xen: Add gnttab operations to allow redirection to internal emulation
Move the existing code using libxengnttab to xen-operations.c and allow
the operations to be redirected so that we can add emulation of grant
table mapping for backend drivers.

In emulation, mapping more than one grant ref to be virtually contiguous
would be fairly difficult. The best way to do it might be to make the
ram_block mappings actually backed by a file (shmem or a deleted file,
perhaps) so that we can have multiple *shared* mappings of it. But that
would be fairly intrusive.

Making the backend drivers cope with page *lists* instead of expecting
the mapping to be contiguous is also non-trivial, since some structures
would actually *cross* page boundaries (e.g. the 32-bit blkif responses
which are 12 bytes).

So for now, we'll support only single-page mappings in emulation. Add a
XEN_GNTTAB_OP_FEATURE_MAP_MULTIPLE flag to indicate that the native Xen
implementation *does* support multi-page maps, and a helper function to
query it.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
2023-03-07 17:04:30 +00:00
..
interface include: import Xen public headers to hw/xen/interface 2023-03-01 08:22:49 +00:00
start_info.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
xen_backend_ops.h hw/xen: Add gnttab operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen_common.h hw/xen: Add gnttab operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen_pvdev.h hw/xen: Add evtchn operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen-backend.h xen-bus: reduce scope of backend watch 2020-10-19 16:32:41 +01:00
xen-block.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
xen-bus-helper.h hw/xen: use G_GNUC_PRINTF/SCANF for various functions 2023-01-11 10:44:33 +01:00
xen-bus.h hw/xen: Add gnttab operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen-legacy-backend.h hw/xen: Add gnttab operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen-x86.h hw/xen: Split x86-specific declaration from generic hardware ones 2020-09-30 19:11:36 +02:00
xen.h xen: Add XEN_DISABLED mode and make it default 2023-03-01 08:22:49 +00:00