From: Weidong Han <weidong.han@intel.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>,
Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [PATCH 2/3 v2] XSAVE/XRSTOR: fix frozen states
Date: Wed, 01 Sep 2010 14:16:03 +0800 [thread overview]
Message-ID: <4C7DEFA3.209@intel.com> (raw)
In-Reply-To: <4C7D37F002000078000133A6@vpn.id2.novell.com>
Jan Beulich wrote:
>>>> On 31.08.10 at 16:52, "Han, Weidong" <weidong.han@intel.com> wrote:
>>>>
>> --- a/xen/include/asm-x86/i387.h Tue Aug 31 18:12:03 2010 -0400
>> +++ b/xen/include/asm-x86/i387.h Tue Aug 31 18:20:46 2010 -0400
>> @@ -113,9 +113,9 @@ static inline void setup_fpu(struct vcpu
>> if ( !v->fpu_initialised )
>> v->fpu_initialised = 1;
>>
>> - set_xcr0(v->arch.hvm_vcpu.xcr0 | XSTATE_FP_SSE);
>> + /* Restore all supported feature states */
>> + set_xcr0(xfeature_mask);
>> xrstor(v);
>> - set_xcr0(v->arch.hvm_vcpu.xcr0);
>> }
>> else
>> {
>>
>
> Aren't you taking away control from the guest OS of what part of the
> state it wants/needs to save?
>
>
To fix 'frozen states', it needs to saves/restores all supported states.
I find an issue here. It should set_xcr0 to hvm_vcpu.xcr0 after xsave()
and xrstor(), because applications in guest may read xcr0. I will fix it
in next version.
Regards,
Weidong
prev parent reply other threads:[~2010-09-01 6:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 14:52 [PATCH 2/3 v2] XSAVE/XRSTOR: fix frozen states Han, Weidong
2010-08-31 15:12 ` Jan Beulich
2010-09-01 6:16 ` Weidong Han [this message]
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=4C7DEFA3.209@intel.com \
--to=weidong.han@intel.com \
--cc=JBeulich@novell.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.