public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
* [GSoC 2026] vhost-user memory isolation proposal feedback request
@ 2026-03-09 11:17 Han Zhang
  2026-03-09 16:40 ` Hanna Czenczek
  2026-03-24 17:26 ` Hanna Czenczek
  0 siblings, 2 replies; 5+ messages in thread
From: Han Zhang @ 2026-03-09 11:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha, tfanelli, hreitz

Hello,

My name is Han. I previously implemented a virtio-based communication
mechanism between confidential virtual machines, and based on that
experience I would like to apply for the QEMU GSoC 2026 project
"vhost-user memory isolation". Before finalizing my proposal, I would
like to check whether my understanding of the project direction is
correct.

My current understanding is:
without changing the existing vhost-user protocol, add a
memory-isolation mode for vhost-user devices so the backend no longer
directly accesses guest RAM. Instead, QEMU intercepts virtqueue
requests, copies data between guest RAM and isolated buffers, and
forwards notifications. The backend only sees QEMU-managed shadow
virtqueues and descriptors pointing to isolated buffers.

After reading the relevant code paths around vhost-user-blk and SVQ,
my current understanding of the required work is roughly:
1. Extend the generic SVQ path for the vhost-user case, including
adding a used_handler so completion handling can perform copy-back and
cleanup before returning requests to the guest virtqueue.
2. Move the SVQ vring memory to memfd-backed shared regions and
register them with the backend through add-mem-reg/rem-mem-reg, so the
userspace backend can access the shadow vring.
3. Allocate bounce or isolated buffers at the SVQ callback point, copy
data from the guest virtqueue into those buffers, forward rewritten
descriptors to the backend, and copy data back on completion.

I am mainly trying to validate whether this is the right architectural
direction, especially the split between generic reusable vhost-user
SVQ code and device-specific handling such as the vhost-user-blk
bounce-buffer path.

I would appreciate feedback on the following:
1. Is this interpretation of the core goal correct, especially "QEMU
performs data copy, backend only sees isolated memory + SVQ"?
2. For isolated buffers, is qemu_memfd_alloc + add-mem-reg the
preferred direction, or is there a better approach?
3. For code organization, what split is preferred between generic
vhost-user code and device-specific code (for example vhost-user-blk)?

This is my first time participating in an open source project, so I
would greatly appreciate any correction or guidance.

Thank you very much for your time.

Best regards,
Han


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-25 16:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 11:17 [GSoC 2026] vhost-user memory isolation proposal feedback request Han Zhang
2026-03-09 16:40 ` Hanna Czenczek
2026-03-24 17:26 ` Hanna Czenczek
2026-03-25  2:11   ` Han Zhang
2026-03-25 16:27     ` Hanna Czenczek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox