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

[Xen-changelog] Fix Read/Write CR3 emulation.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 4ca6f052cdf6f1c18209042e4c9960ca41e75d4b
# Parent  e299470e879358118667dbb95c6735af22c3a31d
Fix Read/Write CR3 emulation.
- on write, new_guest_cr3() takes an mfn not an ma
- for shadow_translate guests, apply mfn_to_gmfn/gmfn_to_mfn

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r e299470e8793 -r 4ca6f052cdf6 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Fri Feb 17 11:28:35 2006
+++ b/xen/arch/x86/traps.c      Fri Feb 17 11:49:11 2006
@@ -901,7 +901,8 @@
             break;
             
         case 3: /* Read CR3 */
-            *reg = pagetable_get_paddr(v->arch.guest_table);
+            *reg = pfn_to_paddr(mfn_to_gmfn(v->domain,
+                                    pagetable_get_pfn(v->arch.guest_table)));
             break;
 
         case 4: /* Read CR4 */
@@ -950,7 +951,7 @@
             
         case 3: /* Write CR3 */
             LOCK_BIGLOCK(v->domain);
-            (void)new_guest_cr3(*reg);
+            (void)new_guest_cr3(gmfn_to_mfn(v->domain, paddr_to_pfn(*reg)));
             UNLOCK_BIGLOCK(v->domain);
             break;
 

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