diff mbox series

[v2,8/8] docs: Add '-device virtio-iommu' entry

Message ID 20210903143208.2434284-9-jean-philippe@linaro.org
State New
Headers show
Series virtio-iommu: Add ACPI support | expand

Commit Message

Jean-Philippe Brucker Sept. 3, 2021, 2:32 p.m. UTC
Document the virtio-iommu device for qemu-system-x86_64. In particular
note the lack of interrupt remapping, which may be an important
limitation on x86.

Suggested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

---
 qemu-options.hx | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.33.0

Comments

Eric Auger Sept. 6, 2021, 2:41 p.m. UTC | #1
Hi Jean,

On 9/3/21 4:32 PM, Jean-Philippe Brucker wrote:
> Document the virtio-iommu device for qemu-system-x86_64. In particular

Nit: this is not only for qemu-system-x86_6. This also documents the
option usage for aarch64. Only the interrupt remapping note is x86-64
specific.

I think it also would be worth to mention the interaction with the
bypass iommu option as you mention "for all devices".

Thanks

Eric
> note the lack of interrupt remapping, which may be an important

> limitation on x86.

>

> Suggested-by: Eric Auger <eric.auger@redhat.com>

> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

> ---

>  qemu-options.hx | 3 +++

>  1 file changed, 3 insertions(+)

>

> diff --git a/qemu-options.hx b/qemu-options.hx

> index 83aa59a920..9a1906a748 100644

> --- a/qemu-options.hx

> +++ b/qemu-options.hx

> @@ -976,6 +976,9 @@ SRST

>      Please also refer to the wiki page for general scenarios of VT-d

>      emulation in QEMU: https://wiki.qemu.org/Features/VT-d.

>  

> +``-device virtio-iommu``

> +    Enable a paravirtual IOMMU, that manages DMA isolation and remapping

> +    for all PCI devices, but does not support interrupt remapping.

>  ERST

>  

>  DEF("name", HAS_ARG, QEMU_OPTION_name,
Daniel P. Berrangé Sept. 6, 2021, 2:45 p.m. UTC | #2
On Fri, Sep 03, 2021 at 04:32:09PM +0200, Jean-Philippe Brucker wrote:
> Document the virtio-iommu device for qemu-system-x86_64. In particular

> note the lack of interrupt remapping, which may be an important

> limitation on x86.

> 

> Suggested-by: Eric Auger <eric.auger@redhat.com>

> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

> ---

>  qemu-options.hx | 3 +++

>  1 file changed, 3 insertions(+)

> 

> diff --git a/qemu-options.hx b/qemu-options.hx

> index 83aa59a920..9a1906a748 100644

> --- a/qemu-options.hx

> +++ b/qemu-options.hx

> @@ -976,6 +976,9 @@ SRST

>      Please also refer to the wiki page for general scenarios of VT-d

>      emulation in QEMU: https://wiki.qemu.org/Features/VT-d.

>  

> +``-device virtio-iommu``

> +    Enable a paravirtual IOMMU, that manages DMA isolation and remapping

> +    for all PCI devices, but does not support interrupt remapping.


It would be desirable to document why this is better/worse/equiv to
the intel-iommu device documented just before, so that people have a
better idea of which they should be trying to use.

I'm going to assume intel-iommu is more likely to "just work" out of
the box since it models real hardware that OS are likely to already
support ?  Is that right though ?


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Eric Auger Sept. 6, 2021, 3 p.m. UTC | #3
Hi,

On 9/3/21 4:32 PM, Jean-Philippe Brucker wrote:
> Document the virtio-iommu device for qemu-system-x86_64. In particular

> note the lack of interrupt remapping, which may be an important

> limitation on x86.

>

> Suggested-by: Eric Auger <eric.auger@redhat.com>

> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

> ---

>  qemu-options.hx | 3 +++

>  1 file changed, 3 insertions(+)

>

> diff --git a/qemu-options.hx b/qemu-options.hx

> index 83aa59a920..9a1906a748 100644

> --- a/qemu-options.hx

> +++ b/qemu-options.hx

> @@ -976,6 +976,9 @@ SRST

>      Please also refer to the wiki page for general scenarios of VT-d

>      emulation in QEMU: https://wiki.qemu.org/Features/VT-d.

>  

> +``-device virtio-iommu``

> +    Enable a paravirtual IOMMU, that manages DMA isolation and remapping

> +    for all PCI devices, but does not support interrupt remapping.

maybe you should also document which machines do support the
virtio-iommu (as done for intel-iommu). By the way intel-iommu only is
supported on q35. Is it the same for the virtio-iommu. I think we should
restrict the virtio-iommu to q35 too

Thanks

Eric
>  ERST

>  

>  DEF("name", HAS_ARG, QEMU_OPTION_name,
Jean-Philippe Brucker Sept. 8, 2021, 10:14 a.m. UTC | #4
On Mon, Sep 06, 2021 at 03:45:28PM +0100, Daniel P. Berrangé wrote:
> On Fri, Sep 03, 2021 at 04:32:09PM +0200, Jean-Philippe Brucker wrote:

> > Document the virtio-iommu device for qemu-system-x86_64. In particular

> > note the lack of interrupt remapping, which may be an important

> > limitation on x86.

> > 

> > Suggested-by: Eric Auger <eric.auger@redhat.com>

> > Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

> > ---

> >  qemu-options.hx | 3 +++

> >  1 file changed, 3 insertions(+)

> > 

> > diff --git a/qemu-options.hx b/qemu-options.hx

> > index 83aa59a920..9a1906a748 100644

> > --- a/qemu-options.hx

> > +++ b/qemu-options.hx

> > @@ -976,6 +976,9 @@ SRST

> >      Please also refer to the wiki page for general scenarios of VT-d

> >      emulation in QEMU: https://wiki.qemu.org/Features/VT-d.

> >  

> > +``-device virtio-iommu``

> > +    Enable a paravirtual IOMMU, that manages DMA isolation and remapping

> > +    for all PCI devices, but does not support interrupt remapping.

> 

> It would be desirable to document why this is better/worse/equiv to

> the intel-iommu device documented just before, so that people have a

> better idea of which they should be trying to use.

> 

> I'm going to assume intel-iommu is more likely to "just work" out of

> the box since it models real hardware that OS are likely to already

> support ?  Is that right though ?


That's right, and there isn't much point in using virtio-iommu on q35 at
the moment, we're still laying the foundation. It only implements caching
mode for now so it complements the vSMMU on arm which doesn't have that,
but on x86 QEMU it doesn't add anything useful. There are extensions to
get better performance for different type of endpoint, and other features,
but those are all work in progress.

I thinks I'll just drop the documentation patch until the device is more
mature and I have something useful to write here. The other IOMMUs are not
described either at the moment. x86 users will just instantiate the
intel-iommu as usual if they need an IOMMU.

Thanks,
Jean
diff mbox series

Patch

diff --git a/qemu-options.hx b/qemu-options.hx
index 83aa59a920..9a1906a748 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -976,6 +976,9 @@  SRST
     Please also refer to the wiki page for general scenarios of VT-d
     emulation in QEMU: https://wiki.qemu.org/Features/VT-d.
 
+``-device virtio-iommu``
+    Enable a paravirtual IOMMU, that manages DMA isolation and remapping
+    for all PCI devices, but does not support interrupt remapping.
 ERST
 
 DEF("name", HAS_ARG, QEMU_OPTION_name,