Paolo Bonzini 9191b8f074 KVM: x86/mmu: avoid NULL-pointer dereference on page freeing bugs
WARN and bail if KVM attempts to free a root that isn't backed by a shadow
page.  KVM allocates a bare page for "special" roots, e.g. when using PAE
paging or shadowing 2/3/4-level page tables with 4/5-level, and so root_hpa
will be valid but won't be backed by a shadow page.  It's all too easy to
blindly call mmu_free_root_page() on root_hpa, be nice and WARN instead of
crashing KVM and possibly the kernel.

Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-02-25 08:20:16 -05:00
..
2022-01-23 06:20:44 +02:00
2022-01-23 06:20:44 +02:00
2022-02-11 12:10:57 -05:00
2022-01-23 06:20:44 +02:00
2022-01-23 06:20:44 +02:00
2022-01-23 06:20:44 +02:00
2022-01-23 06:20:44 +02:00
2022-01-19 11:15:19 +02:00
2022-02-05 09:55:59 -08:00
2022-01-19 11:15:19 +02:00
2022-01-19 11:15:19 +02:00
2022-01-23 06:20:44 +02:00
2022-01-23 06:20:44 +02:00
2022-02-05 00:58:25 -05:00
2022-01-23 06:20:44 +02:00
2022-01-23 06:20:44 +02:00
2022-01-23 06:20:44 +02:00