Re: [PATCH 2/11] QEMU/KVM: Cleanup and improve kvm_load/save_registers usage

Avi Kivity
2008-06-12T12:40:19Z

Anthony Liguori wrote:
> Jan Kiszka wrote:
>> Remove redundant checkes for kvm_enabled() on register updates between
>> userspace and kvm kernel driver. Ensure register update across all CPUs
>> on "info cpus" monitor command.
>>
>
> This breaks the build when KVM is disabled. The explicit guard is
> needed to avoid having #ifdefs. Please revert.
>

You mean a link time error? Well in that case we're relying on gcc
optimizing away the call. It will break with -O0.

The correct fix is to define stubs for the case kvm is configured out
(or just use ifdefs). But perhaps Glauber's accelerator framework will
take care of all this in a generic fashion.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.