Re: [PATCH RFC 00/15] vhost-user: isolated memory

Stefan Hajnoczi <[email protected]> Mon, 27 Jul 2026 14:23:24 -0400
Newsgroups dev.linux.lists.virtio-fs,org.nongnu.qemu-devel
Message-ID <20260727182324.GA371693@fedora>
--7gZyb6NXvQiWaoF9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jul 25, 2026 at 12:45:08PM +0900, Akihiko Odaki wrote:
> I also hope this could fix vhost-user for TCG:
> https://gitlab.com/qemu-project/qemu/-/work_items/2092
>=20
> Perhaps the memory isolation should be enabled by default for TCG.

If I understand the bug correctly, TCG needs the dirty bitmap to be
up-to-date and vhost-user's dirty logging mechanism does not suffice.
Memory isolation would keep the dirty bitmap up-to-date but copying data
between guest RAM and the isolated memory would add overhead.

For the TCG use case it should be possible to use just
vhost-shadow-virtqueue.c without isolated memory so that
vhost_svq_flush() -> virtqueue_fill() -> virtqueue_unmap_sg() ->
dma_memory_unmap() keeps the dirty bitmap updated. There is still an
overhead because the virtqueue kick/call is intercepted by QEMU, but
there is no memcpy.

The TCG use case is something that could be tackled once memory
isolation is finished. If no one has time to implement the pure svq
solution for TCG, then memory isolation could be used in any case.

Stefan

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

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

iQEzBAEBCgAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmpnohwACgkQnKSrs4Gr
c8jIxQgAuhwfSxCzUAdPtmkhQFxI+8GOr3btP712SYvxsAHGWWd4zJ53QTx8uue5
ElpE2sc3AGz1CX++E+AcyrOI2Ut1wnsiAF42M3Zx5eHfpi7X4MEjf2uDUcxcAiEb
RMjgfDl7gOBll5xnICbtouc3N+5PL9KyFXhLV4/kVsS8EamcCfO+X+N82jDxVhFG
gDUUuBWNk2kqla8RffqOO63ccVkWTDwUYnfWWBAC+urVi8E+QGh8RgnW6NS0hXPU
ElgGeB0pRrbfow60Rbd8tQxeF3mLifE3dd9AJTonR7Ivf3CrSvhv7EgdOCiczEQr
Sx+vK5c7gHAJizeupduM8aZCfV9S2g==
=3WQy
-----END PGP SIGNATURE-----

--7gZyb6NXvQiWaoF9--