From: "Cédric Le Goater" <clg@redhat.com>
To: John Levon <john.levon@nutanix.com>, qemu-devel@nongnu.org
Cc: Alex Williamson <alex.williamson@redhat.com>,
Thanos Makatos <thanos.makatos@nutanix.com>,
Thomas Huth <thuth@redhat.com>,
Matthew Rosato <mjrosato@linux.ibm.com>,
Eric Farman <farman@linux.ibm.com>,
qemu-stable@nongnu.org, qemu-s390x@nongnu.org
Subject: Re: [PATCH 2/2] vfio: only check region info cache for initial regions
Date: Tue, 14 Oct 2025 21:20:18 +0200 [thread overview]
Message-ID: <0810aee1-b57d-4682-9455-92b1c8dd5715@redhat.com> (raw)
In-Reply-To: <20251014151227.2298892-3-john.levon@nutanix.com>
On 10/14/25 17:12, John Levon wrote:
> It is semantically valid for a VFIO device to increase the number of
> regions after initialization. In this case, we'd attempt to check for
> cached region info past the size of the ->reginfo array. Check for the
> region index and skip the cache in these cases.
>
> This also works around some VGPU use cases which appear to be a bug,
> where VFIO_DEVICE_QUERY_GFX_PLANE returns a region index beyond the
> reported ->num_regions.
>
> Fixes: 95cdb024 ("vfio: add region info cache")
> Signed-off-by: John Levon <john.levon@nutanix.com>
Cc: qemu-stable@nongnu.org
> ---
> hw/vfio/device.c | 27 +++++++++++++++++++--------
> 1 file changed, 19 insertions(+), 8 deletions(-)
>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
next prev parent reply other threads:[~2025-10-14 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 15:12 [PATCH 0/2] Fixes for vfio region cache John Levon
2025-10-14 15:12 ` [PATCH 1/2] vfio: rename field to "num_initial_regions" John Levon
2025-10-14 19:17 ` Cédric Le Goater
2025-10-14 15:12 ` [PATCH 2/2] vfio: only check region info cache for initial regions John Levon
2025-10-14 19:20 ` Cédric Le Goater [this message]
2025-10-14 15:24 ` [PATCH 0/2] Fixes for vfio region cache Alex Williamson
2025-10-14 19:20 ` Cédric Le Goater
2025-10-15 12:06 ` 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=0810aee1-b57d-4682-9455-92b1c8dd5715@redhat.com \
--to=clg@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=farman@linux.ibm.com \
--cc=john.levon@nutanix.com \
--cc=mjrosato@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=thanos.makatos@nutanix.com \
--cc=thuth@redhat.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).