From: Paolo Bonzini <pbonzini@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <4BB8D6C6.8010403@redhat.com> (raw)
In-Reply-To: <u2tf43fc5581004040025r8ed5cc93xca1ad94c662bdfcc@mail.gmail.com>
>>> 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
prev parent reply other threads:[~2010-04-04 18:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-02 15:46 [Qemu-devel] [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once Blue Swirl
2010-04-02 17:05 ` [Qemu-devel] [PATCH] provide a stub version of kvm-all.c if !CONFIG_KVM Paolo Bonzini
2010-04-02 17:29 ` [Qemu-devel] " Blue Swirl
2010-04-02 17:33 ` Paolo Bonzini
2010-04-02 18:17 ` Blue Swirl
2010-04-02 18:33 ` Paolo Bonzini
2010-04-02 19:04 ` Blue Swirl
2010-04-03 9:04 ` Paolo Bonzini
2010-04-03 9:07 ` Blue Swirl
2010-04-04 7:12 ` Paolo Bonzini
2010-04-04 7:25 ` Blue Swirl
2010-04-04 18:13 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BB8D6C6.8010403@redhat.com \
--to=pbonzini@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.