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

Avi Kivity
2009-06-10T12:23:47Z

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