[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 5/6] Add gnttab IOCTLs that allow sharing already existing memory


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Durrant, Paul" <xadimgnik@xxxxxxxxx>
  • Date: Fri, 15 Dec 2023 16:32:59 +0000
  • Delivery-date: Fri, 15 Dec 2023 16:33:06 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

On 12/12/2023 09:38, Rafał Wojdyła wrote:
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@xxxxxxxxxxxxxxxxxxxxxx>
---
  include/xeniface_ioctls.h   |  94 ++++-
  src/xeniface/ioctl_gnttab.c | 711 ++++++++++++++++++++++--------------
  src/xeniface/ioctls.c       |  25 +-
  src/xeniface/ioctls.h       |  75 ++--
  src/xeniface/irp_queue.c    |  27 +-
  src/xeniface/irp_queue.h    |   2 +-
  6 files changed, 596 insertions(+), 338 deletions(-)


Acked-by: Paul Durrant <paul@xxxxxxx>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.