Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754212AbbKQR6s (ORCPT ); Tue, 17 Nov 2015 12:58:48 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:38229 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750969AbbKQR6q (ORCPT ); Tue, 17 Nov 2015 12:58:46 -0500 Subject: Re: [PATCH 05/10] KVM: x86: MMU: Use for_each_rmap_spte macro instead of pte_list_walk() To: Takuya Yoshikawa , Marcelo Tosatti References: <20151112204849.ba920599a8426d7196a0df73@lab.ntt.co.jp> <20151112205245.6bd773737cfa78422dac5a79@lab.ntt.co.jp> <20151113214727.GA29103@amt.cnet> <20151114092047.GA25627@amt.cnet> <564944A3.5080005@lab.ntt.co.jp> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org From: Paolo Bonzini Message-ID: <564B6AD2.1030905@redhat.com> Date: Tue, 17 Nov 2015 18:58:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <564944A3.5080005@lab.ntt.co.jp> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 940 Lines: 26 On 16/11/2015 03:51, Takuya Yoshikawa wrote: > What kvm_mmu_mark_parents_unsync() does is: > > for each p_i in sp->parent_ptes rmap chain > mark_unsync(p_i); > > Then, mark_unsync() finds the parent sp including that p_i to > set ->unsync_child_bitmap and increment ->unsync_children if > necessary. It may also call kvm_mmu_mark_parents_unsync() > recursively. I agree. sp->parent_ptes goes up one level from sp; kvm_mmu_mark_parents_unsync(sp) visits the level above sp, while mark_unsync(sp) visit sp and all the levels above it. Calling mark_unsync(parent_pte) is enough to complete the visit, after kvm_mmu_mark_parents_unsync has already processed the level above sp. 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/