Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757927AbbFQIQA (ORCPT ); Wed, 17 Jun 2015 04:16:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54731 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756904AbbFQIPu (ORCPT ); Wed, 17 Jun 2015 04:15:50 -0400 Message-ID: <55812CB1.6030805@redhat.com> Date: Wed, 17 Jun 2015 10:15:45 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Xiao Guangrong , linux-kernel@vger.kernel.org, kvm@vger.kernel.org CC: rkrcmar@redhat.com, bdas@redhat.com Subject: Re: [PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap References: <1432746314-50196-1-git-send-email-pbonzini@redhat.com> <1432746314-50196-10-git-send-email-pbonzini@redhat.com> <55765D43.8090302@linux.intel.com> In-Reply-To: <55765D43.8090302@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 642 Lines: 21 On 09/06/2015 05:28, Xiao Guangrong wrote: >> >> - rmapp = gfn_to_rmap(kvm, sp->gfn, PT_PAGE_TABLE_LEVEL); >> + slots = kvm_memslots(kvm); >> + slot = __gfn_to_memslot(slots, sp->gfn); >> + rmapp = __gfn_to_rmap(sp->gfn, PT_PAGE_TABLE_LEVEL, slot); >> > > Why @sp is not available here? Because the function forces the level to be PT_PAGE_TABLE_LEVEL rather than sp->level. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/