From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>,
Aravindh Puthiyaparambil <aravindh@virtuata.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 2 of 2] [v3] xen/x86: Add FS and GS base to HVM VCPU context
Date: Fri, 27 Apr 2012 16:02:46 +0100 [thread overview]
Message-ID: <CBC073A6.3F0F5%keir@xen.org> (raw)
In-Reply-To: <4F9AB1F90200007800080769@nat28.tlf.novell.com>
On 27/04/2012 13:49, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>> On 25.04.12 at 20:38, Aravindh Puthiyaparambil <aravindh@virtuata.com>
>>>> wrote:
>> Add FS and GS base to the HVM VCPU context returned by xc_vcpu_getcontext()
>
> Given that we're in feature freeze right now - is this actually fixing some
> shortcoming somewhere? Otherwise it may need to wait until 4.2 is out.
I think we can make a judgement call on this one that it is obviously safe
to check it in. Even if the patch is buggy, it's only filling in data fields
with garbage, which were uninitialised garbage in the first place.
-- Keir
> Jan
>
>> Signed-off-by: Aravindh Puthiyaparambil <aravindh@virtuata.com>
>>
>> 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
>> {
>
>
>
next prev parent reply other threads:[~2012-04-27 15:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 18:38 [PATCH 1 of 2] xen/hvm: Add get_shadow_gs_base() wrapper function Aravindh Puthiyaparambil
2012-04-25 18:38 ` [PATCH 2 of 2] [v3] xen/x86: Add FS and GS base to HVM VCPU context Aravindh Puthiyaparambil
2012-04-27 12:49 ` Jan Beulich
2012-04-27 15:02 ` Keir Fraser [this message]
2012-04-27 15:23 ` 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=CBC073A6.3F0F5%keir@xen.org \
--to=keir@xen.org \
--cc=JBeulich@suse.com \
--cc=aravindh@virtuata.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).