Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932600AbbELJju (ORCPT ); Tue, 12 May 2015 05:39:50 -0400 Received: from mga03.intel.com ([134.134.136.65]:19763 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932237AbbELJjr (ORCPT ); Tue, 12 May 2015 05:39:47 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,414,1427785200"; d="scan'208";a="727776189" Message-ID: <5551C99A.3020002@linux.intel.com> Date: Tue, 12 May 2015 17:36:26 +0800 From: Xiao Guangrong User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Paolo Bonzini CC: gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/9] KVM: MMU: introduce for_each_rmap_spte() References: <1431397953-16642-1-git-send-email-guangrong.xiao@linux.intel.com> <1431397953-16642-3-git-send-email-guangrong.xiao@linux.intel.com> <5551B4EE.8020000@redhat.com> In-Reply-To: <5551B4EE.8020000@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: 806 Lines: 30 On 05/12/2015 04:08 PM, Paolo Bonzini wrote: > > > On 12/05/2015 04:32, Xiao Guangrong wrote: >> - while ((sptep = rmap_get_first(*rmapp, &iter))) { >> - BUG_ON(!(*sptep & PT_PRESENT_MASK)); >> +restart: >> + for_each_rmap_spte(rmapp, &iter, sptep) { >> rmap_printk("kvm_rmap_unmap_hva: spte %p %llx gfn %llx (%d)\n", >> sptep, *sptep, gfn, level); >> >> drop_spte(kvm, sptep); >> need_tlb_flush = 1; >> + goto restart; >> } >> > > For this one, I would keep using rmap_get_first. Otherwise looks good. > > Paolo > Okay, will do. -- 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/