summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-01-05 16:36:51 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-05 23:55:26 -0800
commit3bb65a22a4502067f8cd3cb4c923ffa70be62091 (patch)
treeb8ee904c9a4b99f0c8f58e93b257f653222e3ba0 /drivers/kvm/kvm.h
parent86a5ba025d0a0b251817d0efbeaf7037d4175d21 (diff)
downloadop-kernel-dev-3bb65a22a4502067f8cd3cb4c923ffa70be62091.zip
op-kernel-dev-3bb65a22a4502067f8cd3cb4c923ffa70be62091.tar.gz
[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 <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 201b273..b24a86e 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 */
OpenPOWER on IntegriCloud