Skip to contentSkip to conversation

KVM MMU: remove unused field

PATCH Applied Xiao Guangrong 2 participants 3 messages Apr 6, 2010 – Apr 7, 2010

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

PATCH 1/2 KVM MMU: remove unused field

kvm_mmu_page.oos_link is not used, so remove it

---
 arch/x86/include/asm/kvm_host.h |    2 --
 arch/x86/kvm/mmu.c              |    1 -
 2 files changed, 0 insertions(+), 3 deletions(-)
arch/x86/include/asm/kvm_host.h +0 -2
index 26c629a..0c49c88 100644
@@ -187,8 +187,6 @@ struct kvm_mmu_page {
 	struct list_head link;
 	struct hlist_node hash_link;
 
-	struct list_head oos_link;
-
 	/*
 	 * The following two entries are used to key the shadow page in the
 	 * hash table.
arch/x86/kvm/mmu.c +0 -1
index d7700bb..8dfe8eb 100644
@@ -922,7 +922,6 @@ static struct kvm_mmu_page *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu,
 	sp->gfns = mmu_memory_cache_alloc(&vcpu->arch.mmu_page_cache, PAGE_SIZE);
 	set_page_private(virt_to_page(sp->spt), (unsigned long)sp);
 	list_add(&sp->link, &vcpu->kvm->arch.active_mmu_pages);
-	INIT_LIST_HEAD(&sp->oos_link);
 	bitmap_zero(sp->slot_bitmap, KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS);
 	sp->multimapped = 0;
 	sp->parent_pte = parent_pte;
Signature · 1 line
1.6.1.2
#1 lore raw

PATCH 2/2 KVM MMU: remove unnecessary judgement

After is_rsvd_bits_set() checks, EFER.NXE must be enabled if NX bit is seted

---
 arch/x86/kvm/paging_tmpl.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/paging_tmpl.h +1 -1
index 067797a..d9dea28 100644
@@ -170,7 +170,7 @@ walk:
 			goto access_error;
 
 #if PTTYPE == 64
-		if (fetch_fault && is_nx(vcpu) && (pte & PT64_NX_MASK))
+		if (fetch_fault && (pte & PT64_NX_MASK))
 			goto access_error;
 #endif
 
Signature · 1 line
1.6.1.2