Re: [PATCH 0 of 3] create kvm_x86

Zhang, Xiantao
2007-11-30T08:36:33Z

Avi Kivity wrote:
> Hollis Blanchard wrote:
>> On Wed, 2007-11-21 at 11:18 +0200, Avi Kivity wrote:

>>>>
>>> Well, I hate to say it, but the resulting code doesn't look too well
>>> (all the kvm_x86 variables), and it's entirely my fault as I
>>> recommended this approach. Not like it was difficult to predict.
>>>
>>
>> I guess we still have reached no conclusion on this question?
>>
>>
>
> Right. Thanks for re-raising it.

Thanks too. I have almost done the rebase work for IA64 support, maybe
we should work out a solution for that :)

>>> I'm thinking again of
>>>
>>> struct kvm {
>>> struct kvm_arch a;
>>> ...
>>> }
>>>
>>> Where each arch defines its own kvm_arch. Now the changes look
>>> like a bunch of "kvm->blah" to "kvm->a.blah" conversions.
>>>

>>
>>
>
> The nicer one:
>
> struct kvm {
> struct kvm_arch arch;
> // common fields
> }

I prefer this one, seems it is more direct and readable. Same thinking
about kvm_vcpu structure:)