Skip to contentSkip to conversation

KVM: MMU: unnecessary NX state assignment

PATCH Applied Davidlohr Bueso 2 participants 3 messages Jan 6, 2012 – Jan 10, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: MMU: unnecessary NX state assignment

From: Davidlohr Bueso <[email protected]>

We can remove the first ->nx state assignment since it is assigned afterwards anyways.

---
 arch/x86/kvm/mmu.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/x86/kvm/mmu.c +0 -1
index f1b36cf..efc0dd2 100644
@@ -3320,7 +3320,6 @@ static int init_kvm_tdp_mmu(struct kvm_vcpu *vcpu)
 	context->get_cr3 = get_cr3;
 	context->get_pdptr = kvm_pdptr_read;
 	context->inject_page_fault = kvm_inject_page_fault;
-	context->nx = is_nx(vcpu);
 
 	if (!is_paging(vcpu)) {
 		context->nx = false;
Signature · 1 line
1.7.4.1
#1 lore raw

ping

Quoted 21 lines · Davidlohr Bueso

From: Davidlohr Bueso <[email protected]>

We can remove the first ->nx state assignment since it is assigned afterwards anyways.

---
 arch/x86/kvm/mmu.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/x86/kvm/mmu.c +0 -1
index f1b36cf..efc0dd2 100644
@@ -3320,7 +3320,6 @@ static int init_kvm_tdp_mmu(struct kvm_vcpu *vcpu)
 	context->get_cr3 = get_cr3;
 	context->get_pdptr = kvm_pdptr_read;
 	context->inject_page_fault = kvm_inject_page_fault;
-	context->nx = is_nx(vcpu);
 
 	if (!is_paging(vcpu)) {
 		context->nx = false;