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: Thu, 11 Jun 2009 06:20:57 +0300 Message-ID: <4A307819.6010503@redhat.com> References: <20090609213009.436123773@amt.cnet> <20090609213312.838419569@amt.cnet> <4A2F7A15.2080302@redhat.com> <20090610121448.GB6672@amt.cnet> <4A2FA5D3.9020604@redhat.com> <20090610131731.GG6672@amt.cnet> <4A2FD01A.5090208@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; 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]:39891 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756670AbZFKDVK (ORCPT ); Wed, 10 Jun 2009 23:21:10 -0400 In-Reply-To: <4A2FD01A.5090208@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/10/2009 06:24 PM, Avi Kivity wrote: > > I just don't want to introduce yet another function-callback pair for > such a small thing. No objection to the code itself. > > Printing out the spte hierarchy seems a good idea in other bug > contexts, so at least that function is reusable. > Here's one that preserves all information but is simple to use: kvm_mmu_get_spte_hierarchy(vcpu, gva, int *nr_sptes, u64 sptes[4]) So you can later do detailed checks on the sptes, but it doesn't expose yet another generic walker. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.