You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
4 weeks ago
..
Kconfig hw/riscv: add RISC-V IOMMU base emulation 1 month ago
boot.c target/riscv: Add fw_dynamic_info32 for booting RV32 OpenSBI 1 month ago
meson.build hw/riscv: add riscv-iommu-pci reference device 1 month ago
microchip_pfsoc.c hw/riscv: Respect firmware ELF entry point 2 months ago
numa.c hw/riscv/numa.c: use g_autofree in socket_fdt_write_distance_matrix() 10 months ago
opentitan.c hw/riscv: Respect firmware ELF entry point 2 months ago
riscv-iommu-bits.h hw/riscv/riscv-iommu: add DBG support 1 month ago
riscv-iommu-pci.c hw/riscv: add riscv-iommu-pci reference device 1 month ago
riscv-iommu.c hw/riscv/riscv-iommu: fix riscv_iommu_validate_process_ctx() check 4 weeks ago
riscv-iommu.h hw/riscv/riscv-iommu: add ATS support 1 month ago
riscv_hart.c hw/riscv: hart: Add a new 'resetvec' property 4 years ago
shakti_c.c hw/riscv: Respect firmware ELF entry point 2 months ago
sifive_e.c hw: Remove unused inclusion of hw/char/serial.h 2 months ago
sifive_u.c target/riscv: Add fw_dynamic_info32 for booting RV32 OpenSBI 1 month ago
spike.c hw/riscv: Respect firmware ELF entry point 2 months ago
trace-events hw/riscv/riscv-iommu: add ATS support 1 month ago
trace.h hw/riscv: add RISC-V IOMMU base emulation 1 month ago
virt-acpi-build.c hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART 4 months ago
virt.c hw/riscv/virt.c: support for RISC-V IOMMU PCIDevice hotplug 1 month ago