[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 05/25] ppc/xive: Introduce a XiveFabric interface
From: |
Cédric Le Goater |
Subject: |
[Qemu-devel] [PATCH v4 05/25] ppc/xive: Introduce a XiveFabric interface |
Date: |
Wed, 18 Sep 2019 18:06:25 +0200 |
The XiveFabric QOM interface should be implemented by the machine. It
acts as the PowerBUS interface between the interrupt controller and
the system. On HW, the XIVE sub-engine is responsible for the
communication with the other chip is the Common Queue (CQ) bridge
unit.
This interface offers a 'match_nvt' handler to perform the CAM line
matching when looking for a XIVE Presenter with a dispatched NVT.
Signed-off-by: Cédric Le Goater <address@hidden>
---
include/hw/ppc/xive.h | 22 ++++++++++++++++++++++
hw/intc/xive.c | 10 ++++++++++
2 files changed, 32 insertions(+)
diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h
index 39de45b87cb9..3c2910e10e25 100644
--- a/include/hw/ppc/xive.h
+++ b/include/hw/ppc/xive.h
@@ -399,6 +399,28 @@ int xive_presenter_tctx_match(XivePresenter *xptr,
XiveTCTX *tctx,
uint8_t nvt_blk, uint32_t nvt_idx,
bool cam_ignore, uint32_t logic_serv);
+/*
+ * XIVE Fabric (Interface between Interrupt Controller and Machine)
+ */
+
+typedef struct XiveFabric XiveFabric;
+
+#define TYPE_XIVE_FABRIC "xive-fabric"
+#define XIVE_FABRIC(obj) \
+ INTERFACE_CHECK(XiveFabric, (obj), TYPE_XIVE_FABRIC)
+#define XIVE_FABRIC_CLASS(klass) \
+ OBJECT_CLASS_CHECK(XiveFabricClass, (klass), TYPE_XIVE_FABRIC)
+#define XIVE_FABRIC_GET_CLASS(obj) \
+ OBJECT_GET_CLASS(XiveFabricClass, (obj), TYPE_XIVE_FABRIC)
+
+typedef struct XiveFabricClass {
+ InterfaceClass parent;
+ int (*match_nvt)(XiveFabric *xfb, uint8_t format,
+ uint8_t nvt_blk, uint32_t nvt_idx,
+ bool cam_ignore, uint8_t priority,
+ uint32_t logic_serv, XiveTCTXMatch *match);
+} XiveFabricClass;
+
/*
* XIVE END ESBs
*/
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index fff50429f8ac..7a15a64ed7fe 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -1841,8 +1841,18 @@ static const TypeInfo xive_presenter_info = {
.class_size = sizeof(XivePresenterClass),
};
+/*
+ * XIVE Fabric
+ */
+static const TypeInfo xive_fabric_info = {
+ .name = TYPE_XIVE_FABRIC,
+ .parent = TYPE_INTERFACE,
+ .class_size = sizeof(XiveFabricClass),
+};
+
static void xive_register_types(void)
{
+ type_register_static(&xive_fabric_info);
type_register_static(&xive_source_info);
type_register_static(&xive_notifier_info);
type_register_static(&xive_presenter_info);
--
2.21.0
- [Qemu-devel] [PATCH v4 00/25] ppc/pnv: add XIVE support for KVM guests, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 01/25] ppc/xive: Introduce a XivePresenter interface, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 02/25] ppc/xive: Implement the XivePresenter interface, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 03/25] ppc/pnv: Introduce a PNV_CHIP_CPU_FOREACH() helper, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 04/25] ppc/pnv: Introduce a pnv_xive_is_cpu_enabled() helper, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 05/25] ppc/xive: Introduce a XiveFabric interface,
Cédric Le Goater <=
- [Qemu-devel] [PATCH v4 06/25] ppc/pnv: Implement the XiveFabric interface, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 07/25] ppc/spapr: Implement the XiveFabric interface, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 08/25] ppc/xive: Use the XiveFabric and XivePresenter interfaces, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 09/25] ppc/xive: Extend the TIMA operation with a XivePresenter parameter, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 10/25] ppc/pnv: Clarify how the TIMA is accessed on a multichip system, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 11/25] ppc/xive: Move the TIMA operations to the controller model, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 12/25] ppc/xive: Remove the get_tctx() XiveRouter handler, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 13/25] ppc/xive: Introduce a xive_tctx_ipb_update() helper, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 14/25] ppc/xive: Introduce helpers for the NVT id, Cédric Le Goater, 2019/09/18
- [Qemu-devel] [PATCH v4 15/25] ppc/xive: Synthesize interrupt from the saved IPB in the NVT, Cédric Le Goater, 2019/09/18