aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 5548971ae80d..8e312a2e1412 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2647,6 +2647,15 @@ static void kvm_send_hwpoison_signal(unsigned long address, struct task_struct *
2647 2647
2648static int kvm_handle_bad_page(struct kvm_vcpu *vcpu, gfn_t gfn, pfn_t pfn) 2648static int kvm_handle_bad_page(struct kvm_vcpu *vcpu, gfn_t gfn, pfn_t pfn)
2649{ 2649{
2650 /*
2651 * Do not cache the mmio info caused by writing the readonly gfn
2652 * into the spte otherwise read access on readonly gfn also can
2653 * caused mmio page fault and treat it as mmio access.
2654 * Return 1 to tell kvm to emulate it.
2655 */
2656 if (pfn == KVM_PFN_ERR_RO_FAULT)
2657 return 1;
2658
2650 if (pfn == KVM_PFN_ERR_HWPOISON) { 2659 if (pfn == KVM_PFN_ERR_HWPOISON) {
2651 kvm_send_hwpoison_signal(gfn_to_hva(vcpu->kvm, gfn), current); 2660 kvm_send_hwpoison_signal(gfn_to_hva(vcpu->kvm, gfn), current);
2652 return 0; 2661 return 0;