All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ksummit-discuss] Short topic: virtio vs IOMMU
@ 2015-10-26  2:55 Andy Lutomirski
  2015-10-26  4:31 ` David Woodhouse
  2015-10-26  4:38 ` Joerg Roedel
  0 siblings, 2 replies; 9+ messages in thread
From: Andy Lutomirski @ 2015-10-26  2:55 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: ksummit-discuss, Paolo Bonzini, m.smarduch

It would be nice to nail down how virtio should interact with IOMMUs
on the emulated busses.  A bunch of the relevant maintainers are
around, and a short slot for this topic might make sense.

The goal would be to figure out how to accomplish something like this series:

https://git.kernel.org/cgit/linux/kernel/git/luto/linux.git/log/?h=virtio_ring_xen

but in a way that would actually work on all supported platforms
without breaking backward compatibility or killing performance.

--Andy

-- 
Andy Lutomirski
AMA Capital Management, LLC

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Ksummit-discuss] Short topic: virtio vs IOMMU
  2015-10-26  2:55 [Ksummit-discuss] Short topic: virtio vs IOMMU Andy Lutomirski
@ 2015-10-26  4:31 ` David Woodhouse
  2015-10-26  4:43   ` Joerg Roedel
  2015-10-26  4:38 ` Joerg Roedel
  1 sibling, 1 reply; 9+ messages in thread
From: David Woodhouse @ 2015-10-26  4:31 UTC (permalink / raw)
  To: Andy Lutomirski, Theodore Ts'o
  Cc: ksummit-discuss, Paolo Bonzini, m.smarduch

[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]

On Sun, 2015-10-25 at 19:55 -0700, Andy Lutomirski wrote:
> It would be nice to nail down how virtio should interact with IOMMUs
> on the emulated busses.  A bunch of the relevant maintainers are
> around, and a short slot for this topic might make sense.
> 
> The goal would be to figure out how to accomplish something like this
> series:
> 
> https://git.kernel.org/cgit/linux/kernel/git/luto/linux.git/log/?h=vi
> rtio_ring_xen
> 
> but in a way that would actually work on all supported platforms
> without breaking backward compatibility or killing performance.

FWIW it should be fine with VT-d; we already cope with the concept that
*some* devices don't have translation, while others do. If we don't
have DMA translation for the virtio devices, that works out fine.

I think the main problem is on POWER where they don't yet have that
option.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5691 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Ksummit-discuss] Short topic: virtio vs IOMMU
  2015-10-26  2:55 [Ksummit-discuss] Short topic: virtio vs IOMMU Andy Lutomirski
  2015-10-26  4:31 ` David Woodhouse
@ 2015-10-26  4:38 ` Joerg Roedel
  1 sibling, 0 replies; 9+ messages in thread
From: Joerg Roedel @ 2015-10-26  4:38 UTC (permalink / raw)
  To: Andy Lutomirski; +Cc: Paolo Bonzini, ksummit-discuss, m.smarduch

On Sun, Oct 25, 2015 at 07:55:31PM -0700, Andy Lutomirski wrote:
> It would be nice to nail down how virtio should interact with IOMMUs
> on the emulated busses.  A bunch of the relevant maintainers are
> around, and a short slot for this topic might make sense.
> 
> The goal would be to figure out how to accomplish something like this series:
> 
> https://git.kernel.org/cgit/linux/kernel/git/luto/linux.git/log/?h=virtio_ring_xen
> 
> but in a way that would actually work on all supported platforms
> without breaking backward compatibility or killing performance.

I am interested in that as well.


	Joerg

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Ksummit-discuss] Short topic: virtio vs IOMMU
  2015-10-26  4:31 ` David Woodhouse
@ 2015-10-26  4:43   ` Joerg Roedel
  2015-10-26  4:48     ` David Woodhouse
  0 siblings, 1 reply; 9+ messages in thread
From: Joerg Roedel @ 2015-10-26  4:43 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Paolo Bonzini, m.smarduch, ksummit-discuss

On Mon, Oct 26, 2015 at 01:31:18PM +0900, David Woodhouse wrote:
> On Sun, 2015-10-25 at 19:55 -0700, Andy Lutomirski wrote:
> > but in a way that would actually work on all supported platforms
> > without breaking backward compatibility or killing performance.
> 
> FWIW it should be fine with VT-d; we already cope with the concept that
> *some* devices don't have translation, while others do. If we don't
> have DMA translation for the virtio devices, that works out fine.

Yes, that should work with the x86 IOMMUs and also with the DT-based
configuration of most ARM IOMMUs.

But it would actually be neat to have at least the option to translate
virtio DMA through an emulated IOMMU to be able to pass a virtio-device
to a nested guest.


	Joerg

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Ksummit-discuss] Short topic: virtio vs IOMMU
  2015-10-26  4:43   ` Joerg Roedel
@ 2015-10-26  4:48     ` David Woodhouse
  2015-10-26  5:04       ` Joerg Roedel
  0 siblings, 1 reply; 9+ messages in thread
From: David Woodhouse @ 2015-10-26  4:48 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Paolo Bonzini, m.smarduch, ksummit-discuss

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

On Mon, 2015-10-26 at 05:43 +0100, Joerg Roedel wrote:
> But it would actually be neat to have at least the option to translate
> virtio DMA through an emulated IOMMU to be able to pass a virtio-device
> to a nested guest.

It would be useful to have an emulated IOMMU, full stop. And yeah, it
might actually make sense to *start* by using it for purely virtual
devices, and then graduate to doing it for passthrough (which will
finally mean we can stop having to pin *all* guest memory the moment we
assign a device, and we only have to pin those pages which are
referenced from the IOMMU page tables).

-- 
dwmw2


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5691 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Ksummit-discuss] Short topic: virtio vs IOMMU
  2015-10-26  4:48     ` David Woodhouse
