Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel
[PATCH 2 of 2] [v3] xen/x86: Add FS and GS base to HVM VCPU context
 

Index | Next | Previous | View Flat


aravindh at virtuata

Apr 25, 2012, 11:38 AM


Views: 61
Permalink
[PATCH 2 of 2] [v3] xen/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 [at] virtuata>

diff -r be41f3b599d9 -r 1f39b9fe704f xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c Wed Apr 25 11:35:29 2012 -0700
+++ b/xen/arch/x86/domctl.c Wed Apr 25 11:35:43 2012 -0700
@@ -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-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Subject User Time
[PATCH 2 of 2] [v3] xen/x86: Add FS and GS base to HVM VCPU context aravindh at virtuata Apr 25, 2012, 11:38 AM
    Re: [PATCH 2 of 2] [v3] xen/x86: Add FS and GS base to HVM VCPU context JBeulich at suse Apr 27, 2012, 5:49 AM
        Re: [PATCH 2 of 2] [v3] xen/x86: Add FS and GS base to HVM VCPU context keir at xen Apr 27, 2012, 8:02 AM
            Re: [PATCH 2 of 2] [v3] xen/x86: Add FS and GS base to HVM VCPU context aravindh at virtuata Apr 27, 2012, 8:23 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.