From: Blue Swirl <blauwirbel@gmail.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once
Date: Fri, 2 Apr 2010 18:43:32 +0300 [thread overview]
Message-ID: <s2nf43fc5581004020843oa2dfa403wdb1bb33450e4bae@mail.gmail.com> (raw)
In-Reply-To: <4BB6086B.2080009@codemonkey.ws>
On 4/2/10, Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 04/02/2010 10:01 AM, Paolo Bonzini wrote:
>
> > On 04/01/2010 10:27 PM, Blue Swirl wrote:
> >
> > > It will not be safe to use kvm_enabled() in vl.c, so there needs to be
> > > a target dependent helper. The call to kvm_init could remain in vl.c,
> > > likewise it's not strictly needed to move kvm_allowed to arch_init.c.
> > >
> >
> > Not really, because kvm_allowed _can_ be used from once-compiled files.
> The attached patch makes kvm-all.c be compiled always, even if !CONFIG_KVM;
> functions that require kvm are almost always omitted for now (so checking
> kvm_enabled() is required to call them). However, kvm_init is stubbed so
> that vl.c can call it.
> >
> > In the future we could add more stubbing and ultimately do this
> unconditionally:
> >
> > #define kvm_enabled() kvm_allowed
> >
> > With this patch vl.c can already be compiled once, but I did not include
> it because it would conflict with my balloon.c series; I'm doing enough
> rebasing these days. Also, qemu-kvm is a bit behind qemu and all these
> patches are nightmares for the merges, so it's better IMO if things are left
> to calm down a bit.
> >
>
> Having kvm-all.c compile with and without CONFIG_KVM is pretty ugly IMHO.
>
> Is compiling vl.c once really that important of a goal? Wouldn't it be
> better to split bits out of vl.c and have those compile once? Ideally, vl.c
> should be so small that compiling per-target shouldn't matter.
But the only thing preventing compiling whole vl.c once is just KVM
init. I'll send a new patch, hopefully it's better.
next prev parent reply other threads:[~2010-04-02 15:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 20:07 [Qemu-devel] [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once Blue Swirl
2010-04-01 20:15 ` Anthony Liguori
2010-04-01 20:27 ` Blue Swirl
2010-04-02 15:01 ` [Qemu-devel] " Paolo Bonzini
2010-04-02 15:08 ` Anthony Liguori
2010-04-02 15:11 ` Paolo Bonzini
2010-04-02 15:20 ` Anthony Liguori
2010-04-02 16:01 ` Paolo Bonzini
2010-04-02 15:43 ` Blue Swirl [this message]
2010-04-01 20:23 ` Paolo Bonzini
2010-04-02 14:20 ` Blue Swirl
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=s2nf43fc5581004020843oa2dfa403wdb1bb33450e4bae@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=anthony@codemonkey.ws \
--cc=pbonzini@redhat.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 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).