linux-stable/arch/riscv/kvm
Anup Patel 651bf5b1d0 RISC-V: KVM: Fix APLIC in_clrip[x] read emulation
commit 8e936e9871 upstream.

The reads to APLIC in_clrip[x] registers returns rectified input values
of the interrupt sources.

A rectified input value of an interrupt source is defined by the section
"4.5.2 Source configurations (sourcecfg[1]–sourcecfg[1023])" of the
RISC-V AIA specification as:

    rectified input value = (incoming wire value) XOR (source is inverted)

Update the riscv_aplic_input() implementation to match the above.

Cc: stable@vger.kernel.org
Fixes: 74967aa208 ("RISC-V: KVM: Add in-kernel emulation of AIA APLIC")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20240321085041.1955293-3-apatel@ventanamicro.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-10 16:35:48 +02:00
..
aia.c RISC-V: KVM: return ENOENT in *_one_reg() when reg is unknown 2023-08-08 17:25:42 +05:30
aia_aplic.c RISC-V: KVM: Fix APLIC in_clrip[x] read emulation 2024-04-10 16:35:48 +02:00
aia_device.c RISC-V: KVM: Remove unneeded semicolon 2023-06-20 10:48:38 +05:30
aia_imsic.c RISCV: KVM: update external interrupt atomically for IMSIC swfile 2024-01-10 17:16:59 +01:00
Kconfig RISC-V: KVM: Skeletal in-kernel AIA irqchip support 2023-06-18 21:24:40 +05:30
main.c RISC-V: KVM: Implement guest external interrupt line management 2023-06-18 21:24:33 +05:30
Makefile RISC-V: KVM: Factor-out ONE_REG related code to its own source file 2023-08-08 17:25:29 +05:30
mmu.c Common KVM changes for 6.6: 2023-08-31 13:19:55 -04:00
tlb.c RISC-V: KVM: use bitmap_zero() API 2023-06-06 08:51:50 +05:30
vcpu.c KVM: riscv: Add KVM_GET_REG_LIST API support 2023-08-09 12:15:25 +05:30
vcpu_exit.c RISC-V: KVM: Redirect AMO load/store misaligned traps to guest 2023-06-06 09:04:11 +05:30
vcpu_fp.c RISC-V: KVM: return ENOENT in *_one_reg() when reg is unknown 2023-08-08 17:25:42 +05:30
vcpu_insn.c RISC-V: KVM: Initial skeletal support for AIA 2023-04-21 17:45:48 +05:30
vcpu_onereg.c RISC-V: KVM: Fix riscv_vcpu_get_isa_ext_single() for missing extensions 2023-09-21 15:04:01 +05:30
vcpu_pmu.c RISC-V: KVM: Support firmware events 2023-02-07 20:36:06 +05:30
vcpu_sbi.c RISC-V: KVM: return ENOENT in *_one_reg() when reg is unknown 2023-08-08 17:25:42 +05:30
vcpu_sbi_base.c RISC-V: KVM: Add ONE_REG interface to enable/disable SBI extensions 2023-04-21 17:38:44 +05:30
vcpu_sbi_hsm.c RISC-V: KVM: Modify SBI extension handler to return SBI error code 2023-02-07 20:35:45 +05:30
vcpu_sbi_pmu.c RISC-V: KVM: Add SBI PMU extension support 2023-02-07 20:35:53 +05:30
vcpu_sbi_replace.c RISC-V: KVM: Increment firmware pmu events 2023-02-07 20:36:08 +05:30
vcpu_sbi_v01.c RISC-V: KVM: Modify SBI extension handler to return SBI error code 2023-02-07 20:35:45 +05:30
vcpu_switch.S
vcpu_timer.c RISC-V: KVM: do not EOPNOTSUPP in set KVM_REG_RISCV_TIMER_REG 2023-08-08 17:25:49 +05:30
vcpu_vector.c RISC-V: KVM: Improve vector save/restore functions 2023-08-08 17:26:05 +05:30
vm.c RISC-V: KVM: Skeletal in-kernel AIA irqchip support 2023-06-18 21:24:40 +05:30
vmid.c RISC-V: KVM: Drop the _MASK suffix from hgatp.VMID mask defines 2023-04-21 17:45:44 +05:30