Patchwork KVM: PPC: Fix CONFIG_KVM_GUEST && !CONFIG_KVM case

login
register
mail settings
Submitter Alexander Graf
Date Aug. 30, 2010, 10:01 a.m.
Message ID <1283162516-29879-1-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/63014/
State Not Applicable
Headers show

Comments

Alexander Graf - Aug. 30, 2010, 10:01 a.m.
When CONFIG_KVM_GUEST is selected, but CONFIG_KVM is not, we were missing
some defines in asm-offsets.c and included too many headers at other places.

This patch makes above configuration work.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/kernel/asm-offsets.c |    6 +++---
 arch/powerpc/kernel/kvm.c         |    1 -
 2 files changed, 3 insertions(+), 4 deletions(-)
Avi Kivity - Aug. 30, 2010, 10:55 a.m.
On 08/30/2010 01:01 PM, Alexander Graf wrote:
> When CONFIG_KVM_GUEST is selected, but CONFIG_KVM is not, we were missing
> some defines in asm-offsets.c and included too many headers at other places.
>
> This patch makes above configuration work.

Applied, thanks.

Patch

diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 5e54d0f..893ba35 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -48,11 +48,11 @@ 
 #ifdef CONFIG_PPC_ISERIES
 #include <asm/iseries/alpaca.h>
 #endif
-#ifdef CONFIG_KVM
+#if defined(CONFIG_KVM) || defined(CONFIG_KVM_GUEST)
 #include <linux/kvm_host.h>
-#ifndef CONFIG_BOOKE
-#include <asm/kvm_book3s.h>
 #endif
+#if defined(CONFIG_KVM) && defined(CONFIG_PPC_BOOK3S)
+#include <asm/kvm_book3s.h>
 #endif
 
 #ifdef CONFIG_PPC32
diff --git a/arch/powerpc/kernel/kvm.c b/arch/powerpc/kernel/kvm.c
index 293765a..428d0e5 100644
--- a/arch/powerpc/kernel/kvm.c
+++ b/arch/powerpc/kernel/kvm.c
@@ -25,7 +25,6 @@ 
 #include <linux/of.h>
 
 #include <asm/reg.h>
-#include <asm/kvm_ppc.h>
 #include <asm/sections.h>
 #include <asm/cacheflush.h>
 #include <asm/disassemble.h>