9b0848d qemu: propagate virQEMUDriver object to qemuDomainDeviceCalculatePCIConnectFlags

Authored and Committed by Laine Stump 7 years ago
    qemu: propagate virQEMUDriver object to qemuDomainDeviceCalculatePCIConnectFlags
    
    If libvirtd is running unprivileged, it can open a device's PCI config
    data in sysfs, but can only read the first 64 bytes. But as part of
    determining whether a device is Express or legacy PCI,
    qemuDomainDeviceCalculatePCIConnectFlags() will be updated in a future
    patch to call virPCIDeviceIsPCIExpress(), which tries to read beyond
    the first 64 bytes of the PCI config data and fails with an error log
    if the read is unsuccessful.
    
    In order to avoid creating a parallel "quiet" version of
    virPCIDeviceIsPCIExpress(), this patch passes a virQEMUDriverPtr down
    through all the call chains that initialize the
    qemuDomainFillDevicePCIConnectFlagsIterData, and saves the driver
    pointer with the rest of the iterdata so that it can be used by
    qemuDomainDeviceCalculatePCIConnectFlags(). This pointer isn't used
    yet, but will be used in an upcoming patch (that detects Express vs
    legacy PCI for VFIO assigned devices) to examine driver->privileged.
    
        
file modified
+1 -1
file modified
+24 -11
file modified
+11 -10
file modified
+9 -4
file modified
+3 -1