All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH 7/7] Refactor target specific handling, compile vl.c only once
Date: Thu, 01 Apr 2010 10:14:46 +0200	[thread overview]
Message-ID: <4BB455F6.7070402@redhat.com> (raw)
In-Reply-To: <4BB3A230.4080606@codemonkey.ws>

On 03/31/2010 09:27 PM, Anthony Liguori wrote:
> On 03/31/2010 02:19 PM, Blue Swirl wrote:
>> On 3/31/10, Anthony Liguori<anthony@codemonkey.ws> wrote:
>>> On 03/27/2010 05:11 PM, Blue Swirl wrote:
>>>
>>>> Move target specific functions and RAM handling to arch_init.c.
>>>>
>>>> Add a flag to QEMUOptions structure to indicate for which
>>>> architectures the option is allowed, check the flag
>>>> in run time and remove conditional code in option handling.
>>>>
>>>> Now that no target dependencies remain, compile vl.c only once
>>>> for all targets.
>>>>
>>>> Signed-off-by: Blue Swirl<blauwirbel@gmail.com>
>>>>
>>>>
>>> This causes -enable-kvm to seg fault.
>> Variable kvm_state is used but it has not been initialized. This is
>> because kvm_init is not called. And this happens because CONFIG_KVM is
>> not set by config.h when included from vl.c.
>
> I spoke too soon before. A lot of code depends on if (kvm_enabled())
> going to 0 so it's a bigger refactoring to fix this once you start
> compiling targets that !defined(CONFIG_KVM)

Code that is not compiled per-target would need to switch to 
kvm_available().  Also, a dummy version of the functions declared in 
kvm.h needs to be written so that it can be linked against targets that 
do not support KVM (possibly with a link_warning).

Paolo

      reply	other threads:[~2010-04-01  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-27 22:11 [Qemu-devel] [PATCH 7/7] Refactor target specific handling, compile vl.c only once Blue Swirl
2010-03-31 18:42 ` Anthony Liguori
2010-03-31 19:19   ` Blue Swirl
2010-03-31 19:23     ` Anthony Liguori
2010-03-31 19:27     ` Anthony Liguori
2010-04-01  8:14       ` 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=4BB455F6.7070402@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=anthony@codemonkey.ws \
    --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.