From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 00/18] KVM: PPC: Virtualize Gekko guests Date: Mon, 08 Feb 2010 13:09:26 +0200 Message-ID: <4B6FF0E6.6060309@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> <87CEECB5-107A-46EB-89F5-1E1F92AC22AA@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" To: Alexander Graf Return-path: In-Reply-To: <87CEECB5-107A-46EB-89F5-1E1F92AC22AA-l3A5Bk7waGM@public.gmane.org> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org On 02/08/2010 12:58 PM, Alexander Graf wrote: >>> If it really gets unusably slow, I'd rather binary patch the guest on >>> the fly in KVM according to rules set by the userspace client. >>> >> Is that even possible? Do those register-pair instructions and registers map 1:1 to 970 instructions and registers? >> > Almost. Basically all I need to do is execute 2 FPU instructions instead of one for single instructions and paired single special instructions. So if I could patch the instruction to jump to some shared memory page, it'd become fast. At least as long as I figure out how to make sure we run with FP=0 in normal code, but with FP=1 in the special page ;). > How do you locate a free virtual address to poke your shared memory page into? What if the guest kernel instantiates it later? Aren't direct jumps limited in their offset? What if an exception happens in the shared memory page? Patching is hard, let's go shopping. >>> But we'll >>> get there when it turns out to be too slow. For now I'd rather like to >>> have something working at all and then improve speed :-). >>> >>> >> Well, I want to see the light at the end of the tunnel first. Adding code is easy, ripping it out later not so much. >> > Hum, so you suggest I get some real application running properly first so we can evaluate if it's fast enough? > Yes, a real application typical for whatever use case you envision for Gekko emulation (can you shed a few words on that please). -- error compiling committee.c: too many arguments to function