ia64/xen-unstable

changeset 18786:7e8db19d72a5

x86: fix getvcpucontext for HVM segment registers

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Nov 11 11:13:57 2008 +0000 (2008-11-11)
parents 92d0e13b0ea3
children 7be8e7eefbd7
files xen/arch/x86/domctl.c
line diff
     1.1 --- a/xen/arch/x86/domctl.c	Tue Nov 11 11:10:59 2008 +0000
     1.2 +++ b/xen/arch/x86/domctl.c	Tue Nov 11 11:13:57 2008 +0000
     1.3 @@ -1074,11 +1074,24 @@ void arch_get_info_guest(struct vcpu *v,
     1.4  
     1.5      if ( is_hvm_vcpu(v) )
     1.6      {
     1.7 +        struct segment_register sreg;
     1.8          memset(c.nat->ctrlreg, 0, sizeof(c.nat->ctrlreg));
     1.9          c.nat->ctrlreg[0] = v->arch.hvm_vcpu.guest_cr[0];
    1.10          c.nat->ctrlreg[2] = v->arch.hvm_vcpu.guest_cr[2];
    1.11          c.nat->ctrlreg[3] = v->arch.hvm_vcpu.guest_cr[3];
    1.12          c.nat->ctrlreg[4] = v->arch.hvm_vcpu.guest_cr[4];
    1.13 +        hvm_get_segment_register(v, x86_seg_cs, &sreg);
    1.14 +        c.nat->user_regs.cs = sreg.sel;
    1.15 +        hvm_get_segment_register(v, x86_seg_ss, &sreg);
    1.16 +        c.nat->user_regs.ss = sreg.sel;
    1.17 +        hvm_get_segment_register(v, x86_seg_ds, &sreg);
    1.18 +        c.nat->user_regs.ds = sreg.sel;
    1.19 +        hvm_get_segment_register(v, x86_seg_es, &sreg);
    1.20 +        c.nat->user_regs.es = sreg.sel;
    1.21 +        hvm_get_segment_register(v, x86_seg_fs, &sreg);
    1.22 +        c.nat->user_regs.fs = sreg.sel;
    1.23 +        hvm_get_segment_register(v, x86_seg_gs, &sreg);
    1.24 +        c.nat->user_regs.gs = sreg.sel;
    1.25      }
    1.26      else
    1.27      {