summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDan Carpenter <dan@pereq.eu>2026-11-18 18:29:51 +0300
committerMarc Zyngier <maz@kernel.org>2026-11-19 10:26:58 +0000
commit88fa0c91640ce163190531bf3e975c73c77d7c7b (patch)
treea682f68d0d367cbae5f42edfa254999ecab17f77 /scripts
parent6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 (diff)
KVM: arm64: nv: Forward PIR_EL2, PIRE0_EL2 and POR_EL2 traps
These registers were added to KVM, but not to the encoding_to_cgt[] table which decides when a trap is forwarded to a nested hypervisor. The result is that if an L1 hypervisor runs its L2 with HCR_EL2.NV set (meaning the L2 is itself a hypervisor), and the L2 accesses these registers, KVM handles the access itself and it goes to the L1's own registers instead of being emulated on L1. This is quite a serious bug because it lets the L2 change the permissions of the L1's own stage 1 translations. It could mark everything as no-access and cause a crash in L1 or mark everything as read-write-execute which weakens the protections in L1. Add the three registers with CGT_HCR_NV, MAIR_EL2 and AMAIR_EL2. Fixes: 874ae1d48e60 ("KVM: arm64: Handle PIR{,E0}_EL2 traps") Fixes: 5970e9903f03 ("KVM: arm64: Add basic support for POR_EL2") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan@pereq.eu> Link: https://patch.msgid.link/79097fe98499631673fd536ef2f1b8cfc92b979d.1795014776.git.dan@pereq.eu Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions