aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/microvm.c11
-rw-r--r--hw/usb/hcd-xhci.c3
2 files changed, 13 insertions, 1 deletions
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 754f1d0593..dc929727dc 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -631,6 +631,14 @@ static void microvm_machine_initfn(Object *obj)
qemu_register_powerdown_notifier(&mms->powerdown_req);
}
+GlobalProperty microvm_properties[] = {
+ /*
+ * pcie host bridge (gpex) on microvm has no io address window,
+ * so reserving io space is not going to work. Turn it off.
+ */
+ { "pcie-root-port", "io-reserve", "0" },
+};
+
static void microvm_class_init(ObjectClass *oc, void *data)
{
X86MachineClass *x86mc = X86_MACHINE_CLASS(oc);
@@ -707,6 +715,9 @@ static void microvm_class_init(ObjectClass *oc, void *data)
"Set off to disable adding virtio-mmio devices to the kernel cmdline");
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE);
+
+ compat_props_add(mc->compat_props, microvm_properties,
+ G_N_ELEMENTS(microvm_properties));
}
static const TypeInfo microvm_machine_info = {
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 0cd0a5e540..296cc6c8e6 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3269,7 +3269,8 @@ static void xhci_wakeup_endpoint(USBBus *bus, USBEndpoint *ep,
DPRINTF("%s\n", __func__);
slotid = ep->dev->addr;
- if (slotid == 0 || !xhci->slots[slotid-1].enabled) {
+ if (slotid == 0 || slotid > xhci->numslots ||
+ !xhci->slots[slotid - 1].enabled) {
DPRINTF("%s: oops, no slot for dev %d\n", __func__, ep->dev->addr);
return;
}