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

[Xen-changelog] [xen-unstable] x86: Add FS and GS base to HVM VCPU context


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Mon, 14 May 2012 16:32:09 +0000
  • Delivery-date: Mon, 14 May 2012 16:32:15 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx>
# Date 1335542275 -7200
# Node ID 9dda0efd8ce153049579a364974f50294702ffd2
# Parent  fd04ba0aa4fa6e06b58f9c3ed4e1cd3830459bc6
x86: Add FS and GS base to HVM VCPU context

Add FS and GS base to the HVM VCPU context returned by
xc_vcpu_getcontext().

Signed-off-by: Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r fd04ba0aa4fa -r 9dda0efd8ce1 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Fri Apr 27 17:54:00 2012 +0200
+++ b/xen/arch/x86/domctl.c     Fri Apr 27 17:57:55 2012 +0200
@@ -1590,8 +1590,23 @@ void arch_get_info_guest(struct vcpu *v,
         c.nat->user_regs.es = sreg.sel;
         hvm_get_segment_register(v, x86_seg_fs, &sreg);
         c.nat->user_regs.fs = sreg.sel;
+#ifdef __x86_64__
+        c.nat->fs_base = sreg.base;
+#endif
         hvm_get_segment_register(v, x86_seg_gs, &sreg);
         c.nat->user_regs.gs = sreg.sel;
+#ifdef __x86_64__
+        if ( ring_0(&c.nat->user_regs) )
+        {
+            c.nat->gs_base_kernel = sreg.base;
+            c.nat->gs_base_user = hvm_get_shadow_gs_base(v);
+        }
+        else
+        {
+            c.nat->gs_base_user = sreg.base;
+            c.nat->gs_base_kernel = hvm_get_shadow_gs_base(v);
+        }
+#endif
     }
     else
     {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.