From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@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: Fri, 16 Jun 2017 13:03:59 +0200 [thread overview]
Message-ID: <f22dfd0c-5781-0e82-f5df-2d3c14868669@redhat.com> (raw)
In-Reply-To: <0c96c64b-20ef-c0ef-3206-2a4ff713f6d9@redhat.com>
On 14.06.2017 13:25, Paolo Bonzini wrote:
>
>
> 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.
OK, thanks for the explanation!
... but I now think my patch is still wrong, due to another reason:
numa.o indirectly uses ram_addr_t variables, and these are target
specific, as far as I can see. So at least that file should not be moved
to common-obj-y.
Thomas
prev parent reply other threads:[~2017-06-16 11:04 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
2017-06-16 11:03 ` Thomas Huth [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=f22dfd0c-5781-0e82-f5df-2d3c14868669@redhat.com \
--to=thuth@redhat.com \
--cc=drjones@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=quintela@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).