> From: Michael S. Tsirkin <mst@xxxxxxxxxx> > Sent: Friday, September 22, 2023 9:23 PM > > +static int virtiovf_pci_probe(struct pci_dev *pdev, > > + const struct pci_device_id *id) { > > + const struct vfio_device_ops *ops = &virtiovf_acc_vfio_pci_ops; > > + struct virtiovf_pci_core_device *virtvdev; > > + int ret; > > + > > + if (pdev->is_virtfn && virtiovf_support_legacy_access(pdev) && > > + !virtiovf_bar0_exists(pdev) && pdev->msix_cap) > > I see this is the reason you set MSIX to true. But I think it's a misunderstanding - > that true means MSIX is enabled by guest, not that it exists. Msix check here just looks a sanity check to make sure that guest can enable msix. The msix enable check should be in the read()/write() calls to decide which AQ command to choose from, i.e. to access common config or device config as written in the virtio spec. Yishai please fix the read() write() calls to dynamically consider the offset of 24/20 based on the msix enabled state. _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization