Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753229AbbETJHg (ORCPT ); Wed, 20 May 2015 05:07:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45018 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752660AbbETJHa (ORCPT ); Wed, 20 May 2015 05:07:30 -0400 Message-ID: <555C4ECC.3000906@redhat.com> Date: Wed, 20 May 2015 11:07:24 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.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 06/11] KVM: x86: pass kvm_mmu_page to gfn_to_rmap References: <1431956923-35602-1-git-send-email-pbonzini@redhat.com> <1431956923-35602-7-git-send-email-pbonzini@redhat.com> <555C460B.9090508@linux.intel.com> In-Reply-To: <555C460B.9090508@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 787 Lines: 25 On 20/05/2015 10:30, Xiao Guangrong wrote: >> This is always available, and we can use the role to look up the right >> memslots array. > > How about pass role instead of sp so that it can be used if no sp is > available? I can surely do that instead, but I'm not sure why one would have a role and not an sp. If you do not have an sp, you probably should instead use kvm_vcpu_gfn_to_memslot and __gfn_to_rmap. See for example rmap_write_protect. I pushed the work to an "smm" branch of kvm.git, so that you can see the result. 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/