From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH] xen: Add GS base to HVM VCPU context Date: Mon, 23 Apr 2012 08:53:45 +0100 Message-ID: <4F9526A9020000780007F36B@nat28.tlf.novell.com> References: <4F9523DD020000780007F339@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Aravindh Puthiyaparambil Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 23.04.12 at 09:47, Aravindh Puthiyaparambil wrote: > On Apr 23, 2012 12:41 AM, "Jan Beulich" wrote: >> >> >>> On 21.04.12 at 02:58, Aravindh Puthiyaparambil > wrote: >> > Add GS base to the HVM VCPU context returned by xc_vcpu_getcontext() >> > >> > Signed-off-by: Aravindh Puthiyaparambil >> > >> > diff -r e62ab14d44af -r babbb3e0f4d3 xen/arch/x86/domctl.c >> > --- a/xen/arch/x86/domctl.c Fri Apr 20 11:36:02 2012 -0700 >> > +++ b/xen/arch/x86/domctl.c Fri Apr 20 17:55:49 2012 -0700 >> > @@ -1592,6 +1592,12 @@ void arch_get_info_guest(struct vcpu *v, >> > c.nat->user_regs.fs = sreg.sel; >> > 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; >> > + else >> > + c.nat->gs_base_user = sreg.base; >> > +#endif >> >> If you do anything like this, do it completely please (i.e. fill all three >> base address fields instead of just one). >> > > Sure. I was not sure if it was ok to add fields to the vcpu context > structure which is why I didn't do it across the board. I will do so and > resubmit. I don't see what fields you would need to add. Jan