Skip to content

RISC-V: KVM: Validate AIA MMIO ranges against GPA width

Pengpeng Hou kvm kvm-riscv linux-riscv lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 4 repliesIn review

Changes in v2 from the cover letter

https://lore.kernel.org/r/[email protected]/
- Preserve the required-address checks and existing cleanup path.
- Remove the all-vCPU range-validation pass.
- Explain why only APLIC needs a range recheck before initialization.
- Retain Anup's Reviewed-by for unchanged patch 2.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2RISC-V: KVM: Validate AIA MMIO address rangesarch/riscv/kvm/aia_device.c+38 -41 reply
2/2RISC-V: KVM: Disallow GPA-width changes after AIA initarch/riscv/kvm/vm.c+2 -12 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAnup PatelNutty Liu
1/2R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] RISC-V: KVM: Validate AIA MMIO ranges against GPA width

This revision keeps the existing mandatory-address checks and narrows the initialization revalidation to APLIC. An IMSIC address is only set after a vCPU exists, which already freezes the selected GPA width. APLIC can be configured earlier, so its range is rechecked at init.

Patch 2 keeps the previously reviewed GPA-width freeze unchanged.

Changes since v1:
https://lore.kernel.org/r/[email protected]/
- Preserve the required-address checks and existing cleanup path.
- Remove the all-vCPU range-validation pass.
- Explain why only APLIC needs a range recheck before initialization.
- Retain Anup's Reviewed-by for unchanged patch 2.

The issues were found by our static-analysis tool. AI assistance was used to revise the patches and descriptions following the review.

Pengpeng Hou (2):
RISC-V: KVM: Validate AIA MMIO address ranges
RISC-V: KVM: Disallow GPA-width changes after AIA init

 arch/riscv/kvm/aia_device.c | 42 +++++++++++++++++++++++++++++++++----
 arch/riscv/kvm/vm.c         |  3 ++-
 2 files changed, 40 insertions(+), 5 deletions(-)

base-commit: 518e5b794c06c0f0eb40df3e202274a66202c137

Signature · 3 lines
kvm-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kvm-riscv