Re: [PATCH v2] misc: vmw_zerocopy: Add VMware zero-copy buffer sharing driver

From: Greg KH

Date: Fri Jul 17 2026 - 09:45:03 EST


On Thu, Jun 18, 2026 at 11:10:34AM -0700, Rishi Chhibber wrote:
> This driver implements a misc character device (/dev/vmw_zc) that allows
> guest userspace applications to share pinned memory buffers with a
> VMware hypervisor-side peer using the VMCI datagram interface.
>
> The driver pins user pages via get_user_pages_fast(), transmits their
> physical page frame numbers to the hypervisor peer over VMCI, and avoids
> an intermediate copy between the guest workload VM and the hypervisor.
>
> The hypervisor-side peer for this interface only speaks VMCI; there is no
> virtio backend implemented on the VMware host for it. The closest
> existing upstream transport, vsock (virtio-vsock), provides a socket
> bytestream/datagram abstraction and does not expose a way to hand a set
> of pinned guest page frame numbers to the host for true zero-copy
> access; it would still require copying the payload through the socket.
> This driver's purpose is specifically to pin guest pages and pass their
> PFNs to the host so the payload is never copied. It also supports
> bundling multiple buffers in a single request, which is required for the
> all-or-none semantics of page-level zero-copy transfers.

Ah, wait, i see why this is needed. Why not just add the needed
functionality to virtio instead? Surely other hypervisors (like hyperv)
need/want to do this same thing? How do they do it? Through custom
drivers like this or through something else?

thanks,

greg k-h