ia64/xen-unstable

changeset 8949:e8d044119316

No need for save_segments() on HVM 64b guest.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Feb 21 18:19:16 2006 +0100 (2006-02-21)
parents 991c4d62d392
children 1fd6e9c32b03
files xen/arch/x86/domain.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Tue Feb 21 18:15:49 2006 +0100
     1.2 +++ b/xen/arch/x86/domain.c	Tue Feb 21 18:19:16 2006 +0100
     1.3 @@ -610,9 +610,6 @@ static void save_segments(struct vcpu *v
     1.4      struct cpu_user_regs      *regs = &ctxt->user_regs;
     1.5      unsigned int dirty_segment_mask = 0;
     1.6  
     1.7 -    if ( HVM_DOMAIN(v) )
     1.8 -        hvm_save_segments(v);
     1.9 -
    1.10      regs->ds = read_segment_register(ds);
    1.11      regs->es = read_segment_register(es);
    1.12      regs->fs = read_segment_register(fs);
    1.13 @@ -682,9 +679,15 @@ static void __context_switch(void)
    1.14                 stack_regs,
    1.15                 CTXT_SWITCH_STACK_BYTES);
    1.16          unlazy_fpu(p);
    1.17 -        save_segments(p);
    1.18 -        if ( HVM_DOMAIN(p) )
    1.19 +        if ( !HVM_DOMAIN(p) )
    1.20 +        {
    1.21 +            save_segments(p);
    1.22 +        }
    1.23 +        else
    1.24 +        {
    1.25 +            hvm_save_segments(v);
    1.26              hvm_load_msrs();
    1.27 +        }
    1.28      }
    1.29  
    1.30      if ( !is_idle_vcpu(n) )