search for: noiommu

Displaying 20 results from an estimated 38 matches for "noiommu".

Did you mean: oiommu
2016 Apr 18
0
[PATCH RFC 2/3] vfio: report group noiommu status
...diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index 6fd6fa5..67db231 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -756,6 +756,7 @@ int vfio_add_group_dev(struct device *dev, struct iommu_group *iommu_group; struct vfio_group *group; struct vfio_device *device; + int noiommu; iommu_group = iommu_group_get(dev); if (!iommu_group) @@ -791,6 +792,8 @@ int vfio_add_group_dev(struct device *dev, return PTR_ERR(device); } + noiommu = group->noiommu; + /* * Drop all but the vfio_device reference. The vfio_device holds * a reference to the vfio_group,...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...> > > > > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > > > to signal they are safe to use with an IOMMU. > > > > > > Without this bit, exposing the device to userspace is unsafe, so probe > > > and fail VFIO initialization unless noiommu is enabled. > > > > > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > > > --- > > > drivers/vfio/pci/vfio_pci_private.h | 1 + > > > drivers/vfio/pci/vfio_pci.c | 14 ++++ > > > drivers/vfio/pci/vfio_pci_virtio.c |...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...> > > > > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > > > to signal they are safe to use with an IOMMU. > > > > > > Without this bit, exposing the device to userspace is unsafe, so probe > > > and fail VFIO initialization unless noiommu is enabled. > > > > > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > > > --- > > > drivers/vfio/pci/vfio_pci_private.h | 1 + > > > drivers/vfio/pci/vfio_pci.c | 14 ++++ > > > drivers/vfio/pci/vfio_pci_virtio.c |...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...uot;Michael S. Tsirkin" <mst at redhat.com> wrote: > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > to signal they are safe to use with an IOMMU. > > Without this bit, exposing the device to userspace is unsafe, so probe > and fail VFIO initialization unless noiommu is enabled. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/vfio/pci/vfio_pci_private.h | 1 + > drivers/vfio/pci/vfio_pci.c | 14 ++++ > drivers/vfio/pci/vfio_pci_virtio.c | 140 ++++++++++++++++++++++++++++++++++++ > drivers/vfio/...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...uot;Michael S. Tsirkin" <mst at redhat.com> wrote: > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > to signal they are safe to use with an IOMMU. > > Without this bit, exposing the device to userspace is unsafe, so probe > and fail VFIO initialization unless noiommu is enabled. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/vfio/pci/vfio_pci_private.h | 1 + > drivers/vfio/pci/vfio_pci.c | 14 ++++ > drivers/vfio/pci/vfio_pci_virtio.c | 140 ++++++++++++++++++++++++++++++++++++ > drivers/vfio/...
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 drivers/vfio/pci/vfio_pci_private.h | 1 + include/linux/vfio.h | 2 +...
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 drivers/vfio/pci/vfio_pci_private.h | 1 + include/linux/vfio.h | 2 +...
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
...FORM is set. TODO: - I'm not sure whether there are setups that mix IOMMU and no-IOMMU configs. If so, failing on probe might not be the right thing to do, should fail binding to IOMMU group instead. Michael S. Tsirkin (3): virtio: add features for IOMMU control vfio: report group noiommu status vfio: add virtio pci quirk drivers/vfio/pci/vfio_pci_private.h | 1 + include/uapi/linux/virtio_config.h | 10 +- drivers/vfio/pci/vfio_pci.c | 13 ++- drivers/vfio/pci/vfio_pci_virtio.c | 142 +++++++++++++++++++++++++++ drivers/vfio/pla...
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
...FORM is set. TODO: - I'm not sure whether there are setups that mix IOMMU and no-IOMMU configs. If so, failing on probe might not be the right thing to do, should fail binding to IOMMU group instead. Michael S. Tsirkin (3): virtio: add features for IOMMU control vfio: report group noiommu status vfio: add virtio pci quirk drivers/vfio/pci/vfio_pci_private.h | 1 + include/uapi/linux/virtio_config.h | 10 +- drivers/vfio/pci/vfio_pci.c | 13 ++- drivers/vfio/pci/vfio_pci_virtio.c | 142 +++++++++++++++++++++++++++ drivers/vfio/pla...
2019 Sep 27
1
[PATCH] vhost: introduce mdev based hardware backend
.../* > > > > + * In vhost-mdev, userspace should pass ring addresses > > > > + * in guest physical addresses when IOMMU is disabled or > > > > + * IOVAs when IOMMU is enabled. > > > > + */ > > > A question here, consider we're using noiommu mode. If guest physical > > > address is passed here, how can a device use that? > > > > > > I believe you meant "host physical address" here? And it also have the > > > implication that the HPA should be continuous (e.g using hugetlbfs). > > The...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...t; > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > > > > to signal they are safe to use with an IOMMU. > > > > > > > > Without this bit, exposing the device to userspace is unsafe, so probe > > > > and fail VFIO initialization unless noiommu is enabled. > > > > > > > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > > > > --- > > > > drivers/vfio/pci/vfio_pci_private.h | 1 + > > > > drivers/vfio/pci/vfio_pci.c | 14 ++++ > > > > drivers/...
2019 Sep 27
5
[PATCH] vhost: introduce mdev based hardware backend
...> > > > + > > + /* > > + * In vhost-mdev, userspace should pass ring addresses > > + * in guest physical addresses when IOMMU is disabled or > > + * IOVAs when IOMMU is enabled. > > + */ > > > A question here, consider we're using noiommu mode. If guest physical > address is passed here, how can a device use that? > > I believe you meant "host physical address" here? And it also have the > implication that the HPA should be continuous (e.g using hugetlbfs). The comment is talking about the virtual IOMMU (i.e....
2019 Sep 27
5
[PATCH] vhost: introduce mdev based hardware backend
...> > > > + > > + /* > > + * In vhost-mdev, userspace should pass ring addresses > > + * in guest physical addresses when IOMMU is disabled or > > + * IOVAs when IOMMU is enabled. > > + */ > > > A question here, consider we're using noiommu mode. If guest physical > address is passed here, how can a device use that? > > I believe you meant "host physical address" here? And it also have the > implication that the HPA should be continuous (e.g using hugetlbfs). The comment is talking about the virtual IOMMU (i.e....
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...lt;mst at redhat.com> wrote: > > > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > > to signal they are safe to use with an IOMMU. > > > > Without this bit, exposing the device to userspace is unsafe, so probe > > and fail VFIO initialization unless noiommu is enabled. > > > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > > --- > > drivers/vfio/pci/vfio_pci_private.h | 1 + > > drivers/vfio/pci/vfio_pci.c | 14 ++++ > > drivers/vfio/pci/vfio_pci_virtio.c | 140 ++++++++++++++++++++++++++...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM to signal they are safe to use with an IOMMU. Without this bit, exposing the device to userspace is unsafe, so probe and fail VFIO initialization unless noiommu is enabled. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/vfio/pci/vfio_pci_private.h | 1 + drivers/vfio/pci/vfio_pci.c | 14 ++++ drivers/vfio/pci/vfio_pci_virtio.c | 140 ++++++++++++++++++++++++++++++++++++ drivers/vfio/pci/Makefile | 1 + 4 f...
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...uot;Michael S. Tsirkin" <mst at redhat.com> wrote: > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > to signal they are safe to use with an IOMMU. > > Without this bit, exposing the device to userspace is unsafe, so probe > and fail VFIO initialization unless noiommu is enabled. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/vfio/pci/vfio_pci_private.h | 1 + > drivers/vfio/pci/vfio_pci.c | 11 +++ > drivers/vfio/pci/vfio_pci_virtio.c | 135 ++++++++++++++++++++++++++++++++++++ > drivers/vfio/p...
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...uot;Michael S. Tsirkin" <mst at redhat.com> wrote: > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > to signal they are safe to use with an IOMMU. > > Without this bit, exposing the device to userspace is unsafe, so probe > and fail VFIO initialization unless noiommu is enabled. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/vfio/pci/vfio_pci_private.h | 1 + > drivers/vfio/pci/vfio_pci.c | 11 +++ > drivers/vfio/pci/vfio_pci_virtio.c | 135 ++++++++++++++++++++++++++++++++++++ > drivers/vfio/p...
2016 Apr 18
0
[PATCH RFC 3/3] vfio: add virtio pci quirk
Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM to signal they are safe to use with an IOMMU. Without this bit, exposing the device to userspace is unsafe, so probe and fail VFIO initialization unless noiommu is enabled. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/vfio/pci/vfio_pci_private.h | 1 + drivers/vfio/pci/vfio_pci.c | 11 +++ drivers/vfio/pci/vfio_pci_virtio.c | 135 ++++++++++++++++++++++++++++++++++++ drivers/vfio/pci/Makefile | 1 + 4 fi...
2019 Sep 27
1
[PATCH] vhost: introduce mdev based hardware backend
.../* > > > > + * In vhost-mdev, userspace should pass ring addresses > > > > + * in guest physical addresses when IOMMU is disabled or > > > > + * IOVAs when IOMMU is enabled. > > > > + */ > > > A question here, consider we're using noiommu mode. If guest physical > > > address is passed here, how can a device use that? > > > > > > I believe you meant "host physical address" here? And it also have the > > > implication that the HPA should be continuous (e.g using hugetlbfs). > > The...
2016 Jul 27
2
[PATCH v4] virtio: new feature to detect IOMMU device quirk
The interaction between virtio and IOMMUs is messy. On most systems with virtio, physical addresses match bus addresses, and it doesn't particularly matter which one we use to program the device. On some systems, including Xen and any system with a physical device that speaks virtio behind a physical IOMMU, we must program the IOMMU for virtio DMA to work at all. On other systems, including