All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aravindh Puthiyaparambil <aravindh@virtuata.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] xen: Add GS base to HVM VCPU context
Date: Mon, 23 Apr 2012 12:11:00 -0700	[thread overview]
Message-ID: <CAB10MZBUPC2AyZ5CCzEOCezq+pefiqZ_SyWCb7JWVDWhJnA=TA@mail.gmail.com> (raw)
In-Reply-To: <4F9526A9020000780007F36B@nat28.tlf.novell.com>

On Mon, Apr 23, 2012 at 12:53 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>> On 23.04.12 at 09:47, Aravindh Puthiyaparambil <aravindh@virtuata.com> wrote:
>> On Apr 23, 2012 12:41 AM, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>
>>> >>> On 21.04.12 at 02:58, Aravindh Puthiyaparambil <aravindh@virtuata.com>
>> wrote:
>>> > Add GS base to the HVM VCPU context returned by xc_vcpu_getcontext()
>>> >
>>> > Signed-off-by: Aravindh Puthiyaparambil <aravindh@virtuata.com>
>>> >
>>> > 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

  reply	other threads:[~2012-04-23 19:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-21  0:58 [PATCH] xen: Add GS base to HVM VCPU context Aravindh Puthiyaparambil
2012-04-23  7:41 ` Jan Beulich
2012-04-23  7:47   ` Aravindh Puthiyaparambil
2012-04-23  7:53     ` Jan Beulich
2012-04-23 19:11       ` Aravindh Puthiyaparambil [this message]
2012-04-23 21:04         ` Keir Fraser
2012-04-23 22:11           ` Aravindh Puthiyaparambil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAB10MZBUPC2AyZ5CCzEOCezq+pefiqZ_SyWCb7JWVDWhJnA=TA@mail.gmail.com' \
    --to=aravindh@virtuata.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.