Re: [patch 3/5] KVM: MMU: add kvm_mmu_shadow_walk helper

Avi Kivity
2009-06-11T03:21:10Z

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.