[PATCH] kvm: (ppc) stub out more functions in order to permit kernel to build

Phil Carmody pc+lkml at asdf.org
Fri Mar 22 10:59:56 EST 2013

Build failure mentioned by Stephen Rothwell here:

Traced to:
commit f445f11eb2cc -"KVM: allow host header to be included even for !CONFIG_KVM"

This patch permits the build to progress by stubbing out the two functions
that it fell over on. I have no idea if that's even vaguely appropriate.

This has been .c->.o compile tested only, as g5_defconfig FTB elsewhere.

Reported-by: Stephen Rothwell <sfr at canb.auug.org.au>
Cc: Kevin Hilman <khilman at linaro.org>
Signed-off-by: Phil Carmody <pc+lkml at asdf.org>
 arch/powerpc/include/asm/kvm_ppc.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
index 44a657a..262d9b7 100644
--- a/arch/powerpc/include/asm/kvm_ppc.h
+++ b/arch/powerpc/include/asm/kvm_ppc.h
@@ -20,6 +20,8 @@
 #ifndef __POWERPC_KVM_PPC_H__
 #define __POWERPC_KVM_PPC_H__
 /* This file exists just so we can dereference kvm_vcpu, avoiding nested header
  * dependencies. */
@@ -324,4 +326,9 @@ static inline ulong kvmppc_get_ea_indexed(struct kvm_vcpu *vcpu, int ra, int rb)
 	return ea;
+static inline void kvmppc_set_xics_phys(int cpu, unsigned long addr) { return; }
+static inline void kvm_linear_init(void) { return; }
+#endif /* IS_ENABLED(CONFIG_KVM) */
 #endif /* __POWERPC_KVM_PPC_H__ */

More information about the Linuxppc-dev mailing list