[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH] xen: Add GS base to HVM VCPU context
- To: Jan Beulich <JBeulich@xxxxxxxx>
- From: Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx>
- Date: Mon, 23 Apr 2012 12:11:00 -0700
- Cc: xen-devel <xen-devel@xxxxxxxxxxxxx>
- Delivery-date: Mon, 23 Apr 2012 19:11:40 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuata.com; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5QgmzMv6oCCWIAX/qrmv/P/OxGDqMBVX6qmANtWhl+o=; b=Jhin1HbkJ2qo0+ps6kZjV5EfPgo0EkOdNspPR9n2/gFxiY6bbn2MTjAh/3DQcAu2NH S88EGMIG/e4YqDoNDDI1Jlzx0ninXC0pZ2sclDLIaGMx07JNPknnJQc7phZ4gMdMgkdF 1N1ICxd+jGLDcPyxsh/77m9mw82SG+B1zqY7I=
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On Mon, Apr 23, 2012 at 12:53 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>> On 23.04.12 at 09:47, Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx>
>>>> wrote:
>> On Apr 23, 2012 12:41 AM, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
>>>
>>> >>> On 21.04.12 at 02:58, Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx>
>> wrote:
>>> > Add GS base to the HVM VCPU context returned by xc_vcpu_getcontext()
>>> >
>>> > Signed-off-by: Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx>
>>> >
>>> > 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.
Don't I need to add ss_base, cs_base, es_base, ds_base to
vcpu_guest_context? I am assuming both 32-bit and 64-bit cases.
Aravindh
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel