[PATCH v1] KVM: arm64: Revert accidental drop of kvm_uninit_stage2_mmu() for non-NV VMs

Mark Brown broonie at kernel.org
Mon Feb 23 08:16:48 PST 2026


On Sun, Feb 22, 2026 at 08:33:52AM +0000, Fuad Tabba wrote:
> Commit 0c4762e26879 ("KVM: arm64: nv: Avoid NV stage-2 code when NV is
> not supported") added an early return to several functions in
> arch/arm64/kvm/nested.c to prevent a UBSAN shift-out-of-bounds error
> when accessing the pgt union for non-nested VMs.

Thanks Fuad, that seems to have been it:

Tested-by: Mark Brown <broonie at kernel.org>

The patch also seems to address some spurious OOMs that I was able to
reproduce with qemu when running the kselftests on pKVM:

   https://lava.sirena.org.uk/scheduler/job/2482739#L2375
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260223/5fce44fc/attachment.sig>


More information about the linux-arm-kernel mailing list