• L
    qemu: propagate virQEMUDriver object to qemuDomainDeviceCalculatePCIConnectFlags · 9b0848d5
    Laine Stump 提交于
    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.
    9b0848d5
qemu_domain.c 204.0 KB