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

[XTF PATCH v1 06/15] common: add missing evtchn hypercalls


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: dmukhin@xxxxxxxx
  • Date: Wed, 4 Nov 2026 17:38:08 -0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 205.220.161.53) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=ford.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ford.com; dkim=pass (signature was verified) header.d=saarlouis.ford.com; dkim=pass (signature was verified) header.d=ford.com; arc=none (0)
  • 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=IFmsiu+h+ub8blEeRWfanAwLjZ8dBPkcuMyJSicCH0c=; b=ggO8sUHmgf9y1wRmHIanblfTeA3FdF0RmJ4t2FomSPGAiEGt1igQYGyZrEvMitV1GRE3irHzLZ0dNGI8NznRi+wYDtsHLMS+ZYfdeVO2BSU0JuaS1ePcxJ25u/HWs6xNlAYixn2UbjMp2X2cpsLZlubJ+L1T6X80+8neaydjq6CNxXF0P4s3oFCEJZlDbfxo+KuJDh5fOSCccjg98mZmkXSt2lYuXWHo26qWlX5IsYQCD1YzU26CcDKPLKAQMn4juAiyjdB/qN8O0iFlWUx0CKJsAwoG8r3l3SImXVsTUvbV3AVXpz/taQElcPWODqkcpjkggkPCgdBqPxj1Gogy/A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=w5yQiGKsSpGN/YvMX8kqFgmw+a6g0XGbcNGmgGZyM+evLB5LtM/u3HwmIDBz5yNUtKz5Q4IGnLrEqBjfttvr1MGUHZeovogsIh0vJ82f9IlqL4cGEDlgR1AgI6Xew4/EJmn/jQf7QW5BZd4btJxkB4JWjNp5+tiZ907R6FvobBwl0IY+KLi1J2AOwiXMMZNdFtF5WLgM78ihtRFzoOY1jf7EVnuYeH93vMlodfgiUdrmoO8MBb9XDRkqqsmhdHWMchaEEfuq8imkTmphjb592/5mesHSkEs13yZjGf0GR6c6oe+sVBdRJw0DA4vkApCuGUOQIVCMtXfjE2tD5qM/sw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=ppford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=selector2-azureford-onmicrosoft-com header.d=azureford.onmicrosoft.com header.i="@azureford.onmicrosoft.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=ppserprodsaar header.d=saarlouis.ford.com header.i="@saarlouis.ford.com" header.h="Cc:Content-Transfer-Encoding:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=ppfserpocford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"
  • Cc: andrew.cooper3@xxxxxxxxxx, anthony.perard@xxxxxxxxxx, jbeulich@xxxxxxxx, julien@xxxxxxx, michal.orzel@xxxxxxx, roger@xxxxxxxxxxxxxx, sstabellini@xxxxxxxxxx, dmukhin@xxxxxxx, Denis Mukhin <dmukhin@xxxxxxxx>
  • Delivery-date: Thu, 05 Nov 2026 01:38:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Pser-m365-app: SER-APP

From: Denis Mukhin <dmukhin@xxxxxxxx>

Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
---
 include/xen/event_channel.h | 13 +++++++++++++
 include/xen/hvm/hvm_op.h    | 17 +++++++++++++++++
 include/xtf/hypercall.h     | 25 +++++++++++++++++++++++++
 3 files changed, 55 insertions(+)

diff --git a/include/xen/event_channel.h b/include/xen/event_channel.h
index 2068cc09eeba..734889356252 100644
--- a/include/xen/event_channel.h
+++ b/include/xen/event_channel.h
@@ -7,6 +7,8 @@
 #define EVTCHNOP_send             4
 #define EVTCHNOP_status           5
 #define EVTCHNOP_alloc_unbound    6
+#define EVTCHNOP_bind_ipi         7
+#define EVTCHNOP_unmask           9
 #define EVTCHNOP_init_control    11
 #define EVTCHNOP_expand_array    12
 
@@ -46,6 +48,17 @@ struct evtchn_alloc_unbound {
     evtchn_port_t port;
 };
 
+struct evtchn_bind_ipi {
+    uint32_t vcpu;
+    /* OUT parameters. */
+    evtchn_port_t port;
+};
+
+struct evtchn_unmask {
+    /* IN parameters. */
+    evtchn_port_t port;
+};
+
 struct evtchn_init_control {
     /* IN parameters. */
     uint64_t control_gfn;
diff --git a/include/xen/hvm/hvm_op.h b/include/xen/hvm/hvm_op.h
index 8c240d8d90b9..2b1866c7494c 100644
--- a/include/xen/hvm/hvm_op.h
+++ b/include/xen/hvm/hvm_op.h
@@ -15,6 +15,23 @@ struct xen_hvm_param {
 };
 typedef struct xen_hvm_param xen_hvm_param_t;
 
+#if defined(__i386__) || defined(__x86_64__)
+
+/*
+ * HVMOP_set_evtchn_upcall_vector: Set a <vector> that should be used for event
+ *                                 channel upcalls on the specified <vcpu>. If 
set,
+ *                                 this vector will be used in preference to 
the
+ *                                 domain global callback via (see
+ *                                 HVM_PARAM_CALLBACK_IRQ).
+ */
+#define HVMOP_set_evtchn_upcall_vector 23
+struct xen_hvm_evtchn_upcall_vector {
+    uint32_t vcpu;
+    uint8_t vector;
+};
+
+#endif /* defined(__i386__) || defined(__x86_64__) */
+
 #endif /* XEN_PUBLIC_HVM_HVM_OP_H */
 
 /*
diff --git a/include/xtf/hypercall.h b/include/xtf/hypercall.h
index 68b3da111d85..9d6d901d1668 100644
--- a/include/xtf/hypercall.h
+++ b/include/xtf/hypercall.h
@@ -241,6 +241,31 @@ static inline int hypercall_evtchn_alloc_unbound(struct 
evtchn_alloc_unbound *ub
     return hypercall_event_channel_op(EVTCHNOP_alloc_unbound, ub);
 }
 
+static inline int hypercall_evtchn_bind_ipi(struct evtchn_bind_ipi *bind)
+{
+    return hypercall_event_channel_op(EVTCHNOP_bind_ipi, bind);
+}
+
+static inline int hypercall_evtchn_unmask(evtchn_port_t port)
+{
+    struct evtchn_unmask unmask = {
+        .port = port,
+    };
+
+    return hypercall_event_channel_op(EVTCHNOP_unmask, &unmask);
+}
+
+static inline long hypercall_set_evtchn_upcall_vector(
+    unsigned int cpu, unsigned int vector)
+{
+    struct xen_hvm_evtchn_upcall_vector p = {
+        .vcpu = cpu,
+        .vector = vector,
+    };
+
+    return hypercall_hvm_op(HVMOP_set_evtchn_upcall_vector, &p);
+}
+
 static inline int hvm_set_param(unsigned int idx, uint64_t value)
 {
     xen_hvm_param_t p = { .domid = DOMID_SELF, .index = idx, .value = value };
-- 
2.55.0




 


Rackspace

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