All of lore.kernel.org
 help / color / mirror / Atom feed
From: Weidong Han <weidong.han@intel.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Tim Deegan <Tim.Deegan@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xensource.com>,
	Jan Beulich <JBeulich@novell.com>
Subject: Re: [PATCH 0/3 v2] XSAVE/XRSTOR fixes and enhancements
Date: Wed, 01 Sep 2010 15:56:40 +0800	[thread overview]
Message-ID: <4C7E0738.3070405@intel.com> (raw)
In-Reply-To: <C8A3C1C3.219D0%keir.fraser@eu.citrix.com>

Keir Fraser wrote:
> On 01/09/2010 08:26, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:
>
>   
>>> Yes. As I said in another email, actually it already breaks hvm guests
>>> save/restore on platforms which supports XSAVE/XRSTOR.
>>>       
>> Wow, so the last couple of Xen releases are broken for the latest Intel
>> platforms unless you specify no-xsave. Handy to know I guess.
>>     
>
> Actually, hang on, Dexuan's patch only enabled XSAVE of FPU/SSE and didn't
> make any other new state visible. We already save/restore FPU/SSE of course,
> so I don't see why the code we already have is broken for HVM save/restore.
> It's the adding of new state that we don't s/r that would be broken --- like
> your patch to make AVX visible.
>
> Well that's how it was explained to me at the time. Was that in fact wrong
> and we are already broken for save/restore for some subtle unexplained
> reason?
>   

When XSAVE is enabled, it saves states to xsave_area in struct hvm_vcpu. 
But hvm_save_cpu_ctxt and hvm_load_cpu_ctxt don't save/restore FPU/SSE 
from xsave_area. So FPU/SSE states are incorrect after guest save/restore.

Regards,
Weidong
>  -- Keir
>
>   
>> Why is the feature flag stuff all stuffed in Xen itself rather than
>> xc_cpuid_x86.c, by the way? Shouldn't your change also be in the same place,
>> or (much preferably) all XSAVE related stuff be moved out into
>> libxc/xc_cpuid_x86.c?
>>     
>
>
>   

  reply	other threads:[~2010-09-01  7:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-31 14:52 [PATCH 0/3 v2] XSAVE/XRSTOR fixes and enhancements Han, Weidong
2010-08-31 14:56 ` Tim Deegan
2010-09-01  1:17   ` Weidong Han
2010-08-31 14:57 ` Keir Fraser
2010-09-01  1:53   ` Weidong Han
2010-09-01  7:26     ` Keir Fraser
2010-09-01  7:39       ` Keir Fraser
2010-09-01  7:56         ` Weidong Han [this message]
2010-09-01  8:09           ` Keir Fraser
2010-09-01  8:26             ` Weidong Han
2010-09-01  7:45       ` Weidong Han

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=4C7E0738.3070405@intel.com \
    --to=weidong.han@intel.com \
    --cc=JBeulich@novell.com \
    --cc=Tim.Deegan@eu.citrix.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.