[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/62] i386/xen: implement HYPERVISOR_event_channel_op
From: |
Paolo Bonzini |
Subject: |
[PULL 24/62] i386/xen: implement HYPERVISOR_event_channel_op |
Date: |
Thu, 2 Mar 2023 13:29:51 +0100 |
From: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
[dwmw2: Ditch event_channel_op_compat which was never available to HVM guests]
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
---
target/i386/kvm/xen-emu.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/target/i386/kvm/xen-emu.c b/target/i386/kvm/xen-emu.c
index c0a8e4c34e70..ac143c05a441 100644
--- a/target/i386/kvm/xen-emu.c
+++ b/target/i386/kvm/xen-emu.c
@@ -28,6 +28,7 @@
#include "hw/xen/interface/memory.h"
#include "hw/xen/interface/hvm/hvm_op.h"
#include "hw/xen/interface/vcpu.h"
+#include "hw/xen/interface/event_channel.h"
#include "xen-compat.h"
@@ -588,6 +589,27 @@ static bool kvm_xen_hcall_vcpu_op(struct kvm_xen_exit
*exit, X86CPU *cpu,
return true;
}
+static bool kvm_xen_hcall_evtchn_op(struct kvm_xen_exit *exit,
+ int cmd, uint64_t arg)
+{
+ int err = -ENOSYS;
+
+ switch (cmd) {
+ case EVTCHNOP_init_control:
+ case EVTCHNOP_expand_array:
+ case EVTCHNOP_set_priority:
+ /* We do not support FIFO channels at this point */
+ err = -ENOSYS;
+ break;
+
+ default:
+ return false;
+ }
+
+ exit->u.hcall.result = err;
+ return true;
+}
+
int kvm_xen_soft_reset(void)
{
CPUState *cpu;
@@ -694,6 +716,9 @@ static bool do_kvm_xen_handle_exit(X86CPU *cpu, struct
kvm_xen_exit *exit)
case __HYPERVISOR_sched_op:
return kvm_xen_hcall_sched_op(exit, cpu, exit->u.hcall.params[0],
exit->u.hcall.params[1]);
+ case __HYPERVISOR_event_channel_op:
+ return kvm_xen_hcall_evtchn_op(exit, exit->u.hcall.params[0],
+ exit->u.hcall.params[1]);
case __HYPERVISOR_vcpu_op:
return kvm_xen_hcall_vcpu_op(exit, cpu,
exit->u.hcall.params[0],
--
2.39.1
- [PULL 39/62] i386/xen: add monitor commands to test event injection, (continued)
- [PULL 39/62] i386/xen: add monitor commands to test event injection, Paolo Bonzini, 2023/03/02
- [PULL 58/62] kvm/i386: Add xen-evtchn-max-pirq property, Paolo Bonzini, 2023/03/02
- [PULL 29/62] hw/xen: Implement EVTCHNOP_status, Paolo Bonzini, 2023/03/02
- [PULL 41/62] hw/xen: Support HVM_PARAM_CALLBACK_TYPE_PCI_INTX callback, Paolo Bonzini, 2023/03/02
- [PULL 22/62] i386/xen: handle VCPUOP_register_vcpu_time_info, Paolo Bonzini, 2023/03/02
- [PULL 42/62] kvm/i386: Add xen-gnttab-max-frames property, Paolo Bonzini, 2023/03/02
- [PULL 45/62] i386/xen: Implement HYPERVISOR_grant_table_op and GNTTABOP_[gs]et_verson, Paolo Bonzini, 2023/03/02
- [PULL 49/62] i386/xen: handle HVMOP_get_param, Paolo Bonzini, 2023/03/02
- [PULL 62/62] Makefile: qemu-bundle is a directory, Paolo Bonzini, 2023/03/02
- [PULL 23/62] i386/xen: handle VCPUOP_register_runstate_memory_area, Paolo Bonzini, 2023/03/02
- [PULL 24/62] i386/xen: implement HYPERVISOR_event_channel_op,
Paolo Bonzini <=
- [PULL 33/62] hw/xen: Implement EVTCHNOP_bind_ipi, Paolo Bonzini, 2023/03/02
- [PULL 30/62] hw/xen: Implement EVTCHNOP_close, Paolo Bonzini, 2023/03/02
- [PULL 35/62] hw/xen: Implement EVTCHNOP_alloc_unbound, Paolo Bonzini, 2023/03/02
- [PULL 37/62] hw/xen: Implement EVTCHNOP_bind_vcpu, Paolo Bonzini, 2023/03/02
- [PULL 40/62] hw/xen: Support HVM_PARAM_CALLBACK_TYPE_GSI callback, Paolo Bonzini, 2023/03/02
- [PULL 44/62] hw/xen: Support mapping grant frames, Paolo Bonzini, 2023/03/02
- [PULL 51/62] hw/xen: Add xen_xenstore device for xenstore emulation, Paolo Bonzini, 2023/03/02
- [PULL 47/62] i386/xen: handle PV timer hypercalls, Paolo Bonzini, 2023/03/02
- [PULL 48/62] i386/xen: Reserve Xen special pages for console, xenstore rings, Paolo Bonzini, 2023/03/02
- [PULL 50/62] hw/xen: Add backend implementation of interdomain event channel support, Paolo Bonzini, 2023/03/02