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][RFC] FPU LWP 3/5: define new FPU interface func

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][RFC] FPU LWP 3/5: define new FPU interface functions: fpu_save, fpu_restore, fpu_reload
From: Wei Huang <wei.huang2@xxxxxxx>
Date: Fri, 15 Apr 2011 10:50:48 -0500
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 15 Apr 2011 08:53:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DA827D9020000780003C9BF@xxxxxxxxxxxxxxxxxx>
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: <4DA75B57.404@xxxxxxx> <4DA827D9020000780003C9BF@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
Will fix.

-Wei
On 04/15/2011 04:11 AM, Jan Beulich wrote:
On 14.04.11 at 22:38, Wei Huang<wei.huang2@xxxxxxx>  wrote:
Current Xen implementation only support lazy FPU reload via CR0.TS. But
new FPU state isn't always tracked by CR0.TS bit. One example is AMD's
lightweight profiling. With this patch, Xen calls fpu_save() on vcpu
which is being scheduled out and fpu_restore() on vcpu which is being
scheduled in. The nonlazy FPU state is saved and restored in these two
functions.
This doesn't match the actual patch - only fpu_restore() is being
added to the context switch path, fpu_save() was there already,
saving both lazy and non-lazy state.

This patch also defines fpu_reload() to handle lazy FPU state when #NM
is triggered.

Signed-off-by: Wei Huang<wei.huang2@xxxxxxx>
...
+/* Restore VCPU's FPU state when the vcpu is scheduled out */
+void fpu_restore(struct vcpu *v)
The comment ought so say "in" rather than "out".

Jan





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

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