From: "Cédric Le Goater" <clg@redhat.com>
To: Zhenzhong Duan <zhenzhong.duan@intel.com>, qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, chao.p.peng@intel.com
Subject: Re: [PATCH] vfio/iommufd: Add comment emphasizing no movement of hiod->realize() call
Date: Wed, 21 May 2025 15:12:31 +0200 [thread overview]
Message-ID: <3f22f6be-0683-43ac-b515-dc6c608972ec@redhat.com> (raw)
In-Reply-To: <20250521110301.3313877-1-zhenzhong.duan@intel.com>
On 5/21/25 13:03, Zhenzhong Duan wrote:
> The nested IOMMU support needs device and hwpt id which are generated
> only after attachment. Hiod encapsulates these information in realize()
> and passes to vIOMMU.
>
> Suggested-by: Cédric Le Goater <clg@redhat.com>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
> ---
> hw/vfio/iommufd.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
> index af1c7ab10a..6b2696793f 100644
> --- a/hw/vfio/iommufd.c
> +++ b/hw/vfio/iommufd.c
> @@ -592,6 +592,10 @@ found_container:
> goto err_listener_register;
> }
>
> + /*
> + * Do not move this code before attachment! The nested IOMMU support
> + * needs device and hwpt id which are generated only after attachment.
> + */
> if (!vfio_device_hiod_create_and_realize(vbasedev,
> TYPE_HOST_IOMMU_DEVICE_IOMMUFD_VFIO, errp)) {
> goto err_listener_register;
next prev parent reply other threads:[~2025-05-21 13:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 11:03 [PATCH] vfio/iommufd: Add comment emphasizing no movement of hiod->realize() call Zhenzhong Duan
2025-05-21 13:12 ` Cédric Le Goater [this message]
2025-05-21 15:26 ` Cédric Le Goater
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=3f22f6be-0683-43ac-b515-dc6c608972ec@redhat.com \
--to=clg@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=chao.p.peng@intel.com \
--cc=qemu-devel@nongnu.org \
--cc=zhenzhong.duan@intel.com \
/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).