Re: [PATCH RFC 10/15] hw/virtio/vhost-shadow-virtqueue: range boundary in translation

Stefan Hajnoczi <[email protected]> Tue, 28 Jul 2026 11:34:43 -0400
Newsgroups dev.linux.lists.virtio-fs,org.nongnu.qemu-devel
Message-ID <20260728153443.GH371693@fedora>
--eti39NJJ1w8JEReO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jul 23, 2026 at 03:30:09PM -0700, Connor Kite wrote:
> iova-tree expects inclusive range sizing when maps are allocated or searc=
hed.
> Currently, svqs use exclusive sizing when searching their
> vhost-iova-tree for a match to the region to be translated.  This could
> lead to errors if the region to be translated is at the edge of an iova
> region.
>=20
> Fix this by reducing `needle.size` by 1 in
> vhost_svq_translate_addr to bring then it line with DMAMap and iova-tree
> convention.
>=20
> Signed-off-by: Connor Kite <[email protected]>
> ---
>  hw/virtio/vhost-shadow-virtqueue.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <[email protected]>

--eti39NJJ1w8JEReO
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmpozBMACgkQnKSrs4Gr
c8izowf/U64p6OABThy11Z3fSW1rmXEl6Jrd7XezbfHbOKColkSAkObbzoE0UooI
zEUJUK3xgnTg5eTmYBfJt7KlROkw4hCbE5IFi6/Cga1Wwy5FdTIHjWpEz1KrYstE
o7qkGETt4hN5fTSCGYzbUqrTtH0mkazVnrfTQEiDfTDUNw1uf2A+9flfS8HBeqt3
Vt2rO0KlSOghWg4eOq0jXvVHu1PNV4vSiO0Y9xgNxcR0BcUIqsIvpzpYwORk+pCp
CuegZKktdLHsJPyrOfAhzbJNOjF1MM2Fg8ve+duMk/ylrQYI8Kc8SfR8EzNXZDsH
AbsjyIybOyIO0Qud6z0irH+hOynbEg==
=3T2c
-----END PGP SIGNATURE-----

--eti39NJJ1w8JEReO--