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 1/4] XSAVE/XRSTOR: Fix frozen states

To: "Weidong Han" <weidong.han@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1/4] XSAVE/XRSTOR: Fix frozen states
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 31 Aug 2010 07:56:41 +0100
Cc: "jeremy@xxxxxxxx" <jeremy@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 30 Aug 2010 23:57:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1A42CE6F5F474C41B63392A5F80372B22A711EC9@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>
References: <1A42CE6F5F474C41B63392A5F80372B22A711EC9@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 31.08.10 at 04:59, "Han, Weidong" <weidong.han@xxxxxxxxx> wrote:
> If a guest sets a state and dirties the state, but later temporarily clears 
> the state, and at this time 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.
> 
> Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>

There's a lot of seemingly unrelated variable renaming in this patch,
the essence apparently just being

>--- a/xen/arch/x86/i387.c      Fri Aug 27 07:10:57 2010 -0400
>+++ b/xen/arch/x86/i387.c      Fri Aug 27 12:31:05 2010 -0400
>@@ -35,7 +35,10 @@ void save_init_fpu(struct vcpu *v)
> 
>     if ( cpu_has_xsave && is_hvm_vcpu(v) )
>     {
>+        /* Save all supported feature states */
>+        set_xcr0(xfeature_mask);
>         xsave(v);
>+        set_xcr0(v->arch.hvm_vcpu.xcr0);
>     }
>     else if ( cpu_has_fxsr )
>     {

Now, I wonder what the (performance) price of this is (and will be with
larger register sets in the future), and whether the general deferred
saving scheme can't be made work here too.

Jan


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

<Prev in Thread] Current Thread [Next in Thread>