On Mon, 02 Feb 2026 15:22:53 +0000, Fuad Tabba wrote:
The NV stage-2 manipulation functions kvm_nested_s2_unmap(),
kvm_nested_s2_wp(), and others, are being called for any stage-2
manipulation regardless of whether nested virtualization is supported or
enabled for the VM.
For protected KVM (pKVM), `struct kvm_pgtable` uses the
`pkvm_mappings` member of the union. This member aliases `ia_bits`,
which is used by the non-protected NV code paths. Attempting to
read `pgt->ia_bits` in these functions results in treating
protected mapping pointers or state values as bit-shift amounts.
This triggers a UBSAN shift-out-of-bounds error:
[...]
Applied to next, thanks!
[1/1] KVM: arm64: nv: Avoid NV stage-2 code when NV is not supported
commit: 0c4762e26879acc101790269382f230f22fd6905
Cheers,
M.
--
Without deviation from the norm, progress is not possible.