search for: virtio_f_iommu_passthrough

Displaying 16 results from an estimated 16 matches for "virtio_f_iommu_passthrough".

2016 Jul 19
5
[PATCH v3] virtio: new feature to detect IOMMU device quirk
...ise, we are left to guess. */ /* * In theory, it's possible to have a buggy QEMU-supposed * emulated Q35 IOMMU and Xen enabled at the same time. On @@ -1099,6 +1106,12 @@ void vring_transport_features(struct virtio_device *vdev) break; case VIRTIO_F_VERSION_1: break; + case VIRTIO_F_IOMMU_PASSTHROUGH: + break; + case VIRTIO_F_IOMMU_PLATFORM: + /* Ignore passthrough hint for now, obey kernel config. */ + __virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PASSTHROUGH); + break; default: /* We don't understand this bit. */ __virtio_clear_bit(vdev, i); -- MST
2016 Jul 19
5
[PATCH v3] virtio: new feature to detect IOMMU device quirk
...ise, we are left to guess. */ /* * In theory, it's possible to have a buggy QEMU-supposed * emulated Q35 IOMMU and Xen enabled at the same time. On @@ -1099,6 +1106,12 @@ void vring_transport_features(struct virtio_device *vdev) break; case VIRTIO_F_VERSION_1: break; + case VIRTIO_F_IOMMU_PASSTHROUGH: + break; + case VIRTIO_F_IOMMU_PLATFORM: + /* Ignore passthrough hint for now, obey kernel config. */ + __virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PASSTHROUGH); + break; default: /* We don't understand this bit. */ __virtio_clear_bit(vdev, i); -- MST
2016 Apr 18
2
[PATCH RFC] fixup! virtio: convert to use DMA api
...ells > you, I'm not a real device - I'm part of hypervisor and I bypass the > IOMMU". ... +/* Request IOMMU passthrough (if available) + * Without VIRTIO_F_IOMMU_PLATFORM: bypass the IOMMU even if enabled. + * With VIRTIO_F_IOMMU_PLATFORM: suggest disabling IOMMU. + */ +#define VIRTIO_F_IOMMU_PASSTHROUGH?????33 + +/* Do not bypass the IOMMU (if configured) */ +#define VIRTIO_F_IOMMU_PLATFORM????????????????34 OK... let's see if I can reconcile those descriptions coherently. Setting (only) VIRTIO_F_IOMMU_PASSTHROUGH indicates to the guest that its own operating system's IOMMU code is expec...
2016 Apr 18
2
[PATCH RFC] fixup! virtio: convert to use DMA api
...ells > you, I'm not a real device - I'm part of hypervisor and I bypass the > IOMMU". ... +/* Request IOMMU passthrough (if available) + * Without VIRTIO_F_IOMMU_PLATFORM: bypass the IOMMU even if enabled. + * With VIRTIO_F_IOMMU_PLATFORM: suggest disabling IOMMU. + */ +#define VIRTIO_F_IOMMU_PASSTHROUGH?????33 + +/* Do not bypass the IOMMU (if configured) */ +#define VIRTIO_F_IOMMU_PLATFORM????????????????34 OK... let's see if I can reconcile those descriptions coherently. Setting (only) VIRTIO_F_IOMMU_PASSTHROUGH indicates to the guest that its own operating system's IOMMU code is expec...
2016 Apr 18
0
[PATCH RFC] fixup! virtio: convert to use DMA api
...#39;m part of hypervisor and I bypass the > > IOMMU". > > ... > > +/* Request IOMMU passthrough (if available) > + * Without VIRTIO_F_IOMMU_PLATFORM: bypass the IOMMU even if enabled. > + * With VIRTIO_F_IOMMU_PLATFORM: suggest disabling IOMMU. > + */ > +#define VIRTIO_F_IOMMU_PASSTHROUGH?????33 > + > +/* Do not bypass the IOMMU (if configured) */ > +#define VIRTIO_F_IOMMU_PLATFORM????????????????34 > > OK... let's see if I can reconcile those descriptions coherently. > > Setting (only) VIRTIO_F_IOMMU_PASSTHROUGH indicates to the guest that > its own op...
2016 Apr 18
1
[PATCH RFC] fixup! virtio: convert to use DMA api
On Mon, 2016-04-18 at 16:12 +0300, Michael S. Tsirkin wrote: > I'm not sure I understand the issue.??The public API is not about how > the driver works.??It doesn't say "don't use DMA API" anywhere, does it? > It's about telling device whether to obey the IOMMU and > about discovering whether a device is in fact under the IOMMU. Apologies, I was wrongly
2016 Apr 18
2
[PATCH RFC] fixup! virtio: convert to use DMA api
On Mon, 2016-04-18 at 18:30 +0300, Michael S. Tsirkin wrote: > > > Setting (only) VIRTIO_F_IOMMU_PASSTHROUGH indicates to the guest that > > its own operating system's IOMMU code is expected to be broken, and > > that the virtio driver should eschew the DMA API? > > No - it tells guest that e.g. the ACPI tables (or whatever the > equivalent is) do not match reality with respect t...
2016 Apr 18
2
[PATCH RFC] fixup! virtio: convert to use DMA api
On Mon, 2016-04-18 at 18:30 +0300, Michael S. Tsirkin wrote: > > > Setting (only) VIRTIO_F_IOMMU_PASSTHROUGH indicates to the guest that > > its own operating system's IOMMU code is expected to be broken, and > > that the virtio driver should eschew the DMA API? > > No - it tells guest that e.g. the ACPI tables (or whatever the > equivalent is) do not match reality with respect t...
2016 Apr 18
0
[PATCH RFC] fixup! virtio: convert to use DMA api
On Mon, Apr 18, 2016 at 11:51:41AM -0400, David Woodhouse wrote: > On Mon, 2016-04-18 at 18:30 +0300, Michael S. Tsirkin wrote: > > > > > Setting (only) VIRTIO_F_IOMMU_PASSTHROUGH indicates to the guest that > > > its own operating system's IOMMU code is expected to be broken, and > > > that the virtio driver should eschew the DMA API? > > > > No - it tells guest that e.g. the ACPI tables (or whatever the > > equivalent is) do not mat...
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
This is an attempt to allow enabling IOMMU for DMA. Design: - new feature bit IOMMU_PLATFORM which means host won't bypass IOMMU - virtio core uses DMA API if it sees IOMMU_PLATFORM - add quirk for vfio to disable device unless IOMMU_PLATFORM is set or the no-iommu mode is enabled - while I'm not sure how it will be used, it seems like a good idea to also have
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
This is an attempt to allow enabling IOMMU for DMA. Design: - new feature bit IOMMU_PLATFORM which means host won't bypass IOMMU - virtio core uses DMA API if it sees IOMMU_PLATFORM - add quirk for vfio to disable device unless IOMMU_PLATFORM is set or the no-iommu mode is enabled - while I'm not sure how it will be used, it seems like a good idea to also have
2016 Apr 18
2
[PATCH RFC] fixup! virtio: convert to use DMA api
...VIRTIO_F_NOTIFY_ON_EMPTY, true), \ DEFINE_PROP_BIT64("any_layout", _state, _field, \ - VIRTIO_F_ANY_LAYOUT, true) + VIRTIO_F_ANY_LAYOUT, true), \ + DEFINE_PROP_BIT64("iommu_passthrough", _state, _field, \ + VIRTIO_F_IOMMU_PASSTHROUGH, false), \ + DEFINE_PROP_BIT64("iommu_platform", _state, _field, \ + VIRTIO_F_IOMMU_PLATFORM, false) hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n); hwaddr virtio_queue_get_avail_addr(VirtIODevice *vdev, int n); diff --git a/include/standard-heade...
2016 Apr 18
2
[PATCH RFC] fixup! virtio: convert to use DMA api
...VIRTIO_F_NOTIFY_ON_EMPTY, true), \ DEFINE_PROP_BIT64("any_layout", _state, _field, \ - VIRTIO_F_ANY_LAYOUT, true) + VIRTIO_F_ANY_LAYOUT, true), \ + DEFINE_PROP_BIT64("iommu_passthrough", _state, _field, \ + VIRTIO_F_IOMMU_PASSTHROUGH, false), \ + DEFINE_PROP_BIT64("iommu_platform", _state, _field, \ + VIRTIO_F_IOMMU_PLATFORM, false) hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n); hwaddr virtio_queue_get_avail_addr(VirtIODevice *vdev, int n); diff --git a/include/standard-heade...
2016 Apr 18
5
[PATCH RFC] fixup! virtio: convert to use DMA api
...ngs work correctly with an IOMMU and new guests, > ? so people can use userspace drivers with virtio devices > - prevent security risks when guest kernel mistakenly thinks > ? it's protected by an IOMMU, but in fact isn't > - avoid breaking any working configurations AFAICT the VIRTIO_F_IOMMU_PASSTHROUGH thing seems orthogonal to this. That's just an optimisation, for telling an OS "you don't really need to bother with the IOMMU, even though you it works". There are two main reasons why an operating system might want to use the IOMMU via the DMA API for native drivers:? ?- To pro...
2016 Apr 18
5
[PATCH RFC] fixup! virtio: convert to use DMA api
...ngs work correctly with an IOMMU and new guests, > ? so people can use userspace drivers with virtio devices > - prevent security risks when guest kernel mistakenly thinks > ? it's protected by an IOMMU, but in fact isn't > - avoid breaking any working configurations AFAICT the VIRTIO_F_IOMMU_PASSTHROUGH thing seems orthogonal to this. That's just an optimisation, for telling an OS "you don't really need to bother with the IOMMU, even though you it works". There are two main reasons why an operating system might want to use the IOMMU via the DMA API for native drivers:? ?- To pro...
2016 Apr 19
0
[PATCH RFC] fixup! virtio: convert to use DMA api
...MU and new guests, > > ? so people can use userspace drivers with virtio devices > > - prevent security risks when guest kernel mistakenly thinks > > ? it's protected by an IOMMU, but in fact isn't > > - avoid breaking any working configurations > > AFAICT the VIRTIO_F_IOMMU_PASSTHROUGH thing seems orthogonal to this. > That's just an optimisation, for telling an OS "you don't really need > to bother with the IOMMU, even though you it works". > > There are two main reasons why an operating system might want to use > the IOMMU via the DMA API for n...