[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/27] hw/xen: Only advertise ring-page-order for xen-block if gnt
From: |
David Woodhouse |
Subject: |
[PULL 19/27] hw/xen: Only advertise ring-page-order for xen-block if gnttab supports it |
Date: |
Tue, 7 Mar 2023 18:26:59 +0000 |
From: David Woodhouse <dwmw@amazon.co.uk>
Whem emulating Xen, multi-page grants are distinctly non-trivial and we
have elected not to support them for the time being. Don't advertise
them to the guest.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
---
hw/block/xen-block.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 87299615e3..f5a744589d 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -83,7 +83,8 @@ static void xen_block_connect(XenDevice *xendev, Error **errp)
g_free(ring_ref);
return;
}
- } else if (order <= blockdev->props.max_ring_page_order) {
+ } else if (qemu_xen_gnttab_can_map_multi() &&
+ order <= blockdev->props.max_ring_page_order) {
unsigned int i;
nr_ring_ref = 1 << order;
@@ -255,8 +256,12 @@ static void xen_block_realize(XenDevice *xendev, Error
**errp)
}
xen_device_backend_printf(xendev, "feature-flush-cache", "%u", 1);
- xen_device_backend_printf(xendev, "max-ring-page-order", "%u",
- blockdev->props.max_ring_page_order);
+
+ if (qemu_xen_gnttab_can_map_multi()) {
+ xen_device_backend_printf(xendev, "max-ring-page-order", "%u",
+ blockdev->props.max_ring_page_order);
+ }
+
xen_device_backend_printf(xendev, "info", "%u", blockdev->info);
xen_device_frontend_printf(xendev, "virtual-device", "%lu",
--
2.39.0
- [PULL 22/27] hw/xen: Add emulated implementation of XenStore operations, (continued)
- [PULL 22/27] hw/xen: Add emulated implementation of XenStore operations, David Woodhouse, 2023/03/07
- [PULL 01/27] hw/xen: Add xenstore wire implementation and implementation stubs, David Woodhouse, 2023/03/07
- [PULL 10/27] hw/xen: Add gnttab operations to allow redirection to internal emulation, David Woodhouse, 2023/03/07
- [PULL 05/27] hw/xen: Watches on XenStore transactions, David Woodhouse, 2023/03/07
- [PULL 02/27] hw/xen: Add basic XenStore tree walk and write/read/directory support, David Woodhouse, 2023/03/07
- [PULL 11/27] hw/xen: Pass grant ref to gnttab unmap operation, David Woodhouse, 2023/03/07
- [PULL 13/27] hw/xen: Add xenstore operations to allow redirection to internal emulation, David Woodhouse, 2023/03/07
- [PULL 03/27] hw/xen: Implement XenStore watches, David Woodhouse, 2023/03/07
- [PULL 09/27] hw/xen: Add evtchn operations to allow redirection to internal emulation, David Woodhouse, 2023/03/07
- [PULL 20/27] hw/xen: Hook up emulated implementation for event channel operations, David Woodhouse, 2023/03/07
- [PULL 19/27] hw/xen: Only advertise ring-page-order for xen-block if gnttab supports it,
David Woodhouse <=
- [PULL 24/27] hw/xen: Implement soft reset for emulated gnttab, David Woodhouse, 2023/03/07
- [PULL 07/27] hw/xen: Implement core serialize/deserialize methods for xenstore_impl, David Woodhouse, 2023/03/07
- [PULL 15/27] hw/xen: Use XEN_PAGE_SIZE in PV backend drivers, David Woodhouse, 2023/03/07
- [PULL 06/27] hw/xen: Implement XenStore permissions, David Woodhouse, 2023/03/07
- [PULL 08/27] hw/xen: Create initial XenStore nodes, David Woodhouse, 2023/03/07
- [PULL 14/27] hw/xen: Move xenstore_store_pv_console_info to xen_console.c, David Woodhouse, 2023/03/07
- [PULL 23/27] hw/xen: Map guest XENSTORE_PFN grant in emulated Xenstore, David Woodhouse, 2023/03/07
- [PULL 04/27] hw/xen: Implement XenStore transactions, David Woodhouse, 2023/03/07
- [PULL 21/27] hw/xen: Add emulated implementation of grant table operations, David Woodhouse, 2023/03/07
- [PULL 12/27] hw/xen: Add foreignmem operations to allow redirection to internal emulation, David Woodhouse, 2023/03/07