Skip to contentSkip to conversation

QEMU RISC-V AIA support

PATCH Applied Anup Patel 2 participants 7 messages Feb 20, 2022 – Feb 21, 2022

Subsystems (2)
lore
Share & tools
lore

Anup Patel

author
#0 lore raw

v10 cover QEMU RISC-V AIA support

From: Anup Patel <[email protected]>

The advanced interrupt architecture (AIA) extends the per-HART local interrupt support. Along with this, it also adds IMSIC (MSI contrllor) and Advanced PLIC (wired interrupt controller).

The latest AIA draft specification can be found here:
https://github.com/riscv/riscv-aia/releases/download/0.2-draft.28/riscv-interrupts-028.pdf

This series adds RISC-V AIA support in QEMU which includes emulating all AIA local CSRs, APLIC, and IMSIC. Only AIA local interrupt filtering is not implemented because we don't have any local interrupt greater than 12.

To enable AIA in QEMU, use one of the following:
1) Only AIA local interrupt CSRs: Pass "x-aia=true" as CPU paramenter in the QEMU command-line
2) Only APLIC for virt machine: Pass "aia=aplic" as machine parameter in the QEMU command-line
3) Both APLIC and IMSIC for virt machine: Pass "aia=aplic-imsic" as machine parameter in the QEMU command-line
4) Both APLIC and IMSIC with 2 guest files for virt machine: Pass "aia=aplic-imsic,aia-guests=2" as machine parameter in the QEMU command-line

To test series, we require Linux with AIA support which can be found in:
riscv_aia_v1 branch at https://github.com/avpatel/linux.git

This series can be found riscv_aia_v10 branch at:
https://github.com/avpatel/qemu.git

Changes since v9:
- Rebased on latest riscv-to-apply.next branch of Alistair's repo
- Removed first 18 PATCHs since these are already merged
- Fixed 32-bit system compile error in PATCH3

Changes since v8:
- Use error_setg() in riscv_imsic_realize() added by PATCH20

Changes since v7:
- Rebased on latest riscv-to-apply.next branch of Alistair's repo
- Improved default priority assignment in PATCH9

Changes since v6:
- Fixed priority comparison in riscv_cpu_pending_to_irq() of PATCH9
- Fixed typos in comments added by PATCH11
- Added "pend = true;" for CSR_MSETEIPNUM case of rmw_xsetclreinum() in PATCH15
- Handle ithreshold == 0 case in riscv_aplic_idc_topi() of PATCH18
- Allow setting pending bit for Level0 or Level1 interrupts in riscv_aplic_set_pending() of PATCH18
- Force DOMAINCFG[31:24] bits to 0x80 in riscv_aplic_read() of PATCH18
- For APLIC direct mode, set target.iprio to 1 when zero is writtern in PATCH18
- Handle eithreshold == 0 case in riscv_imsic_topei() of PATCH20

Changes since v5:
- Moved VSTOPI_NUM_SRCS define to top of the file in PATCH13
- Fixed typo in PATCH16

Changes since v4:
- Changed IRQ_LOCAL_MAX to 16 in PATCH2
- Fixed typo in PATCH10
- Replaced TARGET_LONG_BITS with riscv_cpu_mxl_bits(env) in PATCH11
- Replaced TARGET_LONG_BITS with riscv_cpu_mxl_bits(env) in PATCH14
- Replaced TARGET_LONG_BITS with riscv_cpu_mxl_bits(env) in PATCH15
- Replaced TARGET_LONG_BITS with xlen passed via ireg callback in PATCH20
- Retrict maximum IMSIC guest files per-HART of virt machine to 7 in PATCH21.
- Added separate PATCH23 to increase maximum number of allowed CPUs for virt machine

Changes since v3:
- Replaced "aplic,xyz" and "imsic,xyz" DT properties with "riscv,xyz" DT properties because "aplic" and "imsic" are not valid vendor names required by Linux DT schema checker.

Changes since v2:
- Update PATCH4 to check and inject interrupt after V=1 when transitioning from V=0 to V=1

Changes since v1:
- Revamped whole series and created more granular patches
- Added HGEIE and HGEIP CSR emulation for H-extension
- Added APLIC emulation
- Added IMSIC emulation

Anup Patel (5):
hw/riscv: virt: Add optional AIA APLIC support to virt machine hw/intc: Add RISC-V AIA IMSIC device emulation hw/riscv: virt: Add optional AIA IMSIC support to virt machine docs/system: riscv: Document AIA options for virt machine hw/riscv: virt: Increase maximum number of allowed CPUs

 docs/system/riscv/virt.rst    |  16 +
 hw/intc/Kconfig               |   3 +
 hw/intc/meson.build           |   1 +
 hw/intc/riscv_imsic.c         | 448 ++++++++++++++++++++++
 hw/riscv/Kconfig              |   2 +
 hw/riscv/virt.c               | 698 ++++++++++++++++++++++++++++------
 include/hw/intc/riscv_imsic.h |  68 ++++
 include/hw/riscv/virt.h       |  41 +-
 8 files changed, 1156 insertions(+), 121 deletions(-)
 create mode 100644 hw/intc/riscv_imsic.c
 create mode 100644 include/hw/intc/riscv_imsic.h
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v10 1/5 hw/riscv: virt: Add optional AIA APLIC support to virt machine

From: Anup Patel <[email protected]>

We extend virt machine to emulate AIA APLIC devices only when "aia=aplic" parameter is passed along with machine name in QEMU command-line. When "aia=none" or not specified then we fallback to original PLIC device emulation.

---
 hw/riscv/Kconfig        |   1 +
 hw/riscv/virt.c         | 291 ++++++++++++++++++++++++++++++++--------
 include/hw/riscv/virt.h |  26 +++-
 3 files changed, 259 insertions(+), 59 deletions(-)
hw/riscv/Kconfig +1 -0
index d2d869aaad..c30bb7cb6c 100644
@@ -42,6 +42,7 @@ config RISCV_VIRT
     select PFLASH_CFI01
     select SERIAL
     select RISCV_ACLINT
+    select RISCV_APLIC
     select SIFIVE_PLIC
     select SIFIVE_TEST
     select VIRTIO_MMIO
hw/riscv/virt.c +238 -53

443 lines not on this page · raw message

include/hw/riscv/virt.h +20 -6
index 6e9f61ccd9..47706b456d 100644
@@ -32,18 +32,24 @@ typedef struct RISCVVirtState RISCVVirtState;
 DECLARE_INSTANCE_CHECKER(RISCVVirtState, RISCV_VIRT_MACHINE,
                          TYPE_RISCV_VIRT_MACHINE)
 
+typedef enum RISCVVirtAIAType {
+    VIRT_AIA_TYPE_NONE = 0,
+    VIRT_AIA_TYPE_APLIC,
+} RISCVVirtAIAType;
+
 struct RISCVVirtState {
     /*< private >*/
     MachineState parent;
 
     /*< public >*/
     RISCVHartArrayState soc[VIRT_SOCKETS_MAX];
-    DeviceState *plic[VIRT_SOCKETS_MAX];
+    DeviceState *irqchip[VIRT_SOCKETS_MAX];
     PFlashCFI01 *flash[2];
     FWCfgState *fw_cfg;
 
     int fdt_size;
     bool have_aclint;
+    RISCVVirtAIAType aia_type;
 };
 
 enum {
@@ -54,6 +60,8 @@ enum {
     VIRT_CLINT,
     VIRT_ACLINT_SSWI,
     VIRT_PLIC,
+    VIRT_APLIC_M,
+    VIRT_APLIC_S,
     VIRT_UART0,
     VIRT_VIRTIO,
     VIRT_FW_CFG,
@@ -73,8 +81,9 @@ enum {
     VIRTIO_NDEV = 0x35 /* Arbitrary maximum number of interrupts */
 };
 
-#define VIRT_PLIC_NUM_SOURCES 127
-#define VIRT_PLIC_NUM_PRIORITIES 7
+#define VIRT_IRQCHIP_NUM_SOURCES 127
+#define VIRT_IRQCHIP_NUM_PRIO_BITS 3
+
 #define VIRT_PLIC_PRIORITY_BASE 0x04
 #define VIRT_PLIC_PENDING_BASE 0x1000
 #define VIRT_PLIC_ENABLE_BASE 0x2000
@@ -86,9 +95,14 @@ enum {
 
 #define FDT_PCI_ADDR_CELLS    3
 #define FDT_PCI_INT_CELLS     1
-#define FDT_PLIC_ADDR_CELLS   0
 #define FDT_PLIC_INT_CELLS    1
-#define FDT_INT_MAP_WIDTH     (FDT_PCI_ADDR_CELLS + FDT_PCI_INT_CELLS + 1 + \
-                               FDT_PLIC_ADDR_CELLS + FDT_PLIC_INT_CELLS)
+#define FDT_APLIC_INT_CELLS   2
+#define FDT_MAX_INT_CELLS     2
+#define FDT_MAX_INT_MAP_WIDTH (FDT_PCI_ADDR_CELLS + FDT_PCI_INT_CELLS + \
+                                 1 + FDT_MAX_INT_CELLS)
+#define FDT_PLIC_INT_MAP_WIDTH  (FDT_PCI_ADDR_CELLS + FDT_PCI_INT_CELLS + \
+                                 1 + FDT_PLIC_INT_CELLS)
+#define FDT_APLIC_INT_MAP_WIDTH (FDT_PCI_ADDR_CELLS + FDT_PCI_INT_CELLS + \
+                                 1 + FDT_APLIC_INT_CELLS)
 
 #endif
Signature · 1 line
2.25.1
author
#2 lore raw

PATCH v10 2/5 hw/intc: Add RISC-V AIA IMSIC device emulation

In reply to Anup Patel

From: Anup Patel <[email protected]>

The RISC-V AIA (Advanced Interrupt Architecture) defines a new interrupt controller for MSIs (message signal interrupts) called IMSIC (Incoming Message Signal Interrupt Controller). The IMSIC is per-HART device and also suppport virtualizaiton of MSIs using dedicated VS-level guest interrupt files.

This patch adds device emulation for RISC-V AIA IMSIC which supports M-level, S-level, and VS-level MSIs.

---
 hw/intc/Kconfig               |   3 +
 hw/intc/meson.build           |   1 +
 hw/intc/riscv_imsic.c         | 448 ++++++++++++++++++++++++++++++++++
 include/hw/intc/riscv_imsic.h |  68 ++++++
 4 files changed, 520 insertions(+)
 create mode 100644 hw/intc/riscv_imsic.c
 create mode 100644 include/hw/intc/riscv_imsic.h
hw/intc/Kconfig +3 -0
index 528e77b4a6..ec8d4cec29 100644
@@ -73,6 +73,9 @@ config RISCV_ACLINT
 config RISCV_APLIC
     bool
 
+config RISCV_IMSIC
+    bool
+
 config SIFIVE_PLIC
     bool
 
hw/intc/meson.build +1 -0
index 7466024402..5caa337654 100644
@@ -51,6 +51,7 @@ specific_ss.add(when: 'CONFIG_S390_FLIC_KVM', if_true: files('s390_flic_kvm.c'))
 specific_ss.add(when: 'CONFIG_SH_INTC', if_true: files('sh_intc.c'))
 specific_ss.add(when: 'CONFIG_RISCV_ACLINT', if_true: files('riscv_aclint.c'))
 specific_ss.add(when: 'CONFIG_RISCV_APLIC', if_true: files('riscv_aplic.c'))
+specific_ss.add(when: 'CONFIG_RISCV_IMSIC', if_true: files('riscv_imsic.c'))
 specific_ss.add(when: 'CONFIG_SIFIVE_PLIC', if_true: files('sifive_plic.c'))
 specific_ss.add(when: 'CONFIG_XICS', if_true: files('xics.c'))
 specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_XICS'],
hw/intc/riscv_imsic.c new file +448 -0

448 lines not on this page · raw message

include/hw/intc/riscv_imsic.h new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
2.25.1
author
#3 lore raw

PATCH v10 3/5 hw/riscv: virt: Add optional AIA IMSIC support to virt machine

In reply to Anup Patel

From: Anup Patel <[email protected]>

We extend virt machine to emulate both AIA IMSIC and AIA APLIC devices only when "aia=aplic-imsic" parameter is passed along with machine name in the QEMU command-line. The AIA IMSIC is only a per-HART MSI controller so we use AIA APLIC in MSI-mode to forward all wired interrupts as MSIs to the AIA IMSIC.

We also provide "aia-guests=<xyz>" parameter which can be used to specify number of VS-level AIA IMSIC Guests MMIO pages for each HART.

---
 hw/riscv/Kconfig        |   1 +
 hw/riscv/virt.c         | 439 ++++++++++++++++++++++++++++++++--------
 include/hw/riscv/virt.h |  17 +-
 3 files changed, 373 insertions(+), 84 deletions(-)
hw/riscv/Kconfig +1 -0
index c30bb7cb6c..91bb9d21c4 100644
@@ -43,6 +43,7 @@ config RISCV_VIRT
     select SERIAL
     select RISCV_ACLINT
     select RISCV_APLIC
+    select RISCV_IMSIC
     select SIFIVE_PLIC
     select SIFIVE_TEST
     select VIRTIO_MMIO
hw/riscv/virt.c +358 -81

633 lines not on this page · raw message

include/hw/riscv/virt.h +14 -3
index 47706b456d..d248d0dfa0 100644
@@ -24,8 +24,10 @@
 #include "hw/block/flash.h"
 #include "qom/object.h"
 
-#define VIRT_CPUS_MAX 32
-#define VIRT_SOCKETS_MAX 8
+#define VIRT_CPUS_MAX_BITS             3
+#define VIRT_CPUS_MAX                  (1 << VIRT_CPUS_MAX_BITS)
+#define VIRT_SOCKETS_MAX_BITS          2
+#define VIRT_SOCKETS_MAX               (1 << VIRT_SOCKETS_MAX_BITS)
 
 #define TYPE_RISCV_VIRT_MACHINE MACHINE_TYPE_NAME("virt")
 typedef struct RISCVVirtState RISCVVirtState;
@@ -35,6 +37,7 @@ DECLARE_INSTANCE_CHECKER(RISCVVirtState, RISCV_VIRT_MACHINE,
 typedef enum RISCVVirtAIAType {
     VIRT_AIA_TYPE_NONE = 0,
     VIRT_AIA_TYPE_APLIC,
+    VIRT_AIA_TYPE_APLIC_IMSIC,
 } RISCVVirtAIAType;
 
 struct RISCVVirtState {
@@ -50,6 +53,7 @@ struct RISCVVirtState {
     int fdt_size;
     bool have_aclint;
     RISCVVirtAIAType aia_type;
+    int aia_guests;
 };
 
 enum {
@@ -65,6 +69,8 @@ enum {
     VIRT_UART0,
     VIRT_VIRTIO,
     VIRT_FW_CFG,
+    VIRT_IMSIC_M,
+    VIRT_IMSIC_S,
     VIRT_FLASH,
     VIRT_DRAM,
     VIRT_PCIE_MMIO,
@@ -81,8 +87,12 @@ enum {
     VIRTIO_NDEV = 0x35 /* Arbitrary maximum number of interrupts */
 };
 
-#define VIRT_IRQCHIP_NUM_SOURCES 127
+#define VIRT_IRQCHIP_IPI_MSI 1
+#define VIRT_IRQCHIP_NUM_MSIS 255
+#define VIRT_IRQCHIP_NUM_SOURCES VIRTIO_NDEV
 #define VIRT_IRQCHIP_NUM_PRIO_BITS 3
+#define VIRT_IRQCHIP_MAX_GUESTS_BITS 3
+#define VIRT_IRQCHIP_MAX_GUESTS ((1U << VIRT_IRQCHIP_MAX_GUESTS_BITS) - 1U)
 
 #define VIRT_PLIC_PRIORITY_BASE 0x04
 #define VIRT_PLIC_PENDING_BASE 0x1000
@@ -97,6 +107,7 @@ enum {
 #define FDT_PCI_INT_CELLS     1
 #define FDT_PLIC_INT_CELLS    1
 #define FDT_APLIC_INT_CELLS   2
+#define FDT_IMSIC_INT_CELLS   0
 #define FDT_MAX_INT_CELLS     2
 #define FDT_MAX_INT_MAP_WIDTH (FDT_PCI_ADDR_CELLS + FDT_PCI_INT_CELLS + \
                                  1 + FDT_MAX_INT_CELLS)
Signature · 1 line
2.25.1
author
#4 lore raw

PATCH v10 4/5 docs/system: riscv: Document AIA options for virt machine

In reply to Anup Patel

From: Anup Patel <[email protected]>

We have two new machine options "aia" and "aia-guests" available for the RISC-V virt machine so let's document these options.

---
 docs/system/riscv/virt.rst | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
docs/system/riscv/virt.rst +16 -0
index 08ce3c4177..1272b6659e 100644
@@ -63,6 +63,22 @@ The following machine-specific options are supported:
   When this option is "on", ACLINT devices will be emulated instead of
   SiFive CLINT. When not specified, this option is assumed to be "off".
 
+- aia=[none|aplic|aplic-imsic]
+
+  This option allows selecting interrupt controller defined by the AIA
+  (advanced interrupt architecture) specification. The "aia=aplic" selects
+  APLIC (advanced platform level interrupt controller) to handle wired
+  interrupts whereas the "aia=aplic-imsic" selects APLIC and IMSIC (incoming
+  message signaled interrupt controller) to handle both wired interrupts and
+  MSIs. When not specified, this option is assumed to be "none" which selects
+  SiFive PLIC to handle wired interrupts.
+
+- aia-guests=nnn
+
+  The number of per-HART VS-level AIA IMSIC pages to be emulated for a guest
+  having AIA IMSIC (i.e. "aia=aplic-imsic" selected). When not specified,
+  the default number of per-HART VS-level AIA IMSIC pages is 0.
+
 Running Linux kernel
 --------------------
 
Signature · 1 line
2.25.1
author
#5 lore raw

PATCH v10 5/5 hw/riscv: virt: Increase maximum number of allowed CPUs

In reply to Anup Patel

From: Anup Patel <[email protected]>

To facilitate software development of RISC-V systems with large number of HARTs, we increase the maximum number of allowed CPUs to 512 (2^9).

We also add a detailed source level comments about limit defines which impact the physical address space utilization.

---
 hw/riscv/virt.c         | 10 ++++++++++
 include/hw/riscv/virt.h |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)
hw/riscv/virt.c +10 -0
index 94fbf63ec8..da50cbed43 100644
@@ -45,6 +45,16 @@
 #include "hw/pci-host/gpex.h"
 #include "hw/display/ramfb.h"
 
+/*
+ * The virt machine physical address space used by some of the devices
+ * namely ACLINT, PLIC, APLIC, and IMSIC depend on number of Sockets,
+ * number of CPUs, and number of IMSIC guest files.
+ *
+ * Various limits defined by VIRT_SOCKETS_MAX_BITS, VIRT_CPUS_MAX_BITS,
+ * and VIRT_IRQCHIP_MAX_GUESTS_BITS are tuned for maximum utilization
+ * of virt machine physical address space.
+ */
+
 #define VIRT_IMSIC_GROUP_MAX_SIZE      (1U << IMSIC_MMIO_GROUP_MIN_SHIFT)
 #if VIRT_IMSIC_GROUP_MAX_SIZE < \
     IMSIC_GROUP_SIZE(VIRT_CPUS_MAX_BITS, VIRT_IRQCHIP_MAX_GUESTS_BITS)
include/hw/riscv/virt.h +1 -1
index d248d0dfa0..78b058ec86 100644
@@ -24,7 +24,7 @@
 #include "hw/block/flash.h"
 #include "qom/object.h"
 
-#define VIRT_CPUS_MAX_BITS             3
+#define VIRT_CPUS_MAX_BITS             9
 #define VIRT_CPUS_MAX                  (1 << VIRT_CPUS_MAX_BITS)
 #define VIRT_SOCKETS_MAX_BITS          2
 #define VIRT_SOCKETS_MAX               (1 << VIRT_SOCKETS_MAX_BITS)
Signature · 1 line
2.25.1
#6 lore raw
In reply to Anup Patel
Quoted 87 lines · Anup Patel

From: Anup Patel <[email protected]>

The advanced interrupt architecture (AIA) extends the per-HART local interrupt support. Along with this, it also adds IMSIC (MSI contrllor) and Advanced PLIC (wired interrupt controller).

The latest AIA draft specification can be found here:
https://github.com/riscv/riscv-aia/releases/download/0.2-draft.28/riscv-interrupts-028.pdf

This series adds RISC-V AIA support in QEMU which includes emulating all AIA local CSRs, APLIC, and IMSIC. Only AIA local interrupt filtering is not implemented because we don't have any local interrupt greater than 12.

To enable AIA in QEMU, use one of the following:
1) Only AIA local interrupt CSRs: Pass "x-aia=true" as CPU paramenter in the QEMU command-line
2) Only APLIC for virt machine: Pass "aia=aplic" as machine parameter in the QEMU command-line
3) Both APLIC and IMSIC for virt machine: Pass "aia=aplic-imsic" as machine parameter in the QEMU command-line
4) Both APLIC and IMSIC with 2 guest files for virt machine: Pass "aia=aplic-imsic,aia-guests=2" as machine parameter in the QEMU command-line

To test series, we require Linux with AIA support which can be found in:
riscv_aia_v1 branch at https://github.com/avpatel/linux.git

This series can be found riscv_aia_v10 branch at:
https://github.com/avpatel/qemu.git

Changes since v9:
- Rebased on latest riscv-to-apply.next branch of Alistair's repo
- Removed first 18 PATCHs since these are already merged
- Fixed 32-bit system compile error in PATCH3

Changes since v8:
- Use error_setg() in riscv_imsic_realize() added by PATCH20

Changes since v7:
- Rebased on latest riscv-to-apply.next branch of Alistair's repo
- Improved default priority assignment in PATCH9

Changes since v6:
- Fixed priority comparison in riscv_cpu_pending_to_irq() of PATCH9
- Fixed typos in comments added by PATCH11
- Added "pend = true;" for CSR_MSETEIPNUM case of rmw_xsetclreinum() in PATCH15
- Handle ithreshold == 0 case in riscv_aplic_idc_topi() of PATCH18
- Allow setting pending bit for Level0 or Level1 interrupts in riscv_aplic_set_pending() of PATCH18
- Force DOMAINCFG[31:24] bits to 0x80 in riscv_aplic_read() of PATCH18
- For APLIC direct mode, set target.iprio to 1 when zero is writtern in PATCH18
- Handle eithreshold == 0 case in riscv_imsic_topei() of PATCH20

Changes since v5:
- Moved VSTOPI_NUM_SRCS define to top of the file in PATCH13
- Fixed typo in PATCH16

Changes since v4:
- Changed IRQ_LOCAL_MAX to 16 in PATCH2
- Fixed typo in PATCH10
- Replaced TARGET_LONG_BITS with riscv_cpu_mxl_bits(env) in PATCH11
- Replaced TARGET_LONG_BITS with riscv_cpu_mxl_bits(env) in PATCH14
- Replaced TARGET_LONG_BITS with riscv_cpu_mxl_bits(env) in PATCH15
- Replaced TARGET_LONG_BITS with xlen passed via ireg callback in PATCH20
- Retrict maximum IMSIC guest files per-HART of virt machine to 7 in PATCH21.
- Added separate PATCH23 to increase maximum number of allowed CPUs for virt machine

Changes since v3:
- Replaced "aplic,xyz" and "imsic,xyz" DT properties with "riscv,xyz" DT properties because "aplic" and "imsic" are not valid vendor names required by Linux DT schema checker.

Changes since v2:
- Update PATCH4 to check and inject interrupt after V=1 when transitioning from V=0 to V=1

Changes since v1:
- Revamped whole series and created more granular patches
- Added HGEIE and HGEIP CSR emulation for H-extension
- Added APLIC emulation
- Added IMSIC emulation

Quoted 6 lines

Anup Patel (5):
hw/riscv: virt: Add optional AIA APLIC support to virt machine hw/intc: Add RISC-V AIA IMSIC device emulation hw/riscv: virt: Add optional AIA IMSIC support to virt machine docs/system: riscv: Document AIA options for virt machine hw/riscv: virt: Increase maximum number of allowed CPUs

Thanks!

Applied to riscv-to-apply.next

Alistair

Quoted 17 lines
 docs/system/riscv/virt.rst    |  16 +
 hw/intc/Kconfig               |   3 +
 hw/intc/meson.build           |   1 +
 hw/intc/riscv_imsic.c         | 448 ++++++++++++++++++++++
 hw/riscv/Kconfig              |   2 +
 hw/riscv/virt.c               | 698 ++++++++++++++++++++++++++++------
 include/hw/intc/riscv_imsic.h |  68 ++++
 include/hw/riscv/virt.h       |  41 +-
 8 files changed, 1156 insertions(+), 121 deletions(-)
 create mode 100644 hw/intc/riscv_imsic.c
 create mode 100644 include/hw/intc/riscv_imsic.h

--
2.25.1