@ 2015-10-26  5:04       ` Joerg Roedel
  2015-10-26  5:13         ` David Woodhouse
  2015-10-26  6:03         ` Andy Lutomirski
  0 siblings, 2 replies; 9+ messages in thread
From: Joerg Roedel @ 2015-10-26  5:04 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Paolo Bonzini, m.smarduch, ksummit-discuss

On Mon, Oct 26, 2015 at 01:48:02PM +0900, David Woodhouse wrote:
> It would be useful to have an emulated IOMMU, full stop. And yeah, it
> might actually make sense to *start* by using it for purely virtual
> devices, [...]

Sure, I think this is what qemu provides already, except for the virtio
devices (which are also emulated). I think it would be cool to have
virtio translated by the emulated iommu too (at least optional).

> [...] and then graduate to doing it for passthrough (which will
> finally mean we can stop having to pin *all* guest memory the moment we
> assign a device, and we only have to pin those pages which are
> referenced from the IOMMU page tables).

Good point, havn't thought of that yet. But getting rid of the excessive
pinning this way would be really great.



	Joerg

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Ksummit-discuss] Short topic: virtio vs IOMMU
  2015-10-26  5:04       ` Joerg Roedel
@ 2015-10-26  5:13         ` David Woodhouse
  2015-10-26  5:20           ` Joerg Roedel
  2015-10-26  6:03         ` Andy Lutomirski
  1 sibling, 1 reply; 9+ messages in thread
From: David Woodhouse @ 2015-10-26  5:13 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Paolo Bonzini, m.smarduch, ksummit-discuss

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

On Mon, 2015-10-26 at 06:04 +0100, Joerg Roedel wrote:
> On Mon, Oct 26, 2015 at 01:48:02PM +0900, David Woodhouse wrote:
> > It would be useful to have an emulated IOMMU, full stop. And yeah, it
> > might actually make sense to *start* by using it for purely virtual
> > devices, [...]
> 
> Sure, I think this is what qemu provides already, except for the virtio
> devices (which are also emulated). I think it would be cool to have
> virtio translated by the emulated iommu too (at least optional).

Oh, wow. I didn't realise we already had an IOMMU implemented in Qemu.

At first glance it looks like it doesn't support assigned devices...
has anyone looked at doing so?

-- 
dwmw2



[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5691 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Ksummit-discuss] Short topic: virtio vs IOMMU
  2015-10-26  5:13         ` David Woodhouse
@ 2015-10-26  5:20           ` Joerg Roedel
  0 siblings, 0 replies; 9+ messages in thread
From: Joerg Roedel @ 2015-10-26  5:20 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Paolo Bonzini, m.smarduch, ksummit-discuss

On Mon, Oct 26, 2015 at 02:13:42PM +0900, David Woodhouse wrote:
> Oh, wow. I didn't realise we already had an IOMMU implemented in Qemu.
> 
> At first glance it looks like it doesn't support assigned devices...
> has anyone looked at doing so?

Not sure, maybe Paolo knows. When it is implemented in qemu too using
vfio, we should get the reduced pinning for free.


	Joerg

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Ksummit-discuss] Short topic: virtio vs IOMMU
  2015-10-26  5:04       ` Joerg Roedel
  2015-10-26  5:13         ` David Woodhouse
@ 2015-10-26  6:03         ` Andy Lutomirski
  1 sibling, 0 replies; 9+ messages in thread
From: Andy Lutomirski @ 2015-10-26  6:03 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Paolo Bonzini, ksummit-discuss, m.smarduch

[-- Attachment #1: Type: text/plain, Size: 863 bytes --]

On Oct 26, 2015 2:04 PM, "Joerg Roedel" <joro@8bytes.org> wrote:
>
> On Mon, Oct 26, 2015 at 01:48:02PM +0900, David Woodhouse wrote:
> > It would be useful to have an emulated IOMMU, full stop. And yeah, it
> > might actually make sense to *start* by using it for purely virtual
> > devices, [...]
>
> Sure, I think this is what qemu provides already, except for the virtio
> devices (which are also emulated). I think it would be cool to have
> virtio translated by the emulated iommu too (at least optional).

Are we willing to break the existing (experimental?)
untranslated-but-still-behind-IOMMU case?  Or can we fix up the DMAR tables
to make it keep working?

I'm not volunteering to write the QEMU part, and I'm not an expert on DMAR,
but I have patches for the pre-1.0 kernel part, and doing the modern
virtio-pci case would be straightforward.

--Andy

[-- Attachment #2: Type: text/html, Size: 1081 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-10-26  6:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-26  2:55 [Ksummit-discuss] Short topic: virtio vs IOMMU Andy Lutomirski
2015-10-26  4:31 ` David Woodhouse
2015-10-26  4:43   ` Joerg Roedel
2015-10-26  4:48     ` David Woodhouse
2015-10-26  5:04       ` Joerg Roedel
2015-10-26  5:13         ` David Woodhouse
2015-10-26  5:20           ` Joerg Roedel
2015-10-26  6:03         ` Andy Lutomirski
2015-10-26  4:38 ` Joerg Roedel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.