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

[Xen-changelog] [xen-unstable] x86: fix getvcpucontext for HVM segment registers



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1226402037 0
# Node ID 7e8db19d72a54a86034177e2a48f7d2a2af87648
# Parent  92d0e13b0ea365f019116450910bb0f3819c109c
x86: fix getvcpucontext for HVM segment registers

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/domctl.c |   13 +++++++++++++
 1 files changed, 13 insertions(+)

diff -r 92d0e13b0ea3 -r 7e8db19d72a5 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Tue Nov 11 11:10:59 2008 +0000
+++ b/xen/arch/x86/domctl.c     Tue Nov 11 11:13:57 2008 +0000
@@ -1074,11 +1074,24 @@ void arch_get_info_guest(struct vcpu *v,
 
     if ( is_hvm_vcpu(v) )
     {
+        struct segment_register sreg;
         memset(c.nat->ctrlreg, 0, sizeof(c.nat->ctrlreg));
         c.nat->ctrlreg[0] = v->arch.hvm_vcpu.guest_cr[0];
         c.nat->ctrlreg[2] = v->arch.hvm_vcpu.guest_cr[2];
         c.nat->ctrlreg[3] = v->arch.hvm_vcpu.guest_cr[3];
         c.nat->ctrlreg[4] = v->arch.hvm_vcpu.guest_cr[4];
+        hvm_get_segment_register(v, x86_seg_cs, &sreg);
+        c.nat->user_regs.cs = sreg.sel;
+        hvm_get_segment_register(v, x86_seg_ss, &sreg);
+        c.nat->user_regs.ss = sreg.sel;
+        hvm_get_segment_register(v, x86_seg_ds, &sreg);
+        c.nat->user_regs.ds = sreg.sel;
+        hvm_get_segment_register(v, x86_seg_es, &sreg);
+        c.nat->user_regs.es = sreg.sel;
+        hvm_get_segment_register(v, x86_seg_fs, &sreg);
+        c.nat->user_regs.fs = sreg.sel;
+        hvm_get_segment_register(v, x86_seg_gs, &sreg);
+        c.nat->user_regs.gs = sreg.sel;
     }
     else
     {

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