diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2025-03-13 10:35:12 +0800 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2025-03-13 10:35:12 +0800 |
| commit | 74b3445378f7d9be35b7a77757bb568080a6f929 (patch) | |
| tree | 793a976dff3529446f4eec1b30042fe8deb25163 /hw/vfio/pci.c | |
| parent | 71569cd8aba31fcb3a326c56c307d2b811417c0b (diff) | |
| parent | 4d9607481560e6c8e1508a0aafe94f86a0503c8c (diff) | |
| download | focaccia-qemu-74b3445378f7d9be35b7a77757bb568080a6f929.tar.gz focaccia-qemu-74b3445378f7d9be35b7a77757bb568080a6f929.zip | |
Merge tag 'pull-vfio-20250311' of https://github.com/legoater/qemu into staging
vfio queue: * Fixed endianness of VFIO device state packets * Improved IGD passthrough support with legacy mode * Improved build * Added support for old AMD GPUs (x550) * Updated property documentation # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmfQfQcACgkQUaNDx8/7 # 7KEUNw/+PjFpHrz5muQ8itkbyd36eJJdcxCl+9IPIWfnUfB582epkLcgvWyswGUo # krFTregoRG0PKtgZDtv95owGtVJOgK6XYFadGHiYkvvsb41twOYsP7/SuI+KMiEv # IDFLMvCTyorSIIoEF8i2EexfGPRV1VoWwvBoHgRRmYlzwzXnufjABpoZ0a25DTye # DQ4yhSfqoIh1gOcdL9tPictnZg9OxKr2ePXNdrtymtEIhg3ZobD3Jd8J4WCcsfKT # fxxBO5NsGgA8oM7i02fYN9kgMwqTnVhSAu1wq9PXsbrnNXam+trywAWSO6CjL+rV # ++STWNSrRoHzuotRBr7BzrTpTFyQyfwBWqUT5L4NlhgXB3Xybk+M6Zj08Yva8pjE # w78JQKvKp54gU34AWBW0/J6+u3v+iE8l1Eywx6xueF9Q+YSUDeW9B1LDdjFJryhF # d8j3J+vuglbdsp05D+tVErf5cqFvFDfrjTkXkZNtmx7wky45XS9ZvNazYW1KI3f9 # bg8Wjb7ZujuvxpSjycPRZzdKa8kqSgSZg7fg91Wimiy1Iqe3SZVVWNchLYiPp8Dm # nXMfOEpVHQZ1vzeo7dVWyxu9Y1ujgvUQy8kMa9q2W2S7HQ5Sna79n7eMVJxqZQ4G # m0ETFToOcPPOnZBWgqNOSUlSQncFuIVgNTDvycQ9dMhGorYcBDI= # =Vh0m # -----END PGP SIGNATURE----- # gpg: Signature made Wed 12 Mar 2025 02:12:23 HKT # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <clg@redhat.com>" [full] # gpg: aka "Cédric Le Goater <clg@kaod.org>" [full] # Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-vfio-20250311' of https://github.com/legoater/qemu: (21 commits) vfio/pci: Drop debug commentary from x-device-dirty-page-tracking vfio/pci-quirks: Exclude non-ioport BAR from ATI quirk hw/vfio: Compile display.c once hw/vfio: Compile iommufd.c once hw/vfio: Compile more objects once hw/vfio: Compile some common objects once hw/vfio/common: Get target page size using runtime helpers hw/vfio/common: Include missing 'system/tcg.h' header hw/vfio/spapr: Do not include <linux/kvm.h> system: Declare qemu_[min/max]rampagesize() in 'system/hostmem.h' vfio/migration: Use BE byte order for device state wire packets vfio/igd: Fix broken KVMGT OpRegion support vfio/igd: Introduce x-igd-lpc option for LPC bridge ID quirk vfio/igd: Handle x-igd-opregion option in config quirk vfio/igd: Decouple common quirks from legacy mode vfio/igd: Refactor vfio_probe_igd_bar4_quirk into pci config quirk vfio/pci: Add placeholder for device-specific config space quirks vfio/igd: Move LPC bridge initialization to a separate function vfio/igd: Consolidate OpRegion initialization into a single function vfio/igd: Do not include GTT stolen size in etc/igd-bdsm-size ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/vfio/pci.c')
| -rw-r--r-- | hw/vfio/pci.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index fdbc15885d..7f1532fbed 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3128,6 +3128,10 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) goto out_unset_idev; } + if (!vfio_config_quirk_setup(vdev, errp)) { + goto out_unset_idev; + } + if (vdev->vga) { vfio_vga_quirk_setup(vdev); } @@ -3136,31 +3140,6 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) vfio_bar_quirk_setup(vdev, i); } - if (!vdev->igd_opregion && - vdev->features & VFIO_FEATURE_ENABLE_IGD_OPREGION) { - g_autofree struct vfio_region_info *opregion = NULL; - - if (vdev->pdev.qdev.hotplugged) { - error_setg(errp, - "cannot support IGD OpRegion feature on hotplugged " - "device"); - goto out_unset_idev; - } - - ret = vfio_get_dev_region_info(vbasedev, - VFIO_REGION_TYPE_PCI_VENDOR_TYPE | PCI_VENDOR_ID_INTEL, - VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION, &opregion); - if (ret) { - error_setg_errno(errp, -ret, - "does not support requested IGD OpRegion feature"); - goto out_unset_idev; - } - - if (!vfio_pci_igd_opregion_init(vdev, opregion, errp)) { - goto out_unset_idev; - } - } - /* QEMU emulates all of MSI & MSIX */ if (pdev->cap_present & QEMU_PCI_CAP_MSIX) { memset(vdev->emulated_config_bits + pdev->msix_cap, 0xff, @@ -3381,6 +3360,10 @@ static const Property vfio_pci_dev_properties[] = { VFIO_FEATURE_ENABLE_REQ_BIT, true), DEFINE_PROP_BIT("x-igd-opregion", VFIOPCIDevice, features, VFIO_FEATURE_ENABLE_IGD_OPREGION_BIT, false), + DEFINE_PROP_BIT("x-igd-lpc", VFIOPCIDevice, features, + VFIO_FEATURE_ENABLE_IGD_LPC_BIT, false), + DEFINE_PROP_ON_OFF_AUTO("x-igd-legacy-mode", VFIOPCIDevice, + igd_legacy_mode, ON_OFF_AUTO_AUTO), DEFINE_PROP_ON_OFF_AUTO("enable-migration", VFIOPCIDevice, vbasedev.enable_migration, ON_OFF_AUTO_AUTO), DEFINE_PROP("x-migration-multifd-transfer", VFIOPCIDevice, @@ -3549,7 +3532,7 @@ static void vfio_pci_dev_class_init(ObjectClass *klass, void *data) object_class_property_set_description(klass, /* 9.1 */ "x-device-dirty-page-tracking", "Disable device dirty page tracking and use " - "container-based dirty page tracking (DEBUG)"); + "container-based dirty page tracking"); object_class_property_set_description(klass, /* 9.1 */ "migration-events", "Emit VFIO migration QAPI event when a VFIO device " |