|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XTF PATCH v1 06/15] common: add missing evtchn hypercalls
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |