[PATCH 0/2] hw/riscv: Make virt AIA setup reusable

Joel Stanley posted 2 patches 3 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260114012846.981884-1-joel@jms.id.au
Maintainers: Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Sunil V L <sunilvl@ventanamicro.com>
hw/riscv/aia.h             | 59 ++++++++++++++++++++++++
include/hw/riscv/virt.h    | 30 +------------
hw/riscv/aia.c             | 92 ++++++++++++++++++++++++++++++++++++++
hw/riscv/virt-acpi-build.c | 27 +++++++----
hw/riscv/virt.c            | 87 +++++------------------------------
hw/riscv/meson.build       |  2 +-
6 files changed, 182 insertions(+), 115 deletions(-)
create mode 100644 hw/riscv/aia.h
create mode 100644 hw/riscv/aia.c
[PATCH 0/2] hw/riscv: Make virt AIA setup reusable
Posted by Joel Stanley 3 weeks, 5 days ago
v2: Add assert for number of irq sources

Sharing the AIA setup code looked like a good idea when I was
implementing a machine with AIA. It will be used by Atlantis initially.

Atlantis will use 128 IRQ sources so the second patch makes that
configurable as part of the setup. I initially changed it globally and
that broke the virt acpi tests as the number is encoded in acpi
blob.

Joel Stanley (2):
  hw/riscv/virt: Move AIA initialisation to helper file
  hw/riscv/aia: Provide number of irq sources

 hw/riscv/aia.h             | 59 ++++++++++++++++++++++++
 include/hw/riscv/virt.h    | 30 +------------
 hw/riscv/aia.c             | 92 ++++++++++++++++++++++++++++++++++++++
 hw/riscv/virt-acpi-build.c | 27 +++++++----
 hw/riscv/virt.c            | 87 +++++------------------------------
 hw/riscv/meson.build       |  2 +-
 6 files changed, 182 insertions(+), 115 deletions(-)
 create mode 100644 hw/riscv/aia.h
 create mode 100644 hw/riscv/aia.c

-- 
2.47.3
Re: [PATCH 0/2] hw/riscv: Make virt AIA setup reusable
Posted by Joel Stanley 3 weeks, 4 days ago
Alistair,

On Wed, 14 Jan 2026 at 11:59, Joel Stanley <joel@jms.id.au> wrote:
>
> v2: Add assert for number of irq sources

I forgot to set V2 in the subject when sending this series. My
apologies, it's been a while between patches.

Let me know if a re-send would help.

Cheers,

Joel

>
> Sharing the AIA setup code looked like a good idea when I was
> implementing a machine with AIA. It will be used by Atlantis initially.
>
> Atlantis will use 128 IRQ sources so the second patch makes that
> configurable as part of the setup. I initially changed it globally and
> that broke the virt acpi tests as the number is encoded in acpi
> blob.
>
> Joel Stanley (2):
>   hw/riscv/virt: Move AIA initialisation to helper file
>   hw/riscv/aia: Provide number of irq sources
>
>  hw/riscv/aia.h             | 59 ++++++++++++++++++++++++
>  include/hw/riscv/virt.h    | 30 +------------
>  hw/riscv/aia.c             | 92 ++++++++++++++++++++++++++++++++++++++
>  hw/riscv/virt-acpi-build.c | 27 +++++++----
>  hw/riscv/virt.c            | 87 +++++------------------------------
>  hw/riscv/meson.build       |  2 +-
>  6 files changed, 182 insertions(+), 115 deletions(-)
>  create mode 100644 hw/riscv/aia.h
>  create mode 100644 hw/riscv/aia.c
>
> --
> 2.47.3
>