[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 21/22] libxl/arm: Introduce domctl command for IOMMU vSID mapping
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Milan Djokic <milan_djokic@xxxxxxxx>
- Date: Thu, 12 Nov 2026 10:23:18 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FxoS37EGXz+MVs9RHxOKuPWx2brVhwlA60wLcjsF79E=; b=rN7in52U6PaDt9tsAu36OxK0KdO2d5iTbc1ke4LC1sVW8/qmmZmk56kSVijeyP2xBiFMp7elfRwUSeVItFp7PTbTMmshJD//FUdqTZfGUb70GxQFQ0RguL5PooaGR1R99v3op69GBETQncvgaaakAh6nojEs5XCrbVqomrv1plsmIuA0LsJjRfHxJ4Ln+wh5Rl7vIhcZTglIhs1WqN1wCbNf8vL2gCnGcf6Jf7aIdcQnGsK3AUe/WWWnB/O50wARrPtmAxrLE0BtcJ5WwKKewnR/2cB24P4nJjWuyI2B5diMbNbDui4eABROTVFmBgo+kG+7BkcMovB/cwLStWcP9A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sXmAmpoDltJ31XbEhFHVOvcgMRVVvIw5PncLLU+yMqpPuJVax1wmoertxrEaGYOzYMA87lQFCD0o4PxoBX0vQnbZAAioII2wgSYvpvyVJI9eIk3AcmESkCPdY5M/X/GQ0lLvD0i/JaxctIzz/ADyfxPFA0ceYcSPbQaHV86FdJoAvz64Bc1a+QuElaJDNeKtsC+1kV+FD2Abh2q+9ppg3BNis+wz1SWJff0CCKo1WKKEYLhtssG5FBd81GJZ+z9uHB7P7bWZD+Khyi1P5tgTs35SagHnXEyhf1MOej+5VxU6TB2CBTHbo1aZ62rievFKCmjM37WA5DRlXaMNFy2PNg==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 12 Nov 2026 09:23:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Jan,
On 11/4/26 07:32, Jan Beulich wrote:
On 03.11.2026 18:30, Milan Djokic wrote:
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -1279,6 +1279,26 @@ struct xen_domctl_get_domain_state {
uint64_t unique_id; /* Unique domain identifier. */
};
+/*
+ * XEN_DOMCTL_viommu_alloc_vsid_range
+ *
+ * Allocate guest vSID range and
+ * establish pSID->vSID mapping for target range and physical IOMMU (phandle).
+ * Allocated range is continous
+ */
+struct xen_domctl_viommu_alloc_vsid_range {
+ /* IN: Range first pSID */
+ uint32_t first_psid;
+ /* IN: Physical IOMMU phandle behind which the target device streams are
configured */
+ uint32_t phandle;
+ /* IN: Number of vSIDs to allocate */
+ uint16_t nr_sids;
+ /* padding, must be 0 */
+ uint16_t pad;
+ /* OUT: Mapped range first vSID */
+ uint32_t first_vsid;
+};
+
struct xen_domctl {
/* Stable domctl ops: interface_version is required to be 0. */
uint32_t cmd;
@@ -1371,6 +1391,7 @@ struct xen_domctl {
#define XEN_DOMCTL_gsi_permission 88
#define XEN_DOMCTL_set_llc_colors 89
#define XEN_DOMCTL_get_domain_state 90 /* stable interface */
+#define XEN_DOMCTL_viommu_alloc_vsid_range 91
#define XEN_DOMCTL_gdbsx_guestmemio 1000
#define XEN_DOMCTL_gdbsx_pausevcpu 1001
#define XEN_DOMCTL_gdbsx_unpausevcpu 1002
@@ -1439,6 +1460,7 @@ struct xen_domctl {
#endif
struct xen_domctl_set_llc_colors set_llc_colors;
struct xen_domctl_get_domain_state get_domain_state;
+ struct xen_domctl_viommu_alloc_vsid_range viommu_alloc_vsid_range;
uint8_t pad[128];
} u;
};
One way or another this new sub-op wants explicitly marking as Arm-only.
The specific interface doesn't look like it might be meant to be arch-
independent, i.e. it's not just the fact that only Arm implements the
sub-op for now.
Agreed. This operation is specific to the ARM vIOMMU implementation, so
it makes sense to explicitly mark it as ARM-only. I'll update this by
guarding the sub-op structure definition, similarly to other
architecture-specific operations.
In theory, this operation could also be used for future RISC-V vIOMMU
support, but I think that's a long shot at this point.
Jan
BR,
Milan
|