[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86 hvm: Drop pagetable reference when resetting a VCPU to real mode.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1211787959 -3600
# Node ID 14f03101b61ce87d3c8274b4fac785e34c0819eb
# Parent  57923ddaacb96e0b4dc0cc2203ca5bee79a829a3
x86 hvm: Drop pagetable reference when resetting a VCPU to real mode.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -r 57923ddaacb9 -r 14f03101b61c xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Mon May 26 08:37:43 2008 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Mon May 26 08:45:59 2008 +0100
@@ -2073,6 +2073,13 @@ void hvm_vcpu_reset_state(struct vcpu *v
     if ( v->is_initialised )
         goto out;
 
+    if ( !paging_mode_hap(d) )
+    {
+        if ( v->arch.hvm_vcpu.guest_cr[0] & X86_CR0_PG )
+            put_page(pagetable_get_page(v->arch.guest_table));
+        v->arch.guest_table = pagetable_null();
+    }
+
     ctxt = &v->arch.guest_context;
     memset(ctxt, 0, sizeof(*ctxt));
     ctxt->flags = VGCF_online;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.