RISC-V: KVM: Validate AIA MMIO ranges against GPA width
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | RISC-V: KVM: Validate AIA MMIO address rangesarch/ | +66 | 1 reply | |
| 2/2 | RISC-V: KVM: Disallow GPA-width changes after AIA initarch/ | +2 | 1 reply |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Anup Patel |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] RISC-V: KVM: Validate AIA MMIO ranges against GPA width
The AIA device API currently checks only the alignment of userspace- supplied APLIC and IMSIC base addresses. This can publish a wrapping fixed-size MMIO interval or one that lies beyond the selected stage-2 guest physical address (GPA) width.
There are two points to close because the GPA width is configurable:
1. Validate every complete range when it is stored and again immediately before AIA initialization publishes the first MMIO device.
2. Once AIA initialization has published those devices, prevent the GPA width from being reduced below their addresses.
Both initialization and GPA-width changes are serialized by kvm->lock. The series was reviewed against the RISC-V KVM queue at dfdf1374fdeccb5b7e3d35186228e01ec5ea5f01. No build or runtime testing was performed.
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 | 79 +++++++++++++++++++++++++++++++------ arch/riscv/kvm/vm.c | 3 +- 2 files changed, 68 insertions(+), 14 deletions(-)
Signature · 1 line
2.50.1 (Apple Git-155)