]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commit
Add gnttab IOCTLs that allow sharing already existing memory
authorRafał Wojdyła <omeg@invisiblethingslab.com>
Tue, 12 Dec 2023 09:38:47 +0000 (10:38 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Fri, 15 Dec 2023 16:43:51 +0000 (16:43 +0000)
commitc4d028ea8a3ac123a9c361bd47f810db1b734b85
treec4a319ad1ae5dfc3a6517b786a3b279df96644be
parent40417bd27a6ccf0db397a6710141c43db3482d15
Add gnttab IOCTLs that allow sharing already existing memory

IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS shares pages that are
newly allocated by the driver. This commit adds new IOCTLs:
IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2,
IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_V2,
IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2
and IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_V2.

IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2 allows specifying
user-mode address of a memory region that will be shared
(the region is locked for the duration).

All _V2 IOCTLs use user-mode address of the shared region
as a unique (per-process) request identifier. This differs from
the existing IOCTLs that use client-supplied RequestId. _V2 IOCTLs
should be considered as preferable since they don't require
the client to manage IDs.

Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
Changed STATUS_INSUFFICIENT_VIRTUAL_ADDR_RESOURCES to
STATUS_INSUFFICIENT_RESOURCES to fix the build.

Signed-off-by: Paul Durrant <paul@xen.org>
include/xeniface_ioctls.h
src/xeniface/ioctl_gnttab.c
src/xeniface/ioctls.c
src/xeniface/ioctls.h
src/xeniface/irp_queue.c
src/xeniface/irp_queue.h