Re: [PATCH 0 of 3] create kvm_x86

Avi Kivity
2007-11-21T09:55:52Z

Zhang, Xiantao wrote:
>> IIRC a downside was mentioned that it is easier to cause a build
>> failure for another arch now.
>>
>
> I can't figure out why it can cause more build failure.
>

Nothing stops you from doing kvm->arch.blah in kvm_main.c, but blah will
not be present for all architectures. It would compile for you but not
others.

With to_kvm_x86(), the function and arch specific structure aren't even
visible on kvm_main.c, so you can't make that mistake.

IMO this is a serious drawback to kvm->arch.blah. But kvm_x86->blah
doesn't look good.

Maybe if the variable was named 'kvm' it would look better.

--
error compiling committee.c: too many arguments to function

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.