> From: Michael S. Tsirkin <m...@redhat.com> > 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@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices
Parav Pandit via Virtualization Mon, 02 Oct 2023 04:23:51 -0700
- Re: [PATCH vfio 11/1... Michael S. Tsirkin
- Re: [PATCH vfio 11/11] vfio/virtio: Introd... Alex Williamson
- Re: [PATCH vfio 11/11] vfio/virtio: I... Michael S. Tsirkin
- Re: [PATCH vfio 11/11] vfio/virti... Alex Williamson
- RE: [PATCH vfio 11/11] vfio/virtio: I... Parav Pandit via Virtualization
- Re: [PATCH vfio 11/11] vfio/virtio: I... Yishai Hadas via Virtualization
- Re: [PATCH vfio 11/11] vfio/virti... Michael S. Tsirkin
- RE: [PATCH vfio 11/11] vfio/v... Parav Pandit via Virtualization
- Re: [PATCH vfio 11/11] vfio/virtio: Introd... Michael S. Tsirkin
- Re: [PATCH vfio 11/11] vfio/virtio: Introd... Michael S. Tsirkin
- RE: [PATCH vfio 11/11] vfio/virtio: I... Parav Pandit via Virtualization