From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 3/6] KVM MMU: optimize/cleanup for marking parent unsync Date: Wed, 14 Apr 2010 11:58:35 +0800 Message-ID: <4BC53D6B.6020501@cn.fujitsu.com> References: <4BC2D2E2.1030604@cn.fujitsu.com> <4BC2D390.7050708@cn.fujitsu.com> <20100412171211.GC4976@amt.cnet> <4BC3CE83.8020705@cn.fujitsu.com> <20100413150137.GB24128@amt.cnet> <4BC5353A.30509@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , KVM list , LKML To: Marcelo Tosatti Return-path: In-Reply-To: <4BC5353A.30509@cn.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Xiao Guangrong wrote: > > Actually, the origin code has a bug, the code segment in mmu_parent_walk(): > > | if (!sp->multimapped && sp->parent_pte) { > | ...... > | return; > | } > | hlist_for_each_entry(pte_chain, node, &sp->parent_ptes, link) > | for (i = 0; i < NR_PTE_CHAIN_ENTRIES; ++i) { > | ...... > | } > > So, if sp->parent_pte == NULL, it's unsafe... Marcelo, please ignore this, it not a bug, just my mistake, sorry...