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

[Xen-changelog] [xen-unstable] x86_64: explicitly zero CR[1] in getvcpucontext for guests with no user PT



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1239022595 -3600
# Node ID 1f705f0a32e2b99423394ef0e2f2348199f13a8e
# Parent  3fecb8f43617039fc71a5c01ad8266c74c7be0cb
x86_64: explicitly zero CR[1] in getvcpucontext for guests with no user PT

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 xen/arch/x86/domctl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 3fecb8f43617 -r 1f705f0a32e2 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Mon Apr 06 13:52:56 2009 +0100
+++ b/xen/arch/x86/domctl.c     Mon Apr 06 13:56:35 2009 +0100
@@ -1161,9 +1161,9 @@ void arch_get_info_guest(struct vcpu *v,
             c.nat->ctrlreg[3] = xen_pfn_to_cr3(
                 pagetable_get_pfn(v->arch.guest_table));
 #ifdef __x86_64__
-            if ( !pagetable_is_null(v->arch.guest_table_user) )
-                c.nat->ctrlreg[1] = xen_pfn_to_cr3(
-                    pagetable_get_pfn(v->arch.guest_table_user));
+            c.nat->ctrlreg[1] =
+                pagetable_is_null(v->arch.guest_table_user) ? 0
+                : xen_pfn_to_cr3(pagetable_get_pfn(v->arch.guest_table_user));
 #endif
 
             /* Merge shadow DR7 bits into real DR7. */

_______________________________________________
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®.