pci.c (514855e18fcdc3378fb925046d89a0f1493336db) pci.c (d3c6a18bc7affd3b89903d98d8a3125a3e1c9861)
1/*
2 * vfio based device assignment support
3 *
4 * Copyright Red Hat, Inc. 2012
5 *
6 * Authors:
7 * Alex Williamson <alex.williamson@redhat.com>
8 *

--- 3147 unchanged lines hidden (view full) ---

3156 VFIO_REGION_TYPE_PCI_VENDOR_TYPE | PCI_VENDOR_ID_INTEL,
3157 VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION, &opregion);
3158 if (ret) {
3159 error_setg_errno(errp, -ret,
3160 "does not support requested IGD OpRegion feature");
3161 goto out_teardown;
3162 }
3163
1/*
2 * vfio based device assignment support
3 *
4 * Copyright Red Hat, Inc. 2012
5 *
6 * Authors:
7 * Alex Williamson <alex.williamson@redhat.com>
8 *

--- 3147 unchanged lines hidden (view full) ---

3156 VFIO_REGION_TYPE_PCI_VENDOR_TYPE | PCI_VENDOR_ID_INTEL,
3157 VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION, &opregion);
3158 if (ret) {
3159 error_setg_errno(errp, -ret,
3160 "does not support requested IGD OpRegion feature");
3161 goto out_teardown;
3162 }
3163
3164 ret = vfio_pci_igd_opregion_init(vdev, opregion, errp);
3165 if (ret) {
3164 if (!vfio_pci_igd_opregion_init(vdev, opregion, errp)) {
3166 goto out_teardown;
3167 }
3168 }
3169
3170 /* QEMU emulates all of MSI & MSIX */
3171 if (pdev->cap_present & QEMU_PCI_CAP_MSIX) {
3172 memset(vdev->emulated_config_bits + pdev->msix_cap, 0xff,
3173 MSIX_CAP_LENGTH);

--- 307 unchanged lines hidden ---
3165 goto out_teardown;
3166 }
3167 }
3168
3169 /* QEMU emulates all of MSI & MSIX */
3170 if (pdev->cap_present & QEMU_PCI_CAP_MSIX) {
3171 memset(vdev->emulated_config_bits + pdev->msix_cap, 0xff,
3172 MSIX_CAP_LENGTH);

--- 307 unchanged lines hidden ---