diff options
| author | Edgar E. Iglesias <edgar.iglesias@amd.com> | 2024-04-30 10:26:45 +0200 |
|---|---|---|
| committer | Edgar E. Iglesias <edgar.iglesias@amd.com> | 2024-06-09 20:16:14 +0200 |
| commit | 9ecdd4bf08dfe4a37e16b8a8b228575aff641468 (patch) | |
| tree | bd717509502ee1f9866eed25a15033edba8f81f7 /include/hw/xen/xen-hvm-common.h | |
| parent | 49a7202979e49c7c9c02461fce497a868ef6b143 (diff) | |
| download | focaccia-qemu-9ecdd4bf08dfe4a37e16b8a8b228575aff641468.tar.gz focaccia-qemu-9ecdd4bf08dfe4a37e16b8a8b228575aff641468.zip | |
xen: mapcache: Add support for grant mappings
Add a second mapcache for grant mappings. The mapcache for grants needs to work with XC_PAGE_SIZE granularity since we can't map larger ranges than what has been granted to us. Like with foreign mappings (xen_memory), machines using grants are expected to initialize the xen_grants MR and map it into their address-map accordingly. CC: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'include/hw/xen/xen-hvm-common.h')
| -rw-r--r-- | include/hw/xen/xen-hvm-common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h index 65a51aac2e..3d796235dc 100644 --- a/include/hw/xen/xen-hvm-common.h +++ b/include/hw/xen/xen-hvm-common.h @@ -16,6 +16,7 @@ #include <xen/hvm/ioreq.h> extern MemoryRegion xen_memory; +extern MemoryRegion xen_grants; extern MemoryListener xen_io_listener; extern DeviceListener xen_device_listener; @@ -29,6 +30,8 @@ extern DeviceListener xen_device_listener; do { } while (0) #endif +#define XEN_GRANT_ADDR_OFF (1ULL << 63) + static inline uint32_t xen_vcpu_eport(shared_iopage_t *shared_page, int i) { return shared_page->vcpu_ioreq[i].vp_eport; |