From: Jason Wang <jasowang@redhat.com>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: Jing Zhao <jinzhao@redhat.com>, Lei Yang <leiyang@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
Chao Yang <chayang@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] docs: Add '-device intel-iommu' entry
Date: Wed, 7 Jul 2021 11:35:43 +0800 [thread overview]
Message-ID: <5391f6ca-57de-473d-beee-408455ef70e3@redhat.com> (raw)
In-Reply-To: <20210611185500.343525-1-peterx@redhat.com>
在 2021/6/12 上午2:55, Peter Xu 写道:
> 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>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> qemu-options.hx | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 14258784b3a..4bb04243907 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -926,6 +926,38 @@ 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 in the guest.
I think we don't need "in the guest" here.
Other than this:
Reviewed-by: Jason Wang <jasowang@redhat.com>
Thanks
> It's required
> + to enable complete x2apic. Currently it only supports kvm
> + kernel-irqchip modes ``off`` or ``split``. Full kernel-irqchip is not
> + yet supported.
> +
> + ``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,
next prev parent reply other threads:[~2021-07-07 3:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 18:55 [PATCH] docs: Add '-device intel-iommu' entry Peter Xu
2021-07-06 21:06 ` Peter Xu
2021-07-07 3:35 ` Jason Wang [this message]
2021-07-07 15:27 ` Peter Xu
2021-07-07 9:29 ` Eric Auger
2021-07-07 15:35 ` Peter Xu
2021-07-08 8:59 ` Eric Auger
2021-07-07 10:36 ` Liu, Yi L
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5391f6ca-57de-473d-beee-408455ef70e3@redhat.com \
--to=jasowang@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=chayang@redhat.com \
--cc=jinzhao@redhat.com \
--cc=leiyang@redhat.com \
--cc=mst@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).