From: Steven Sistare <steven.sistare@oracle.com>
To: Zhenzhong Duan <zhenzhong.duan@intel.com>, qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, clg@redhat.com, eric.auger@redhat.com
Subject: Re: [PATCH 3/5] vfio/iommufd: Save cpr.ioas_id on source side for CPR transfer
Date: Fri, 26 Sep 2025 09:55:51 -0400 [thread overview]
Message-ID: <b13f895c-3808-43fd-9aa4-602e05227662@oracle.com> (raw)
In-Reply-To: <20250926022348.1883776-4-zhenzhong.duan@intel.com>
On 9/25/2025 10:23 PM, Zhenzhong Duan wrote:
> On source side, if there are more than one VFIO devices and they
> attach to same container, only the first device saves cpr.ioas_id,
nit: sets cpr.ioas_id
> the others are bypassed. We should same it for each device, or
nit: set it> else only first device works.
>
> Fixes: 4296ee07455e ("vfio/iommufd: reconstruct device")
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Steve Sistare <steven.sistare@oracle.com>
Thanks for fixing this!
- Steve
> ---
> hw/vfio/iommufd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
> index 8c27222f75..103ff43426 100644
> --- a/hw/vfio/iommufd.c
> +++ b/hw/vfio/iommufd.c
> @@ -607,7 +607,6 @@ skip_ioas_alloc:
> container->be = vbasedev->iommufd;
> container->ioas_id = ioas_id;
> QLIST_INIT(&container->hwpt_list);
> - vbasedev->cpr.ioas_id = ioas_id;
>
> bcontainer = &container->bcontainer;
> vfio_address_space_insert(space, bcontainer);
> @@ -641,6 +640,8 @@ skip_ioas_alloc:
> bcontainer->initialized = true;
>
> found_container:
> + vbasedev->cpr.ioas_id = container->ioas_id;
> +
> ret = ioctl(devfd, VFIO_DEVICE_GET_INFO, &dev_info);
> if (ret) {
> error_setg_errno(errp, errno, "error getting device info");
next prev parent reply other threads:[~2025-09-26 13:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 2:23 [PATCH 0/5] VFIO: cpr-transfer fixes Zhenzhong Duan
2025-09-26 2:23 ` [PATCH 1/5] vfio/container: Remap only populated parts in a section Zhenzhong Duan
2025-09-26 13:25 ` Steven Sistare
2025-09-26 2:23 ` [PATCH 2/5] vfio/cpr-legacy: drop an erroneous assert Zhenzhong Duan
2025-09-26 13:25 ` Steven Sistare
2025-09-26 2:23 ` [PATCH 3/5] vfio/iommufd: Save cpr.ioas_id on source side for CPR transfer Zhenzhong Duan
2025-09-26 13:55 ` Steven Sistare [this message]
2025-09-26 2:23 ` [PATCH 4/5] vfio/iommufd: Restore vbasedev's reference to hwpt after " Zhenzhong Duan
2025-09-26 14:22 ` Steven Sistare
2025-09-27 16:09 ` [PATCH 0/5] VFIO: cpr-transfer fixes Cédric Le Goater
2025-09-28 8:15 ` Duan, Zhenzhong
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=b13f895c-3808-43fd-9aa4-602e05227662@oracle.com \
--to=steven.sistare@oracle.com \
--cc=alex.williamson@redhat.com \
--cc=clg@redhat.com \
--cc=eric.auger@redhat.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).