qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 7/7] Refactor target specific handling, compile


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3

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<address@hidden> 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<address@hidden>


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 via email to

[Prev in Thread] Current Thread [Next in Thread]