[PATCH v5 1/4] KVM: PPC: epapr: Factor out the epapr init

Scott Wood scottwood at freescale.com
Thu Feb 23 05:28:43 EST 2012


On 02/21/2012 08:33 PM, Liu Yu-B13201 wrote:
>>> +bool epapr_para_enabled = false;
>>
>> No need to explicitly initialize to false.
> 
> Why not make code more readable?

It's common kernel style to not explicitly initialize global data to
zero or equivalent.  Historically this was due to toolchain issues that
are no longer relevant, but people still seem to prefer it that way.
It's subjective whether readability is enhanced by being explicit or by
being concise.

>> Do not warn just because there's no hypervisor or hcall-instructions.
>> There's nothing wrong with that.  Only warn if they are present but wrong.
>>
> 
> I see that it's not proper to warn in host.
> But if user forget to add hypervisor node or inst, how can he know something is wrong?

Print a message when paravirt is enabled (I think KVM already does
this).  This is no different than a user forgetting to add a certain
device to the device tree -- you'll silently just not get that device.

Ideally the hypervisor would take care of adding this stuff to the
device tree anyway, no user action required.

-Scott



More information about the Linuxppc-dev mailing list