linux-stable/arch/riscv
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
..
boot riscv: dts: sifive: add missing #interrupt-cells to pmic 2024-03-26 18:19:11 -04:00
configs Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
errata riscv: errata: andes: Probe for IOCP only once in boot stage 2023-12-13 18:45:19 +01:00
include riscv: Fix compilation error with FAST_GUP and rv32 2024-03-26 18:20:09 -04:00
kernel riscv: add CALLER_ADDRx support 2024-03-06 14:48:41 +00:00
kvm RISC-V: KVM: Fix APLIC in_clrip[x] read emulation 2024-04-10 16:35:48 +02:00
lib riscv: uaccess: Return the number of bytes effectively not copied 2023-08-16 07:30:06 -07:00
mm riscv: Fix build error if !CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION 2024-03-06 14:48:37 +00:00
net riscv, bpf: Track both a0 (RISC-V ABI) and a5 (BPF) return values 2023-10-09 15:21:25 +02:00
purgatory riscv/purgatory: Disable CFI 2023-08-23 14:16:40 -07:00
tools riscv: Check relocations at compile time 2023-04-19 07:46:32 -07:00
Kbuild kexec: rename ARCH_HAS_KEXEC_PURGATORY 2023-08-18 10:18:54 -07:00
Kconfig RISC-V: Drop invalid test from CONFIG_AS_HAS_OPTION_ARCH 2024-03-06 14:48:41 +00:00
Kconfig.debug
Kconfig.errata riscv: only select DMA_DIRECT_REMAP from RISCV_ISA_ZICBOM and ERRATA_THEAD_PBMT 2023-10-26 09:42:38 +02:00
Kconfig.socs riscv: Kconfig: Add select ARM_AMBA to SOC_STARFIVE 2023-12-13 18:45:35 +01:00
Makefile riscv: Remove duplicate objcopy flag 2023-10-12 11:34:03 -07:00
Makefile.postlink riscv: Use --emit-relocs in order to move .rela.dyn in init 2023-04-19 07:46:33 -07:00