qemu/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
..
Kconfig xen: add CONFIG_XEN_BUS and CONFIG_XEN_EMU options for Xen emulation 2023-03-01 08:22:49 +00:00
meson.build hw/xen: Add evtchn operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
xen-backend.c xen-bus: reduce scope of backend watch 2020-10-19 16:32:41 +01:00
xen-bus-helper.c hw: Do not include hw/sysbus.h if it is not necessary 2021-05-02 17:24:50 +02:00
xen-bus.c hw/xen: Add gnttab operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen-host-pci-device.c xen: Use ERRP_GUARD() 2020-07-10 15:18:09 +02:00
xen-host-pci-device.h
xen-legacy-backend.c hw/xen: Add gnttab operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen-operations.c hw/xen: Add gnttab operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen_devconfig.c Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
xen_pt.c xen/pt: reserve PCI slot 2 for Intel igd-passthru 2023-03-06 11:27:37 +00:00
xen_pt.h xen/pt: reserve PCI slot 2 for Intel igd-passthru 2023-03-06 11:27:37 +00:00
xen_pt_config_init.c hw/xen/xen_pt: fix uninitialized variable 2023-03-06 11:27:37 +00:00
xen_pt_graphics.c hw/xen/xen_pt: Resolve igd_passthrough_isa_bridge_create() indirection 2022-05-12 12:07:06 +02:00
xen_pt_load_rom.c pci: add romsize property 2021-02-05 08:52:58 -05:00
xen_pt_msi.c hw/xen: Don't use '#' flag of printf format 2020-12-13 17:02:42 +01:00
xen_pt_stub.c xen/pt: reserve PCI slot 2 for Intel igd-passthru 2023-03-06 11:27:37 +00:00
xen_pvdev.c hw/xen: Add gnttab operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00