hw/riscv/riscv-iommu.c: set RISCV_IOMMU_FQ_HDR_PV appropriately
PATCH 1/1 hw/riscv/riscv-iommu.c: set RISCV_IOMMU_FQ_HDR_PV appropriately
We're hardcoding 'true' to FQ_HDR_PV in riscv_iommu_report_fault(). Use the 'pv' bool the caller provides that indicates if the process_id is valid.
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3556
--- hw/riscv/riscv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/riscv/riscv-iommu.c +1 -1
@@ -580,7 +580,7 @@ static void riscv_iommu_report_fault(RISCVIOMMUState *s, ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_CAUSE , cause); ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_TTYPE , fault_type); ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_DID , ctx->devid); - ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_PV , true); + ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_PV , pv);if (pv) { ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_PID , ctx->process_id);
Signature · 1 line
2.43.0
Quoted 8 lines · Daniel Henrique Barboza
We're hardcoding 'true' to
FQ_HDR_PVinriscv_iommu_report_fault(). Use the 'pv' bool the caller provides that indicates if theprocess_idis valid.Fixes 0c54acb8243d ("hw/riscv: add RISC-V IOMMU base emulation")Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3556
Signed-off-by Daniel Henrique Barboza <[email protected]>
Alistair
Quoted 21 lines
--- hw/riscv/riscv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/riscv/riscv-iommu.c +1
-2@@ -580,7 +580,7 @@ static void riscv_iommu_report_fault(RISCVIOMMUState *s, ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_CAUSE , cause); ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_TTYPE , fault_type); ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_DID , ctx->devid); - ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_PV , true); + ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_PV , pv);if (pv) { ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_PID , ctx->process_id); --2.43.0
Alistair Francis
AppliedQuoted 8 lines · Daniel Henrique Barboza
We're hardcoding 'true' to
FQ_HDR_PVinriscv_iommu_report_fault(). Use the 'pv' bool the caller provides that indicates if theprocess_idis valid.Fixes 0c54acb8243d ("hw/riscv: add RISC-V IOMMU base emulation")Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3556
Signed-off-by Daniel Henrique Barboza <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 21 lines
--- hw/riscv/riscv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/riscv/riscv-iommu.c +1
-2@@ -580,7 +580,7 @@ static void riscv_iommu_report_fault(RISCVIOMMUState *s, ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_CAUSE , cause); ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_TTYPE , fault_type); ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_DID , ctx->devid); - ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_PV , true); + ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_PV , pv);if (pv) { ev.hdr =set_field (ev.hdr,RISCV_IOMMU_FQ_HDR_PID , ctx->process_id); --2.43.0