From 3bb65a22a4502067f8cd3cb4c923ffa70be62091 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 5 Jan 2007 16:36:51 -0800 Subject: [PATCH] KVM: MMU: Never free a shadow page actively serving as a root We always need cr3 to point to something valid, so if we detect that we're freeing a root page, simply push it back to the top of the active list. Signed-off-by: Avi Kivity Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/kvm/kvm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/kvm/kvm.h') diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 201b2735ca91..b24a86e1f434 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -134,6 +134,7 @@ struct kvm_mmu_page { */ int global; /* Set if all ptes in this page are global */ int multimapped; /* More than one parent_pte? */ + int root_count; /* Currently serving as active root */ union { u64 *parent_pte; /* !multimapped */ struct hlist_head parent_ptes; /* multimapped, kvm_pte_chain */ -- cgit v1.2.3