Re: [PATCH] KVM: x86/mmu: Bug the VM, not the host kernel, if KVM write-protects upper SPTEs
From: Huang, Kai
Date: Fri Jun 19 2026 - 00:40:55 EST
On Thu, 2026-06-18 at 11:56 -0700, Sean Christopherson wrote:
> WARN and terminate the VM if KVM attempts to write-protect non-leaf SPTEs
> instead of bugging the host kernel, as there is no reason to bring down the
> entire host. Even termininating the VM is likely overkill, but in theory a
> missed write could corrupt guest memory, so play it safe.
>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
I wondered a bit whether the BUG_ON() was for checking "non-leaf SPTEs". I.e.,
maybe "write-protect the level which cannot have any leaf SPTE" reflects better,
but perhaps they are the same thing.
Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>