On Mon, Nov 07, 2022 at 11:58:21PM -0500, Michael S. Tsirkin wrote: > On Tue, Nov 08, 2022 at 04:52:16AM +0000, Wei Gong wrote: > > O Wed, Oct 26, 2022 at 02:11:21AM -0400, Michael S. Tsirkin wrote: > > > virtio uses the same driver for VFs and PFs. Accordingly, > > > pci_device_is_present is used to detect device presence. This function > > > isn't currently working properly for VFs since it attempts reading > > > device and vendor ID. As VFs are present if and only if PF is present, > > > just return the value for that device. > > > > > > Reported-by: Wei Gong <gongwei833x@xxxxxxxxx> > > > Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx> > > > --- > > > > > > Wei Gong, thanks for your testing of the RFC! > > > As I made a small change, would appreciate re-testing. > > > > > > Thanks! > > > > > > changes from RFC: > > > use pci_physfn() wrapper to make the code build without PCI_IOV > > > > > > > > > drivers/pci/pci.c | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > Tested-by: Wei Gong <gongwei833x@xxxxxxxxx> > > > > Thanks! > Bjorn, could you queue this fix in your tree or should I queue this > in the virtio tree? I also think this would be nice to have for stable too - > do you agree? > Thanks! It's on my list to look at, sorry for the delay. Bjorn