[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v10 53/59] hw/xen: Automatically add xen-platform PCI device for
From: |
David Woodhouse |
Subject: |
[PATCH v10 53/59] hw/xen: Automatically add xen-platform PCI device for emulated Xen guests |
Date: |
Wed, 1 Feb 2023 14:31:42 +0000 |
From: David Woodhouse <dwmw@amazon.co.uk>
It isn't strictly mandatory but Linux guests at least will only map
their grant tables over the dummy BAR that it provides, and don't have
sufficient wit to map them in any other unused part of their guest
address space. So include it by default for minimal surprise factor.
As I come to document "how to run a Xen guest in QEMU", this means one
fewer thing to tell the user about, according to the mantra of "if it
needs documenting, fix it first, then document what remains".
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
hw/i386/pc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a12a7a67e9..5ec3518b9e 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1313,6 +1313,9 @@ void pc_basic_device_init(struct PCMachineState *pcms,
#ifdef CONFIG_XEN_EMU
if (xen_mode == XEN_EMULATE) {
xen_evtchn_connect_gsis(gsi);
+ if (pcms->bus) {
+ pci_create_simple(pcms->bus, -1, "xen-platform");
+ }
}
#endif
--
2.39.0
- [PATCH v10 00/59] Xen HVM support under KVM, David Woodhouse, 2023/02/01
- [PATCH v10 53/59] hw/xen: Automatically add xen-platform PCI device for emulated Xen guests,
David Woodhouse <=
- [PATCH v10 49/59] i386/xen: handle HVMOP_get_param, David Woodhouse, 2023/02/01
- [PATCH v10 14/59] xen: Permit --xen-domid argument when accel is KVM, David Woodhouse, 2023/02/01
- [PATCH v10 10/59] i386/xen: implement HYPERVISOR_xen_version, David Woodhouse, 2023/02/01
- [PATCH v10 29/59] hw/xen: Implement EVTCHNOP_status, David Woodhouse, 2023/02/01
- [PATCH v10 44/59] hw/xen: Support mapping grant frames, David Woodhouse, 2023/02/01