ia64/xen-unstable

changeset 8885:4ca6f052cdf6

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@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Fri Feb 17 11:49:11 2006 +0000 (2006-02-17)
parents e299470e8793
children 6f874e089244
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Fri Feb 17 12:28:35 2006 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Fri Feb 17 11:49:11 2006 +0000
     1.3 @@ -901,7 +901,8 @@ static int emulate_privileged_op(struct 
     1.4              break;
     1.5              
     1.6          case 3: /* Read CR3 */
     1.7 -            *reg = pagetable_get_paddr(v->arch.guest_table);
     1.8 +            *reg = pfn_to_paddr(mfn_to_gmfn(v->domain,
     1.9 +                                    pagetable_get_pfn(v->arch.guest_table)));
    1.10              break;
    1.11  
    1.12          case 4: /* Read CR4 */
    1.13 @@ -950,7 +951,7 @@ static int emulate_privileged_op(struct 
    1.14              
    1.15          case 3: /* Write CR3 */
    1.16              LOCK_BIGLOCK(v->domain);
    1.17 -            (void)new_guest_cr3(*reg);
    1.18 +            (void)new_guest_cr3(gmfn_to_mfn(v->domain, paddr_to_pfn(*reg)));
    1.19              UNLOCK_BIGLOCK(v->domain);
    1.20              break;
    1.21