From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 3/5] KVM: MMU: add kvm_mmu_shadow_walk helper Date: Wed, 10 Jun 2009 15:23:47 +0300 Message-ID: <4A2FA5D3.9020604@redhat.com> References: <20090609213009.436123773@amt.cnet> <20090609213312.838419569@amt.cnet> <4A2F7A15.2080302@redhat.com> <20090610121448.GB6672@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, sheng.yang@intel.com To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:59817 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753775AbZFJMXr (ORCPT ); Wed, 10 Jun 2009 08:23:47 -0400 In-Reply-To: <20090610121448.GB6672@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti wrote: >> Isn't it simpler to invoke for_each_shadow_entry(), instead of defining >> a callback and calling it? >> >> We had those callbacks once, then switched to for_each. >> > > The point is its exported to use in a external module (kvm-intel.ko), > so you hide the details (such as locking) in the kvm_mmu_shadow_walk > helper. Let me know how do you prefer this to be. > Ah, you're right. I don't think it's worthwhile to add all this just for debugging. You can add a function that dumps the spte chain as well as the features MSR, and we can decode it by hand when we see it. Disadvantage is more work for us when we hit the bug, but at least that function is reusable in other contexts. -- error compiling committee.c: too many arguments to function