qemu/hw/riscv
Daniel Henrique Barboza d3b96a5319 hw/riscv/riscv-iommu: fix riscv_iommu_validate_process_ctx() check
'mode' will never be RISCV_IOMMU_CAP_SV32. We are erroring out in the
'switch' right before it if 'mode' isn't 0, 8, 9 or 10.

'mode' should be check with RISCV_IOMMU_DC_FSC_IOSATP_MODE_SV32.

Reported by Coverity via a "DEADCODE" ticket.

Resolves: Coverity CID 1564781
Fixes: 0c54acb824 ("hw/riscv: add RISC-V IOMMU base emulation")
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20241104123839.533442-3-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2024-11-07 08:19:39 +10:00
..
boot.c target/riscv: Add fw_dynamic_info32 for booting RV32 OpenSBI 2024-10-30 11:22:07 +10:00
Kconfig hw/riscv: add RISC-V IOMMU base emulation 2024-10-31 13:51:24 +10:00
meson.build hw/riscv: add riscv-iommu-pci reference device 2024-10-31 13:51:24 +10:00
microchip_pfsoc.c
numa.c
opentitan.c
riscv_hart.c
riscv-iommu-bits.h hw/riscv/riscv-iommu: add DBG support 2024-10-31 13:51:24 +10:00
riscv-iommu-pci.c hw/riscv: add riscv-iommu-pci reference device 2024-10-31 13:51:24 +10:00
riscv-iommu.c hw/riscv/riscv-iommu: fix riscv_iommu_validate_process_ctx() check 2024-11-07 08:19:39 +10:00
riscv-iommu.h hw/riscv/riscv-iommu: add ATS support 2024-10-31 13:51:24 +10:00
shakti_c.c
sifive_e.c hw: Remove unused inclusion of hw/char/serial.h 2024-10-03 19:33:23 +02:00
sifive_u.c target/riscv: Add fw_dynamic_info32 for booting RV32 OpenSBI 2024-10-30 11:22:07 +10:00
spike.c
trace-events hw/riscv/riscv-iommu: add ATS support 2024-10-31 13:51:24 +10:00
trace.h hw/riscv: add RISC-V IOMMU base emulation 2024-10-31 13:51:24 +10:00
virt-acpi-build.c
virt.c hw/riscv/virt.c: support for RISC-V IOMMU PCIDevice hotplug 2024-10-31 13:51:24 +10:00