[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v1 02/15] hw/xen: Add emulated evtchn ops
From: |
David Woodhouse |
Subject: |
[RFC PATCH v1 02/15] hw/xen: Add emulated evtchn ops |
Date: |
Tue, 10 Jan 2023 12:37:41 +0000 |
From: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
hw/i386/kvm/xen_evtchn.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c
index 98a47066bc..084249c56d 100644
--- a/hw/i386/kvm/xen_evtchn.c
+++ b/hw/i386/kvm/xen_evtchn.c
@@ -30,6 +30,7 @@
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/irq.h"
+#include "hw/xen/xen_backend_ops.h"
#include "xen_evtchn.h"
#include "xen_overlay.h"
@@ -196,6 +197,17 @@ static const TypeInfo xen_evtchn_info = {
.class_init = xen_evtchn_class_init,
};
+static struct evtchn_backend_ops emu_evtchn_backend_ops = {
+ .open = xen_be_evtchn_open,
+ .bind_interdomain = xen_be_evtchn_bind_interdomain,
+ .unbind = xen_be_evtchn_unbind,
+ .close = xen_be_evtchn_close,
+ .get_fd = xen_be_evtchn_fd,
+ .notify = xen_be_evtchn_notify,
+ .unmask = xen_be_evtchn_unmask,
+ .pending = xen_be_evtchn_pending,
+};
+
void xen_evtchn_create(void)
{
XenEvtchnState *s = XEN_EVTCHN(sysbus_create_simple(TYPE_XEN_EVTCHN,
@@ -209,6 +221,9 @@ void xen_evtchn_create(void)
for (i = 0; i < GSI_NUM_PINS; i++) {
sysbus_init_irq(SYS_BUS_DEVICE(s), &s->gsis[i]);
}
+
+ /* Set event channel functions for backend drivers to use */
+ xen_evtchn_ops = &emu_evtchn_backend_ops;
}
void xen_evtchn_connect_gsis(qemu_irq *system_gsis)
--
2.35.3
- [RFC PATCH v1 09/15] hw/xen: Rename xen_common.h to xen_native.h, (continued)
- [RFC PATCH v1 09/15] hw/xen: Rename xen_common.h to xen_native.h, David Woodhouse, 2023/01/10
- [RFC PATCH v1 15/15] i386/xen: Initialize XenBus and legacy backends from pc_init1(), David Woodhouse, 2023/01/10
- [RFC PATCH v1 14/15] hw/xen: Remove old version of Xen headers, David Woodhouse, 2023/01/10
- [RFC PATCH v1 12/15] hw/xen: Add backend implementation of grant table operations, David Woodhouse, 2023/01/10
- [RFC PATCH v1 04/15] hw/xen: Pass grant ref to gnttab unmap, David Woodhouse, 2023/01/10
- [RFC PATCH v1 13/15] hw/xen: Implement soft reset for emulated gnttab, David Woodhouse, 2023/01/10
- [RFC PATCH v1 07/15] hw/xen: Move xenstore_store_pv_console_info to xen_console.c, David Woodhouse, 2023/01/10
- [RFC PATCH v1 03/15] hw/xen: Add gnttab operations to allow redirection to internal emulation, David Woodhouse, 2023/01/10
- [RFC PATCH v1 06/15] hw/xen: Add xenstore operations to allow redirection to internal emulation, David Woodhouse, 2023/01/10
- [RFC PATCH v1 01/15] hw/xen: Add evtchn operations to allow redirection to internal emulation, David Woodhouse, 2023/01/10
- [RFC PATCH v1 02/15] hw/xen: Add emulated evtchn ops,
David Woodhouse <=
- Re: [RFC PATCH v1 00/15] Xen PV backend support for KVM/Xen guests, Joao Martins, 2023/01/10