Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752160AbbFREqB (ORCPT ); Thu, 18 Jun 2015 00:46:01 -0400 Received: from mga11.intel.com ([192.55.52.93]:27540 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbbFREpx (ORCPT ); Thu, 18 Jun 2015 00:45:53 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,637,1427785200"; d="scan'208";a="590010651" Message-ID: <55824BFC.7080509@linux.intel.com> Date: Thu, 18 Jun 2015 12:41:32 +0800 From: Xiao Guangrong User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Paolo Bonzini , 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> <55812CB1.6030805@redhat.com> In-Reply-To: <55812CB1.6030805@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 804 Lines: 26 On 06/17/2015 04:15 PM, Paolo Bonzini wrote: > > > 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. Oh, right, thanks for your explanation. :) Reviewed-by: Xiao Guangrong -- 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/