From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Lazy FPU save/restore Date: Sun, 18 Feb 2007 11:39:02 +0200 Message-ID: <45D81EB6.9010407@qumranet.com> References: <45D502A1.5000303@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Anthony Liguori Return-path: In-Reply-To: <45D502A1.5000303-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > The following patch saves the host FPU state and loads the guests FPU > state if !(CR0.MP == 1 && CR0.TS == 1). > > When CR0.MP == 1 && CR0.TS == 1, all FPU activity will generate > exceptions. OS's use these exceptions to implement lazy FPU loading > to improve context switch time. Since any FPU activity will generate > traps, we don't have to worry about the guest modifying the host FPU > state. > > My microbenchmark of choice uses FPU operations so I think the results > are currently tainted. I've only tested on a 32bit SVM system. > > Signed-off-by: Anthony Liguori > Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV