PPC: Add non-kvm stub file
PATCH 1/1 PPC: Add non-kvm stub file
There are cases where a kvm provided function is called from generic hw code that doesn't know whether kvm is available or not. Provide a stub file which can provide simple replacement functions for those cases.
target-ppc/Makefile.objs +1 -0
@@ -5,6 +5,7 @@ obj-y += machine.o mmu_helper.o mmu-hash32.o obj-$(TARGET_PPC64) += mmu-hash64.o endif obj-$(CONFIG_KVM) += kvm.o kvm_ppc.o +obj-$(CONFIG_NO_KVM) += kvm-stub.o obj-y += excp_helper.o obj-y += fpu_helper.o obj-y += int_helper.o
target-ppc/kvm-stub.c new file +12 -0
@@ -0,0 +1,12 @@ +/* +* QEMU KVM PPC specific function stubs +* +* Copyright Freescale Inc. 2013 +* +* Author: Alexander Graf <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +* +*/ +#include "qemu-common.h"
Quoted 6 lines · Alexander Graf
There are cases where a kvm provided function is called from generic hw code that doesn't know whether kvm is available or not. Provide a stub file which can provide simple replacement functions for those cases.
Signed-off-by Alexander Graf <[email protected]>
This by itself looks quite meager. I want to prepend this to the openpic kvm patch and squash the following chunk into that one to fix broken compilation on non-ppc systems:
target-ppc/kvm-stub.c +6 -0
@@ -10,3 +10,9 @@* */ #include "qemu-common.h" +#include "hw/ppc/openpic.h" + +int kvm_openpic_connect_vcpu (DeviceState *d,CPUState *cs) +{ +return -EINVAL ; +}
Paolo Bonzini
Reviewed-byIl 28/06/2013 13:56, Alexander Graf ha scritto:
Quoted 19 lines · Alexander Graf
Quoted 7 lines
There are cases where a kvm provided function is called from generic hw code that doesn't know whether kvm is available or not. Provide a stub file which can provide simple replacement functions for those cases.
Signed-off-by Alexander Graf <[email protected]>This by itself looks quite meager. I want to prepend this to the openpic kvm patch and squash the following chunk into that one to fix broken compilation on non-ppc systems:
target-ppc/kvm-stub.c +0
-0
target-ppc/kvm-stub.c line 18
Quoted 9 lines
target-ppc/kvm-stub.c +6
-0@@ -10,3 +10,9 @@* */ #include "qemu-common.h" +#include "hw/ppc/openpic.h" + +int kvm_openpic_connect_vcpu (DeviceState *d,CPUState *cs) +{ +return -EINVAL ; +}
Yup,