mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] RISC-V: KVM: Validate AIA MMIO ranges against GPA width
@ 2026-09-20 13:08 Pengpeng Hou
  2026-09-20 13:09 ` [PATCH v2 1/2] RISC-V: KVM: Validate AIA MMIO address ranges Pengpeng Hou
  2026-09-20 13:09 ` [PATCH v2 2/2] RISC-V: KVM: Disallow GPA-width changes after AIA init Pengpeng Hou
  0 siblings, 2 replies; 3+ messages in thread
From: Pengpeng Hou @ 2026-09-20 13:08 UTC (permalink / raw)
  To: anup
  Cc: Pengpeng Hou, Alexandre Ghiti, Andrew Jones, Albert Ou,
	Atish Patra, Fangyu Yu, Guo Ren, kvm-riscv, kvm, linux-kernel,
	linux-riscv, Nutty Liu, Palmer Dabbelt, Paul Walmsley

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/cover.1786512671.git.pengpeng@iscas.ac.cn/
- 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-20 13:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-20 13:08 [PATCH v2 0/2] RISC-V: KVM: Validate AIA MMIO ranges against GPA width Pengpeng Hou
2026-09-20 13:09 ` [PATCH v2 1/2] RISC-V: KVM: Validate AIA MMIO address ranges Pengpeng Hou
2026-09-20 13:09 ` [PATCH v2 2/2] RISC-V: KVM: Disallow GPA-width changes after AIA init Pengpeng Hou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®