[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/4] XSAVE/XRSTOR: Fix frozen states



>>> 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.