summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/mmu/spte.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/kvm/mmu/spte.c b/arch/x86/kvm/mmu/spte.c
index 8275b96b6596..b15ce06edb46 100644
--- a/arch/x86/kvm/mmu/spte.c
+++ b/arch/x86/kvm/mmu/spte.c
@@ -296,11 +296,7 @@ u64 make_huge_page_split_spte(struct kvm *kvm, u64 huge_spte, union kvm_mmu_page
{
u64 child_spte;
- if (WARN_ON_ONCE(!is_shadow_present_pte(huge_spte)))
- return 0;
-
- if (WARN_ON_ONCE(!is_large_pte(huge_spte)))
- return 0;
+ KVM_BUG_ON(!is_shadow_present_pte(huge_spte) || !is_large_pte(huge_spte), kvm);
child_spte = huge_spte;