qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Andrew Jones <drjones@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Makefile: Move balloon.o, numa.o and bootdevice.o to common-obj-y
Date: Wed, 14 Jun 2017 13:25:36 +0200	[thread overview]
Message-ID: <0c96c64b-20ef-c0ef-3206-2a4ff713f6d9@redhat.com> (raw)
In-Reply-To: <4b0ebafd-46da-3ec9-7a43-c008ba90b32b@redhat.com>



On 14/06/2017 13:18, Thomas Huth wrote:
> On 08.06.2017 16:18, Thomas Huth wrote:
>> There does not seem to be any target specific code in these files, so
>> we can put them into "common-obj" instead of "obj" to compile them only
>> once for all targets.
> 
> Self-NACK: balloon.c uses kvm_enabled() which in turn depends on
> CONFIG_KVM ... and that flag is target-specific, so balloon.o can not be
> moved to common-obj right now.
> 
> We should poison CONFIG_KVM for common code ... I'll have a look into
> that...

No, your patch is okay.

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

In other words, kvm_enabled() forces itself to be 0 only in per-target
files.  This is done mostly to limit the number of required stubs:
target-independent APIs can be called from compile-once files and must
be stubbed; target-specific APIs can only be called from per-target
files, and their calls are culled by the compiler if !CONFIG_KVM.

Paolo

  reply	other threads:[~2017-06-14 11:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08 14:18 [Qemu-devel] [PATCH] Makefile: Move balloon.o, numa.o and bootdevice.o to common-obj-y Thomas Huth
2017-06-08 14:37 ` Juan Quintela
2017-06-14 11:18 ` Thomas Huth
2017-06-14 11:25   ` Paolo Bonzini [this message]
2017-06-16 11:03     ` Thomas Huth

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=0c96c64b-20ef-c0ef-3206-2a4ff713f6d9@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=drjones@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).