[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 6/6] vfio: Setup IGD stolen memory under secondary mod
From: |
Zhi Wang |
Subject: |
[Qemu-devel] [RFC 6/6] vfio: Setup IGD stolen memory under secondary mode |
Date: |
Tue, 30 May 2017 01:30:36 +0800 |
Also setup IGD stolen memory under secondary mode as some HW functions
might need the stolen memory anyway.
Suggested-by: Xiong Zhang <address@hidden>
Signed-off-by: Zhi Wang <address@hidden>
---
hw/vfio/pci-quirks.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
index abfcec6..6ddb59a 100644
--- a/hw/vfio/pci-quirks.c
+++ b/hw/vfio/pci-quirks.c
@@ -1196,16 +1196,11 @@ static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice
*vdev, int nr)
Error *err = NULL;
/*
- * This must be an Intel VGA device at address 00:02.0 for us to even
- * consider enabling legacy mode. The vBIOS has dependencies on the
- * PCI bus address.
+ * This must be an Intel VGA device.
*/
if (!vfio_pci_is(vdev, PCI_VENDOR_ID_INTEL, PCI_ANY_ID) ||
- !vfio_is_vga(vdev) || nr != 4 ||
- &vdev->pdev != pci_find_device(pci_device_root_bus(&vdev->pdev),
- 0, PCI_DEVFN(0x2, 0))) {
+ !vfio_is_vga(vdev) || nr != 4)
return;
- }
/*
* IGD is not a standard, they like to change their specs often. We
@@ -1251,6 +1246,15 @@ static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice
*vdev, int nr)
pci_set_long(vdev->emulated_config_bits + IGD_BDSM, ~0);
/*
+ * This must be an Intel VGA device at address 00:02.0 for us to even
+ * consider enabling legacy mode. The vBIOS has dependencies on the
+ * PCI bus address.
+ */
+ if (&vdev->pdev != pci_find_device(pci_device_root_bus(&vdev->pdev),
+ 0, PCI_DEVFN(0x2, 0)))
+ return;
+
+ /*
* We need to create an LPC/ISA bridge at PCI bus address 00:1f.0 that we
* can stuff host values into, so if there's already one there and it's not
* one we can hack on, legacy mode is no-go. Sorry Q35.
--
2.7.4
- [Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 2/6] vfio: Setup IGD quirks earlier, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 1/6] vfio: Add Intel platform definitions, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 3/6] vfio: Setup IGD stolen memory, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 4/6] vfio: Refine GGTT clearing, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 5/6] vfio: Remove extra quirks and old definitions, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 6/6] vfio: Setup IGD stolen memory under secondary mode,
Zhi Wang <=
- [Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 2/6] vfio: Setup IGD quirks earlier, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 1/6] vfio: Add Intel platform definitions, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 3/6] vfio: Setup IGD stolen memory, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 4/6] vfio: Refine GGTT clearing, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 6/6] vfio: Setup IGD stolen memory under secondary mode, Zhi Wang, 2017/05/29
- [Qemu-devel] [RFC 5/6] vfio: Remove extra quirks and old definitions, Zhi Wang, 2017/05/29
- Re: [Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO, Zhi Wang, 2017/05/29