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 18:17:50 +0200 Message-ID: <45D87C2E.2090806@qumranet.com> References: <45D502A1.5000303@codemonkey.ws> <45D81EB6.9010407@qumranet.com> <45D861CD.4020207@qumranet.com> <45D87B22.6070403@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: <45D87B22.6070403-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: >> >> ... and reverted. >> >> Running an fpu load on both guest and host shows corruption (both on >> the guest and host). The load is >> >> >>> #include >>> >>> void test_fpu() >>> { >>> int i; >>> double f = 0; >>> >>> for (i = 0; i < 10000000; ++i) >>> f += 1 / (1.0 + i); >>> printf("%20.16f\n", f); >>> } >>> >>> int main(int ac, char **av) >>> { >>> while (1) >>> test_fpu(); >>> } >> >> Compiled statically with -O2 on 64-bit. I don't know what's wrong -- >> the code looks correct (well, on Intel it wants KVM_GUEST_CR0_MASK to >> include CR0_MP_MASK and CR0_TS_MASK, but it fails with that too, and >> it fails on AMD as well). > > I'll have to try and setup a 64 bit system. I cannot reproduce on my > 32bit system with your test program. It may be related to 64-bit (as that uses sse for floating point), or to the fact that I use ssh on a remote host, which causes more context switches. I'll try to reproduce on 32 bits with my setup. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- 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