From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Single memory slot Date: Thu, 15 Oct 2009 13:51:07 -0500 Message-ID: <4AD76F1B.3040607@codemonkey.ws> References: <4AD6D037.3060301@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm-devel To: Avi Kivity Return-path: Received: from ey-out-2122.google.com ([74.125.78.27]:24860 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933396AbZJOSwW (ORCPT ); Thu, 15 Oct 2009 14:52:22 -0400 Received: by ey-out-2122.google.com with SMTP id 9so280722eyd.19 for ; Thu, 15 Oct 2009 11:51:14 -0700 (PDT) In-Reply-To: <4AD6D037.3060301@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > One way to improve the gfn_to_pfn() memslot search is to register just > one slot. This can only work on 64-bit, since even the smallest > guests need 4GB of physical address space. Apart from speeding up > gfn_to_page(), it would also speed up mmio which must iterate over all > slots, so a lookup cache cannot help. > > This would require quite a bunch of changes: > - modify gfn_to_pfn() to fail gracefully if the page is in the slot > but unmapped (hole handling) > - modify qemu to reserve the guest physical address space It could potentially speed up qemu quite a lot too as we would return to a model where host va == fixed address + guest pa. That makes things like stl_phys/ldl_phys trivial. Regards, Anthony Liguori