Re: [RFC][PATCH] kvm: x86: fix stale mmio cache bug

2014-08-04 Thread Paolo Bonzini
Il 02/08/2014 06:15, Xiao Guangrong ha scritto: I prefer to also caching the spte’s generation number, then check the number in quickly_check_mmio_pf(). I agree, thanks Xiao for the review and David for the report! Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: [RFC][PATCH] kvm: x86: fix stale mmio cache bug

2014-08-04 Thread David Matlack
On Mon, Aug 4, 2014 at 5:44 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 02/08/2014 06:15, Xiao Guangrong ha scritto: I prefer to also caching the spte’s generation number, then check the number in quickly_check_mmio_pf(). I agree, thanks Xiao for the review and David for the report! I

[RFC][PATCH] kvm: x86: fix stale mmio cache bug

2014-08-01 Thread David Matlack
The following events can lead to an incorrect KVM_EXIT_MMIO bubbling up to userspace: (1) Guest accesses gpa X without a memory slot. The gfn is cached in struct kvm_vcpu_arch (mmio_gfn). On Intel EPT-enabled hosts, KVM sets the SPTE write-execute-noread so that future accesses cause

Re: [RFC][PATCH] kvm: x86: fix stale mmio cache bug

2014-08-01 Thread Xiao Guangrong
On Aug 2, 2014, at 7:54 AM, David Matlack dmatl...@google.com wrote: The following events can lead to an incorrect KVM_EXIT_MMIO bubbling up to userspace: (1) Guest accesses gpa X without a memory slot. The gfn is cached in struct kvm_vcpu_arch (mmio_gfn). On Intel EPT-enabled hosts, KVM