From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 15/22] KVM: MMU: Introduce kvm_read_guest_page_x86() Date: Tue, 27 Apr 2010 18:27:45 +0200 Message-ID: <20100427162745.GA18832@amd.com> References: <1272364712-17425-1-git-send-email-joerg.roedel@amd.com> <1272364712-17425-16-git-send-email-joerg.roedel@amd.com> <4BD6DE15.8070409@redhat.com> <20100427132030.GH11097@amd.com> <4BD6E80A.2000201@redhat.com> <20100427154024.GL11097@amd.com> <4BD70C41.2060202@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Marcelo Tosatti , kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Avi Kivity Return-path: Received: from va3ehsobe003.messaging.microsoft.com ([216.32.180.13]:43917 "EHLO VA3EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752916Ab0D0Q2G (ORCPT ); Tue, 27 Apr 2010 12:28:06 -0400 Content-Disposition: inline In-Reply-To: <4BD70C41.2060202@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Apr 27, 2010 at 07:09:37PM +0300, Avi Kivity wrote: > On 04/27/2010 06:40 PM, Joerg Roedel wrote: > > > >Currently its a bit unclear when to use mmu or nested_mmu. With a > >pointer it would be unclear to the code reader when to use the pointer > >and when to select the mmu_contexts directly. > > I think in most cases you'd want full translation, thus the pointer. > This should be the default. In specific cases you'd want just the > non-nested guest translation. Hmm, for most cases == all gva_to_gpa cases. The page fault path can't use the pointer. I'll try out how this works. It shouldn't be too complicated. Joerg