From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [RFC 0/4] KVM in-kernel PM Timer implementation Date: Tue, 14 Dec 2010 10:04:01 -0600 Message-ID: <4D079571.4030402@codemonkey.ws> References: <901746004.680841292328577685.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <4D077258.9030500@redhat.com> <1292334036.9367.88.camel@mothafucka.localdomain> <4D0775F1.7000201@redhat.com> <4D078E0A.9@codemonkey.ws> <4D078F5E.60104@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Glauber Costa , Ulrich Obergfell , kvm@vger.kernel.org, zamsden@redhat.com, mtosatti@redhat.com To: Avi Kivity Return-path: Received: from mail-gy0-f174.google.com ([209.85.160.174]:60024 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755345Ab0LNQEK (ORCPT ); Tue, 14 Dec 2010 11:04:10 -0500 Received: by gyb11 with SMTP id 11so427897gyb.19 for ; Tue, 14 Dec 2010 08:04:09 -0800 (PST) In-Reply-To: <4D078F5E.60104@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/14/2010 09:38 AM, Avi Kivity wrote: > Fortunately, we have a very good bytecode interpreter that's > accelerated in the kernel called KVM ;-) > > We have exactly the same bytecode interpreter under a different name, > it's called userspace. > > If you can afford to make the transition back to the guest for > emulation, you might as well transition to userspace. If you re-entered the guest and setup a stack that had the RIP of the source of the exit, then there's no additional need to exit the guest. The handler can just do an iret. Or am I missing something? >> >> Why not have the equivalent of a paravirtual SMM mode where we can >> reflect IO exits back to the guest in a well defined way? It could >> then implement PM timer in terms of HPET or something like that. > > More exits. Yeah, I should have said, implement in terms of kvmclock so no additional exits. >> >> We already have a virtual address space that works for most guests >> thanks to the TPR optimization. > > It only works for Windows XP and Windows XP with the /3GB extension. Is this a fundamental limitation or just a statement of today's heuristics? Does any guest not keep the BIOS in virtual memory in a static location? Regards, Anthony Liguori