[PATCH 3/4] KVM: x86: Remove kvm_mmu_reset_context() in kvm_set_efer()
Modify EFER won't result in mode switch directly. After EFER.LME set, the following set CR0.PG would result in mode switch to IA32e. And the later action already covered by kvm_set_cr0(). Signed-off-by: Sheng Yang --- arch/x86/kvm/x86.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 764f89b..b59fc67 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -721,7 +721,6 @@ static int set_efer(struct kvm_vcpu *vcpu, u64 efer) kvm_x86_ops->set_efer(vcpu, efer); vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled; - kvm_mmu_reset_context(vcpu); return 0; } -- 1.7.0.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/4] KVM: x86: Remove kvm_mmu_reset_context() in kvm_set_efer()
On Tue, May 11, 2010 at 01:30:06PM +0800, Sheng Yang wrote: > Modify EFER won't result in mode switch directly. After EFER.LME set, the > following set CR0.PG would result in mode switch to IA32e. And the later > action already covered by kvm_set_cr0(). > > Signed-off-by: Sheng Yang > --- > arch/x86/kvm/x86.c |1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 764f89b..b59fc67 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -721,7 +721,6 @@ static int set_efer(struct kvm_vcpu *vcpu, u64 efer) > kvm_x86_ops->set_efer(vcpu, efer); > > vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled; > - kvm_mmu_reset_context(vcpu); But there are different sets of shadow pagetables for NXE on/off. See commit 9645bb56b31a1b. Without the reset, after NXE 1->0 transition, a spte retains the NXE validity check, and subsequent use of such gpte with bit 63 set does not cause a fault. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] KVM: x86: Remove kvm_mmu_reset_context() in kvm_set_efer()
Modify EFER won't result in mode switch directly. After EFER.LME set, the following set CR0.PG would result in mode switch to IA32e. And the later action already covered by kvm_set_cr0(). Signed-off-by: Sheng Yang --- arch/x86/kvm/x86.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 764f89b..b59fc67 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -721,7 +721,6 @@ static int set_efer(struct kvm_vcpu *vcpu, u64 efer) kvm_x86_ops->set_efer(vcpu, efer); vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled; - kvm_mmu_reset_context(vcpu); return 0; } -- 1.7.0.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html