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

Re: [RFC PATCH 0/7] xeniface: Support batched foreign page mappings


  • To: Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx>, win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
  • Date: Sat, 21 Nov 2026 13:52:56 +0100
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:MIME-Version:Content-Type:In-Reply-To:References:Feedback-ID"
  • Delivery-date: Sat, 21 Nov 2026 12:53:02 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

On 10/11/2026 19:36, Rafał Wojdyła wrote:
> This series adapts xeniface GNTTAB interface v5 and exposes batched
> foreign page mapping operations to userspace.
> 
> The new buffered IOCTLs and synchronous xencontrol wrappers match
> the explicit lifecycle in xenbus: create a mapping, populate it
> in batches of up to 256 pages, obtain a user view, unmap batches,
> and finally destroy the empty mapping. Mapping IDs are scoped to
> the creating process and open file object. Batch status is reported
> separately from per-page results, so callers can inspect partial
> failures and manage continuation.
> 
> For callers that do not need partial results, a single-batch helper
> creates the mapping, maps its pages and obtains the user view in one
> request. Failed setup rolls back successful pages. Failed rollback
> remains owned by the driver even when no mapping ID was returned
> to the caller.
> 
> Whole-mapping release removes the virtual views, invalidates the ID
> and owns the remaining cleanup. It attempts every batch unmap and retains
> failed handles and mapping destruction for retry.
> 
> Driver-owned cleanup has a per-mapping no-progress deadline, defaulting
> to 60 seconds and configurable through a define. Deadline expiration
> is fatal, failed mappings cannot be safely forgotten or reused.
> 
> Event-channel contexts are reference-counted so deferred mapping cleanup
> retains the original notification target. The notification byte is cleared
> before removing the view, and the port notification follows destruction
> of that mapping.
> 
> Rafał Wojdyła (7):
>    xeniface: Avoid accessing grant IRPs after they are pended
>    xeniface: Match the grant request identifier mode in queue lookups
>    xeniface: Enforce read-only foreign page views

Patches 1,2,3 look good and as they are bug fixes, should be able to go 
in now, before the mapping series.

>    xeniface: Reference-count event channel contexts
>    xeniface: Use GNTTAB v5 interface and retain failed mapping cleanup
>    xeniface: Expose batch foreign page mappings to user mode
>    xeniface: Add a synchronous single batch foreign page mapping helper
> 
>   include/gnttab_interface.h  |  266 +++++++--
>   include/xencontrol.h        |  178 ++++++
>   include/xeniface_ioctls.h   |  193 +++++-
>   src/xencontrol/xencontrol.c |  263 +++++++++
>   src/xeniface.inf            |    6 +-
>   src/xeniface/fdo.c          |   37 ++
>   src/xeniface/fdo.h          |    9 +
>   src/xeniface/ioctl_evtchn.c |   60 +-
>   src/xeniface/ioctl_gnttab.c | 1116 ++++++++++++++++++++++++++---------
>   src/xeniface/ioctls.c       |   63 +-
>   src/xeniface/ioctls.h       |  184 +++++-
>   src/xeniface/irp_queue.c    |   15 +-
>   12 files changed, 2032 insertions(+), 358 deletions(-)
> 
> 
> base-commit: 858d09157c7031372e2abfef123010513c6d9842



--
Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

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