WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 0/3 v2] XSAVE/XRSTOR fixes and enhancements

To: "Han, Weidong" <weidong.han@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 0/3 v2] XSAVE/XRSTOR fixes and enhancements
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 31 Aug 2010 15:57:03 +0100
Cc: Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Tue, 31 Aug 2010 07:59:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1A42CE6F5F474C41B63392A5F80372B22A712303@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: ActJHBfO+sZNfrgCRdCMrWWuJUUwowAAK2bV
Thread-topic: [Xen-devel] [PATCH 0/3 v2] XSAVE/XRSTOR fixes and enhancements
User-agent: Microsoft-Entourage/12.26.0.100708
On 31/08/2010 15:52, "Han, Weidong" <weidong.han@xxxxxxxxx> wrote:

> Change logs from v1 -> v2:
> Due to not guarantee backward compatibility, drop the guest save/restore patch
> here. Will re-implement it later. In addition, split the original fix frozen
> states patch into XSAVE/XRSTOR cleanup patch and fix frozen state patch.
> 
> Patch 1/3: XSAVE/XRSTOR: some cleanups
> Replace xfeature_low and xfeature_high with a u64 variable xfeature_mask.
> In structure hvm_vcpu, rename xfeature_mask to xcr0
> Provide EDX:EAX with all bits set to 1 for XSAVE and XRSTOR as spec
> recommends.
> 
> Patch 2/3: Fix frozen states
> If a guest sets a state and dirties the state, but later temporarily clears
> the state, and at this time if this vcpu is scheduled out, then other vcpus
> may corrupt the state before the vcpu is scheduled in again, thus the state
> cannot be restored correctly. To solve this issue, this patch save/restore all
> states unconditionally on vcpu context switch.

Performance overhead of this fix? Is there no other lazy save technique that
can work?

> Patch 3/3. Enable guest AVX
> This patch enables Intel(R) Advanced Vector Extension (AVX) for guest.

If we enable this but don't implement save/restore then don't guests lose
state across s/r with unpredictable results?

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel