[Qemu-devel] Re: [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once

2010-04-02 Thread Paolo Bonzini
On 04/02/2010 05:20 PM, Anthony Liguori wrote: I didn't do this to compile vl.c once. I don't care about that. I did this as an initial step towards having kvm functions stubbed out for !CONFIG_KVM, instead of relying on GCC performing dead-code-elimination on kvm_enabled(). I'd prefer a kvm

[Qemu-devel] Re: [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once

2010-04-02 Thread Blue Swirl
On 4/2/10, Anthony Liguori 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, > > > likewi

[Qemu-devel] Re: [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once

2010-04-02 Thread Anthony Liguori
On 04/02/2010 10:11 AM, Paolo Bonzini wrote: On 04/02/2010 05:08 PM, Anthony Liguori wrote: 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? I didn't do this to compile vl.c once. I don't care about that. I di

[Qemu-devel] Re: [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once

2010-04-02 Thread Paolo Bonzini
On 04/02/2010 05:08 PM, Anthony Liguori wrote: 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? I didn't do this to compile vl.c once. I don't care about that. I did this as an initial step towards having kvm fu

[Qemu-devel] Re: [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once

2010-04-02 Thread Anthony Liguori
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

[Qemu-devel] Re: [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once

2010-04-02 Thread Paolo Bonzini
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 u

[Qemu-devel] Re: [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once

2010-04-02 Thread Blue Swirl
On 4/1/10, Paolo Bonzini wrote: > On 04/01/2010 10:07 PM, Blue Swirl wrote: > > > Remove dependency of vl.c to KVM, then we can partially revert > > b33612d03540fda7fa67485f1c20395beb7a2bf0. > > > > This is ugly... > > Michael Tsirkin said in commit ca821806: > > Comment on kvm usage: rather t

[Qemu-devel] Re: [PATCH 1/2] Move KVM init to arch_init.c, compile vl.c once

2010-04-01 Thread Paolo Bonzini
On 04/01/2010 10:07 PM, Blue Swirl wrote: Remove dependency of vl.c to KVM, then we can partially revert b33612d03540fda7fa67485f1c20395beb7a2bf0. This is ugly... Michael Tsirkin said in commit ca821806: Comment on kvm usage: rather than require users to do if(kvm_enabled()) and/or ifdefs,