Patchwork [2/7] No need for kvm_init() stub as already defined in qemu-kvm.h

login
register
mail settings
Submitter Jes Sorensen
Date June 15, 2010, 11:04 a.m.
Message ID <1276599879-22749-3-git-send-email-Jes.Sorensen@redhat.com>
Download mbox | patch
Permalink /patch/55636/
State New
Headers show

Comments

Jes Sorensen - June 15, 2010, 11:04 a.m.
From: Jes Sorensen <Jes.Sorensen@redhat.com>

No need for kvm_init() stub in kvm-stub.c as already defined in
qemu-kvm.h

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 kvm-stub.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
Paolo Bonzini - June 15, 2010, 1:34 p.m.
On 06/15/2010 01:04 PM, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>
> No need for kvm_init() stub in kvm-stub.c as already defined in
> qemu-kvm.h

Why not keep the other one and match upstream?  Instead, I'd remove this 
one and move kvm_inject_x86_mce to kvm-stub.c.

Files that upstream compiles only once will be compiled only without 
CONFIG_KVM, and will always call the stubs if these are in qemu-kvm.h.

Paolo
Jes Sorensen - June 15, 2010, 1:59 p.m.
On 06/15/10 15:34, Paolo Bonzini wrote:
> On 06/15/2010 01:04 PM, Jes.Sorensen@redhat.com wrote:
>> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>>
>> No need for kvm_init() stub in kvm-stub.c as already defined in
>> qemu-kvm.h
> 
> Why not keep the other one and match upstream?  Instead, I'd remove this
> one and move kvm_inject_x86_mce to kvm-stub.c.
> 
> Files that upstream compiles only once will be compiled only without
> CONFIG_KVM, and will always call the stubs if these are in qemu-kvm.h.

You're right, time for a v3 of the patch....

Cheers,
Jes

Patch

diff --git a/kvm-stub.c b/kvm-stub.c
index 7be5f5d..645fa1d 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -57,11 +57,6 @@  int kvm_check_extension(KVMState *s, unsigned int extension)
     return 0;
 }
 
-int kvm_init(int smp_cpus)
-{
-    return -ENOSYS;
-}
-
 void kvm_flush_coalesced_mmio_buffer(void)
 {
 }