• S
    KVM: x86/mmu: WARN on NULL pae_root or lm_root, or bad shadow root level · 73ad1606
    Sean Christopherson 提交于
    WARN if KVM is about to dereference a NULL pae_root or lm_root when
    loading an MMU, and convert the BUG() on a bad shadow_root_level into a
    WARN (now that errors are handled cleanly).  With nested NPT, botching
    the level and sending KVM down the wrong path is all too easy, and the
    on-demand allocation of pae_root and lm_root means bugs crash the host.
    Obviously, KVM could unconditionally allocate the roots, but that's
    arguably a worse failure mode as it would potentially corrupt the guest
    instead of crashing it.
    Signed-off-by: NSean Christopherson <seanjc@google.com>
    Message-Id: <20210305011101.3597423-18-seanjc@google.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    73ad1606
mmu.c 157.2 KB