qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] provide a stub version of kvm-all.c if !CONFIG_


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH] provide a stub version of kvm-all.c if !CONFIG_KVM
Date: Sun, 04 Apr 2010 20:13:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3


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

[Prev in Thread] Current Thread [Next in Thread]