mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
target/riscv: Move Guest irqs out of the core local irqs range.
Qemu maps IRQs 0:15 for core interrupts and 16 onward for guest interrupts which are later translated to hgiep in `riscv_cpu_set_irq()` function. With virtual IRQ support added, software now can fully use the whole local interrupt range without any actual hardware attached. This change moves the guest interrupt range after the core local interrupt range to avoid clash. Fixes:1697837ed9
("target/riscv: Add M-mode virtual interrupt and IRQ filtering support.") Fixes:40336d5b1d
("target/riscv: Add HS-mode virtual interrupt and IRQ filtering support.") Signed-off-by: Rajnesh Kanwal <rkanwal@rivosinc.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Message-ID: <20240520125157.311503-3-rkanwal@rivosinc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
87088fadb3
commit
92c82a126e
2 changed files with 10 additions and 2 deletions
|
@ -1145,7 +1145,14 @@ static RISCVException write_stimecmph(CPURISCVState *env, int csrno,
|
|||
|
||||
#define VSTOPI_NUM_SRCS 5
|
||||
|
||||
#define LOCAL_INTERRUPTS (~0x1FFF)
|
||||
/*
|
||||
* All core local interrupts except the fixed ones 0:12. This macro is for
|
||||
* virtual interrupts logic so please don't change this to avoid messing up
|
||||
* the whole support, For reference see AIA spec: `5.3 Interrupt filtering and
|
||||
* virtual interrupts for supervisor level` and `6.3.2 Virtual interrupts for
|
||||
* VS level`.
|
||||
*/
|
||||
#define LOCAL_INTERRUPTS (~0x1FFFULL)
|
||||
|
||||
static const uint64_t delegable_ints =
|
||||
S_MODE_INTERRUPTS | VS_MODE_INTERRUPTS | MIP_LCOFIP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue