The reason is to avoid including kvm.h by vl.c.

  But that's not a problem, kvm.h can be included by compiled-once files;
that was the reason to introduce the stubs in the first place.  kvm_* should
be declared in kvm.h.

That can't be safe because CONFIG_KVM will not be defined for files
compiled once. So even with the stubs, those files would use inlined
stubs where they shouldn't.

1) Stubs are linked, not inlined.

2) vl.c does not use kvm_enabled

3) even if it did, it is defined like this after my patch:

#if defined CONFIG_KVM || !defined NEED_CPU_H
#define kvm_enabled() (kvm_allowed)
#else
#define kvm_enabled() (0)
#endif

Paolo


Reply via email to