* [PATCH v2] docs: Add '-device intel-iommu' entry
@ 2021-07-07 15:41 Peter Xu
2021-07-07 22:17 ` Maxim Levitsky
2021-07-11 9:08 ` Eric Auger
0 siblings, 2 replies; 5+ messages in thread
From: Peter Xu @ 2021-07-07 15:41 UTC (permalink / raw)
To: qemu-devel
Cc: Yi Liu, Michael S . Tsirkin, Jason Wang, peterx, Alex Williamson,
Jing Zhao, Lei Yang, Chao Yang
The parameters of intel-iommu device are non-trivial to understand. Add an
entry for it so that people can reference to it when using.
There're actually a few more options there, but I hide them explicitly because
they shouldn't be used by normal QEMU users.
Cc: Chao Yang <chayang@redhat.com>
Cc: Lei Yang <leiyang@redhat.com>
Cc: Jing Zhao <jinzhao@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
v2:
- Drop "in the guest" in intremap entry [Jason]
- Explain how the default value of intremap is chosen [Eric]
- Add r-bs for Jason and Yi
Signed-off-by: Peter Xu <peterx@redhat.com>
---
qemu-options.hx | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index 8965dabc83..0fcc8973dd 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -926,6 +926,39 @@ SRST
``-device pci-ipmi-bt,bmc=id``
Like the KCS interface, but defines a BT interface on the PCI bus.
+
+``-device intel-iommu[,option=...]``
+ This is only supported by ``-machine q35``, which will enable Intel VT-d
+ emulation within the guest. It supports below options:
+
+ ``intremap=on|off`` (default: auto)
+ This enables interrupt remapping feature. It's required to enable
+ complete x2apic. Currently it only supports kvm kernel-irqchip modes
+ ``off`` or ``split``, while full kernel-irqchip is not yet supported.
+ The default value is "auto", which will be decided by the mode of
+ kernel-irqchip.
+
+ ``caching-mode=on|off`` (default: off)
+ This enables caching mode for the VT-d emulated device. When
+ caching-mode is enabled, each guest DMA buffer mapping will generate an
+ IOTLB invalidation from the guest IOMMU driver to the vIOMMU device in
+ a synchronous way. It is required for ``-device vfio-pci`` to work
+ with the VT-d device, because host assigned devices requires to setup
+ the DMA mapping on the host before guest DMA starts.
+
+ ``device-iotlb=on|off`` (default: off)
+ This enables device-iotlb capability for the emulated VT-d device. So
+ far virtio/vhost should be the only real user for this parameter,
+ paired with ats=on configured for the device.
+
+ ``aw-bits=39|48`` (default: 39)
+ This decides the address width of IOVA address space. The address
+ space has 39 bits width for 3-level IOMMU page tables, and 48 bits for
+ 4-level IOMMU page tables.
+
+ Please also refer to the wiki page for general scenarios of VT-d
+ emulation in QEMU: https://wiki.qemu.org/Features/VT-d.
+
ERST
DEF("name", HAS_ARG, QEMU_OPTION_name,
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] docs: Add '-device intel-iommu' entry
2021-07-07 15:41 [PATCH v2] docs: Add '-device intel-iommu' entry Peter Xu
@ 2021-07-07 22:17 ` Maxim Levitsky
2021-07-08 20:28 ` Peter Xu
2021-07-11 9:08 ` Eric Auger
1 sibling, 1 reply; 5+ messages in thread
From: Maxim Levitsky @ 2021-07-07 22:17 UTC (permalink / raw)
To: Peter Xu, qemu-devel
Cc: Yi Liu, Michael S . Tsirkin, Jason Wang, Alex Williamson,
Lei Yang, Jing Zhao, Chao Yang
On Wed, 2021-07-07 at 11:41 -0400, Peter Xu wrote:
> The parameters of intel-iommu device are non-trivial to understand. Add an
> entry for it so that people can reference to it when using.
>
> There're actually a few more options there, but I hide them explicitly because
> they shouldn't be used by normal QEMU users.
>
> Cc: Chao Yang <chayang@redhat.com>
> Cc: Lei Yang <leiyang@redhat.com>
> Cc: Jing Zhao <jinzhao@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Reviewed-by: Jason Wang <jasowang@redhat.com>
> Reviewed-by: Yi Liu <yi.l.liu@intel.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> v2:
> - Drop "in the guest" in intremap entry [Jason]
> - Explain how the default value of intremap is chosen [Eric]
> - Add r-bs for Jason and Yi
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> qemu-options.hx | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 8965dabc83..0fcc8973dd 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -926,6 +926,39 @@ SRST
>
> ``-device pci-ipmi-bt,bmc=id``
> Like the KCS interface, but defines a BT interface on the PCI bus.
> +
> +``-device intel-iommu[,option=...]``
> + This is only supported by ``-machine q35``, which will enable Intel VT-d
> + emulation within the guest. It supports below options:
> +
> + ``intremap=on|off`` (default: auto)
> + This enables interrupt remapping feature. It's required to enable
> + complete x2apic. Currently it only supports kvm kernel-irqchip modes
> + ``off`` or ``split``, while full kernel-irqchip is not yet supported.
> + The default value is "auto", which will be decided by the mode of
> + kernel-irqchip.
> +
> + ``caching-mode=on|off`` (default: off)
> + This enables caching mode for the VT-d emulated device. When
> + caching-mode is enabled, each guest DMA buffer mapping will generate an
> + IOTLB invalidation from the guest IOMMU driver to the vIOMMU device in
> + a synchronous way. It is required for ``-device vfio-pci`` to work
> + with the VT-d device, because host assigned devices requires to setup
> + the DMA mapping on the host before guest DMA starts.
> +
> + ``device-iotlb=on|off`` (default: off)
> + This enables device-iotlb capability for the emulated VT-d device. So
> + far virtio/vhost should be the only real user for this parameter,
> + paired with ats=on configured for the device.
> +
> + ``aw-bits=39|48`` (default: 39)
> + This decides the address width of IOVA address space. The address
> + space has 39 bits width for 3-level IOMMU page tables, and 48 bits for
> + 4-level IOMMU page tables.
> +
> + Please also refer to the wiki page for general scenarios of VT-d
> + emulation in QEMU: https://wiki.qemu.org/Features/VT-d.
> +
> ERST
>
> DEF("name", HAS_ARG, QEMU_OPTION_name,
As far as I know this looks very good.
Thanks for doing this!
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] docs: Add '-device intel-iommu' entry
2021-07-07 22:17 ` Maxim Levitsky
@ 2021-07-08 20:28 ` Peter Xu
2021-07-09 7:07 ` Michael S. Tsirkin
0 siblings, 1 reply; 5+ messages in thread
From: Peter Xu @ 2021-07-08 20:28 UTC (permalink / raw)
To: Maxim Levitsky, Michael S. Tsirkin
Cc: Yi Liu, Michael S . Tsirkin, Jason Wang, qemu-devel,
Alex Williamson, Jing Zhao, Lei Yang, Chao Yang
On Thu, Jul 08, 2021 at 01:17:50AM +0300, Maxim Levitsky wrote:
> As far as I know this looks very good.
> Thanks for doing this!
>
> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Thanks!
Michael - I just saw a pull req sent, so I wanted to double check: should this
patch go through your tree at last? Thanks,
--
Peter Xu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] docs: Add '-device intel-iommu' entry
2021-07-08 20:28 ` Peter Xu
@ 2021-07-09 7:07 ` Michael S. Tsirkin
0 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2021-07-09 7:07 UTC (permalink / raw)
To: Peter Xu
Cc: Yi Liu, Jason Wang, qemu-devel, Maxim Levitsky, Alex Williamson,
Jing Zhao, Lei Yang, Chao Yang
On Thu, Jul 08, 2021 at 04:28:01PM -0400, Peter Xu wrote:
> On Thu, Jul 08, 2021 at 01:17:50AM +0300, Maxim Levitsky wrote:
> > As far as I know this looks very good.
> > Thanks for doing this!
> >
> > Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
>
> Thanks!
>
> Michael - I just saw a pull req sent, so I wanted to double check: should this
> patch go through your tree at last? Thanks,
Sure. Will be in the next one.
> --
> Peter Xu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] docs: Add '-device intel-iommu' entry
2021-07-07 15:41 [PATCH v2] docs: Add '-device intel-iommu' entry Peter Xu
2021-07-07 22:17 ` Maxim Levitsky
@ 2021-07-11 9:08 ` Eric Auger
1 sibling, 0 replies; 5+ messages in thread
From: Eric Auger @ 2021-07-11 9:08 UTC (permalink / raw)
To: Peter Xu, qemu-devel
Cc: Yi Liu, Michael S . Tsirkin, Jason Wang, Alex Williamson,
Lei Yang, Jing Zhao, Chao Yang
Hi Peter,
On 7/7/21 5:41 PM, Peter Xu wrote:
> The parameters of intel-iommu device are non-trivial to understand. Add an
> entry for it so that people can reference to it when using.
>
> There're actually a few more options there, but I hide them explicitly because
> they shouldn't be used by normal QEMU users.
>
> Cc: Chao Yang <chayang@redhat.com>
> Cc: Lei Yang <leiyang@redhat.com>
> Cc: Jing Zhao <jinzhao@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Reviewed-by: Jason Wang <jasowang@redhat.com>
> Reviewed-by: Yi Liu <yi.l.liu@intel.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Thanks
Eric
> ---
> v2:
> - Drop "in the guest" in intremap entry [Jason]
> - Explain how the default value of intremap is chosen [Eric]
> - Add r-bs for Jason and Yi
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> qemu-options.hx | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 8965dabc83..0fcc8973dd 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -926,6 +926,39 @@ SRST
>
> ``-device pci-ipmi-bt,bmc=id``
> Like the KCS interface, but defines a BT interface on the PCI bus.
> +
> +``-device intel-iommu[,option=...]``
> + This is only supported by ``-machine q35``, which will enable Intel VT-d
> + emulation within the guest. It supports below options:
> +
> + ``intremap=on|off`` (default: auto)
> + This enables interrupt remapping feature. It's required to enable
> + complete x2apic. Currently it only supports kvm kernel-irqchip modes
> + ``off`` or ``split``, while full kernel-irqchip is not yet supported.
> + The default value is "auto", which will be decided by the mode of
> + kernel-irqchip.
> +
> + ``caching-mode=on|off`` (default: off)
> + This enables caching mode for the VT-d emulated device. When
> + caching-mode is enabled, each guest DMA buffer mapping will generate an
> + IOTLB invalidation from the guest IOMMU driver to the vIOMMU device in
> + a synchronous way. It is required for ``-device vfio-pci`` to work
> + with the VT-d device, because host assigned devices requires to setup
> + the DMA mapping on the host before guest DMA starts.
> +
> + ``device-iotlb=on|off`` (default: off)
> + This enables device-iotlb capability for the emulated VT-d device. So
> + far virtio/vhost should be the only real user for this parameter,
> + paired with ats=on configured for the device.
> +
> + ``aw-bits=39|48`` (default: 39)
> + This decides the address width of IOVA address space. The address
> + space has 39 bits width for 3-level IOMMU page tables, and 48 bits for
> + 4-level IOMMU page tables.
> +
> + Please also refer to the wiki page for general scenarios of VT-d
> + emulation in QEMU: https://wiki.qemu.org/Features/VT-d.
> +
> ERST
>
> DEF("name", HAS_ARG, QEMU_OPTION_name,
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-11 9:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 15:41 [PATCH v2] docs: Add '-device intel-iommu' entry Peter Xu
2021-07-07 22:17 ` Maxim Levitsky
2021-07-08 20:28 ` Peter Xu
2021-07-09 7:07 ` Michael S. Tsirkin
2021-07-11 9:08 ` Eric Auger
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.