浏览代码

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fix from Paolo Bonzini:
 "This single patch fixes a regression caused by one of the
  optimizations introduced in 3.11, which is generally visible only on
  AMD processors"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: MMU: avoid fast page fault fixing mmio page fault
Linus Torvalds 12 年之前
父节点
当前提交
b8a33fc725
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      arch/x86/kvm/mmu.c

+ 7 - 0
arch/x86/kvm/mmu.c

@@ -2810,6 +2810,13 @@ exit:
 
 static bool page_fault_can_be_fast(struct kvm_vcpu *vcpu, u32 error_code)
 {
+	/*
+	 * Do not fix the mmio spte with invalid generation number which
+	 * need to be updated by slow page fault path.
+	 */
+	if (unlikely(error_code & PFERR_RSVD_MASK))
+		return false;
+
 	/*
 	 * #PF can be fast only if the shadow page table is present and it
 	 * is caused by write-protect, that means we just need change the