Displaying 9 results from an estimated 9 matches for "vfio_is_noiommu_group_dev".
2016 Aug 30
6
[PATCH v2 0/2] vfio: blacklist legacy virtio devices
Legacy virtio devices always bypassed an IOMMU, so using them with vfio was
never safe. This adds a quirk detecting these and disabling VFIO unless the
noiommu mode is used. At the moment, this only applies to virtio-pci devices.
The patch might make sense on stable as well.
Michael S. Tsirkin (2):
vfio: report group noiommu status
vfio: add virtio pci quirk
2016 Aug 30
6
[PATCH v2 0/2] vfio: blacklist legacy virtio devices
Legacy virtio devices always bypassed an IOMMU, so using them with vfio was
never safe. This adds a quirk detecting these and disabling VFIO unless the
noiommu mode is used. At the moment, this only applies to virtio-pci devices.
The patch might make sense on stable as well.
Michael S. Tsirkin (2):
vfio: report group noiommu status
vfio: add virtio pci quirk
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...> }
>
> + if (pdev->vendor == PCI_VENDOR_ID_REDHAT_QUMRANET) {
Perhaps a vfio_pci_is_virtio() like vga below? Let's test the device
ID range initially as well, this test raised a big red flag for me
whether all devices within this vendor ID were virtio.
> + bool noiommu = vfio_is_noiommu_group_dev(&pdev->dev);
I think you can use iommu_present() for this and avoid patch 1of2.
noiommu is mutually exclusive to an iommu being present. Seems like
all of this logic should be in the quirk itself, I'm not sure what it
buys to get the value here but wait until later to use it. Using
io...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...> }
>
> + if (pdev->vendor == PCI_VENDOR_ID_REDHAT_QUMRANET) {
Perhaps a vfio_pci_is_virtio() like vga below? Let's test the device
ID range initially as well, this test raised a big red flag for me
whether all devices within this vendor ID were virtio.
> + bool noiommu = vfio_is_noiommu_group_dev(&pdev->dev);
I think you can use iommu_present() for this and avoid patch 1of2.
noiommu is mutually exclusive to an iommu being present. Seems like
all of this logic should be in the quirk itself, I'm not sure what it
buys to get the value here but wait until later to use it. Using
io...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
..._QUMRANET) {
> >
> > Perhaps a vfio_pci_is_virtio() like vga below? Let's test the device
> > ID range initially as well, this test raised a big red flag for me
> > whether all devices within this vendor ID were virtio.
> >
> > > + bool noiommu = vfio_is_noiommu_group_dev(&pdev->dev);
> >
> > I think you can use iommu_present() for this and avoid patch 1of2.
> > noiommu is mutually exclusive to an iommu being present. Seems like
> > all of this logic should be in the quirk itself, I'm not sure what it
> > buys to get th...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
..._QUMRANET) {
> >
> > Perhaps a vfio_pci_is_virtio() like vga below? Let's test the device
> > ID range initially as well, this test raised a big red flag for me
> > whether all devices within this vendor ID were virtio.
> >
> > > + bool noiommu = vfio_is_noiommu_group_dev(&pdev->dev);
> >
> > I think you can use iommu_present() for this and avoid patch 1of2.
> > noiommu is mutually exclusive to an iommu being present. Seems like
> > all of this logic should be in the quirk itself, I'm not sure what it
> > buys to get th...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...c
index d624a52..e93bf0c 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -1236,6 +1236,20 @@ static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return ret;
}
+ if (pdev->vendor == PCI_VENDOR_ID_REDHAT_QUMRANET) {
+ bool noiommu = vfio_is_noiommu_group_dev(&pdev->dev);
+
+ ret = vfio_pci_virtio_quirk(vdev, noiommu);
+ if (ret) {
+ dev_warn(&vdev->pdev->dev,
+ "Failed to setup Virtio for VFIO\n");
+ vfio_del_group_dev(&pdev->dev);
+ vfio_iommu_group_put(group, &pdev->dev);
+ kfree(vdev);
+ retur...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...>vendor == PCI_VENDOR_ID_REDHAT_QUMRANET) {
>
> Perhaps a vfio_pci_is_virtio() like vga below? Let's test the device
> ID range initially as well, this test raised a big red flag for me
> whether all devices within this vendor ID were virtio.
>
> > + bool noiommu = vfio_is_noiommu_group_dev(&pdev->dev);
>
> I think you can use iommu_present() for this and avoid patch 1of2.
> noiommu is mutually exclusive to an iommu being present. Seems like
> all of this logic should be in the quirk itself, I'm not sure what it
> buys to get the value here but wait until...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...;
> > > Perhaps a vfio_pci_is_virtio() like vga below? Let's test the device
> > > ID range initially as well, this test raised a big red flag for me
> > > whether all devices within this vendor ID were virtio.
> > >
> > > > + bool noiommu = vfio_is_noiommu_group_dev(&pdev->dev);
> > >
> > > I think you can use iommu_present() for this and avoid patch 1of2.
> > > noiommu is mutually exclusive to an iommu being present. Seems like
> > > all of this logic should be in the quirk itself, I'm not sure what it
>...