From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 00/18] KVM: PPC: Virtualize Gekko guests Date: Wed, 17 Feb 2010 18:34:25 +0200 Message-ID: <4B7C1A91.8060205@redhat.com> References: <1265298925-31954-1-git-send-email-agraf@suse.de> <4B6EB7F6.10304@redhat.com> <4B6EE8B2.80009@redhat.com> <4B6F3890.8090401@suse.de> <4B6FD118.2090207@redhat.com> <4B714049.7010201@suse.de> <4B7141B3.8000309@redhat.com> <4B71435E.7010103@suse.de> <4B7154A6.6050809@redhat.com> <80F0B53A-6F83-4166-8F85-5D9B07526158@suse.de> <4B7C134C.9040009@redhat.com> <3A11C6BE-4774-42D9-B13B-D989AD2E6ED6@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm-ppc@vger.kernel.org" , "kvm@vger.kernel.org" To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:13568 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751344Ab0BQQed (ORCPT ); Wed, 17 Feb 2010 11:34:33 -0500 In-Reply-To: <3A11C6BE-4774-42D9-B13B-D989AD2E6ED6@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On 02/17/2010 06:23 PM, Alexander Graf wrote: > On 17.02.2010, at 17:03, Avi Kivity wrote: > > >> On 02/17/2010 04:56 PM, Alexander Graf wrote: >> >>> So I changed to code according to your input by making all FPU calls explicit, getting rid of all binary patching. >>> >>> On the PowerStation again I'm running this code (simplified to the important instructions) using kvmctl: >>> >>> li r2, 0x1234 >>> std r2, 0(r1) >>> lfd f3, 0(r1) >>> lfd f4, 0(r1) >>> do_mul: >>> fmul f0, f3, f4 >>> b do_mul >>> >>> >>> With the following kvm_stat output: >>> >>> dec 2236 53 >>> exits 60797802 1171403 >>> ext_intr 379 4 >>> halt_wakeup 0 0 >>> inst_emu 60795247 1171344 >>> ld 60795132 1171348 >>> >>> So I'm getting 1171403 fmul operations per second. And that's even with non-optimized instruction fetching. Not bad. >>> >>> >> It's a large number, but won't real hardware be three orders of magnitude faster? >> > Yes, it would. But we don't have to care. The only thing we need to worry about is being fast enough to emulate enough FPU instructions actually used in normal guests so the guest runs in full speed. And 1000k> 250k, so we can do that apparently, leaving some spare cycles for non-fpu instructions. > I'm sure 250k isn't representative of a floating point intensive program (but maybe there aren't fpu intensive applications on that cpu). -- error compiling committee.c: too many arguments to function