[PATCH 0/4] Support KVM on real RISC-V HW

Stefan Butz via qemu development posted 4 patches 1 month, 3 weeks ago
Failed in applying to current master (apply log)
hw/riscv/virt-acpi-build.c   |  4 ++--
hw/riscv/virt.c              | 29 ++++++++++++++++++++++-------
include/hw/riscv/virt.h      |  5 +++--
target/riscv/kvm/kvm-cpu.c   | 43 ++++++++++++++++++++++++++++++++-----------
target/riscv/kvm/kvm-stub.c  | 18 ++++++++++++++----
target/riscv/kvm/kvm_riscv.h | 10 ++++++----
6 files changed, 79 insertions(+), 30 deletions(-)
[PATCH 0/4] Support KVM on real RISC-V HW
Posted by Stefan Butz via qemu development 1 month, 3 weeks ago
Spacemit K3 and Tenstorrent Atlantis support only 64 guest interrupt
identities. QEMU virt machine always requests 255.
This patchset queries the hw limits from the KVM AIA device to avoid
requesting more interrupt identities than supported.
Without this patchet QEMU KVM crashes on those platforms.

Bug Ticket: https://gitlab.com/qemu-project/qemu/-/work_items/4599

Signed-off-by: Stefan Butz <mail@butz.st>
---
Stefan Butz (4):
      hw/riscv/virt: Provide number of interrupt identities
      hw/riscv/virt: Move platform bus interrupts below 64
      target/riscv/kvm: Create KVM AIA device before configuring it
      hw/riscv/virt: Limit interrupt identities to what KVM AIA supports

 hw/riscv/virt-acpi-build.c   |  4 ++--
 hw/riscv/virt.c              | 29 ++++++++++++++++++++++-------
 include/hw/riscv/virt.h      |  5 +++--
 target/riscv/kvm/kvm-cpu.c   | 43 ++++++++++++++++++++++++++++++++-----------
 target/riscv/kvm/kvm-stub.c  | 18 ++++++++++++++----
 target/riscv/kvm/kvm_riscv.h | 10 ++++++----
 6 files changed, 79 insertions(+), 30 deletions(-)
---
base-commit: efa3b9d5ac8024078225e1ab434411fdfe53b457
change-id: 20260928-spacemit-k3-31322d958522

Best regards,
--  
Stefan Butz <mail@butz.st>
Re: [PATCH 0/4] Support KVM on real RISC-V HW
Posted by Andrew Jones 1 month, 3 weeks ago
On Mon, Sep 28, 2026 at 08:06:35AM +0200, Stefan Butz via qemu development wrote:
> Spacemit K3 and Tenstorrent Atlantis support only 64 guest interrupt
> identities. QEMU virt machine always requests 255.
> This patchset queries the hw limits from the KVM AIA device to avoid
> requesting more interrupt identities than supported.
> Without this patchet QEMU KVM crashes on those platforms.
> 
> Bug Ticket: https://gitlab.com/qemu-project/qemu/-/work_items/4599
>

Hi Stefan,

Qingwei Hu posted a fix for this too last week. Please work together on
it.

Thanks,
drew