diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2021-07-03 00:04:26 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-08-02 15:36:36 +0200 |
commit | 19025e7bc5977b35c73bea99841245f93470105e (patch) | |
tree | 32768d9000db526ba4433478aab2a03a9e4647f3 /arch | |
parent | KVM: x86: Use KVM_BUG/KVM_BUG_ON to handle bugs that are fatal to the VM (diff) | |
download | linux-19025e7bc5977b35c73bea99841245f93470105e.tar.xz linux-19025e7bc5977b35c73bea99841245f93470105e.zip |
KVM: x86/mmu: Mark VM as bugged if page fault returns RET_PF_INVALID
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <298980aa5fc5707184ac082287d13a800cd9c25f.1625186503.git.isaku.yamahata@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/mmu/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 66f7f5bc3482..ce1d955a0536 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -5134,7 +5134,7 @@ int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa, u64 error_code, if (r == RET_PF_INVALID) { r = kvm_mmu_do_page_fault(vcpu, cr2_or_gpa, lower_32_bits(error_code), false); - if (WARN_ON_ONCE(r == RET_PF_INVALID)) + if (KVM_BUG_ON(r == RET_PF_INVALID, vcpu->kvm)) return -EIO; } |