Subject: Re: linux-next: kvm tree build failure

From: Stephen Rothwell <[email-masked]>
Date: Mon, 11 Jan 2010 19:21:05 +1100

Hi Avi,

On Mon, 11 Jan 2010 19:07:49 +1100 Stephen Rothwell <[email-masked]> wrote:
>
> Caused by commit 7f31fad9aad3bb9df95793d72e037bb4d587ee83 ("KVM: PPC: Use
> accessor functions for GPR access").  I couldn't easily revert that
> commit, so I applied the following fixup patch instead.

After which I got this:

arch/powerpc/kvm/built-in.o: In function `kvmppc_handler_0':
(.text+0x69ba): undefined reference to `VCPU_GPRS'
arch/powerpc/kvm/built-in.o: In function `kvmppc_handler_0':
(.text+0x69be): undefined reference to `VCPU_GPRS'
arch/powerpc/kvm/built-in.o: In function `kvmppc_handler_1':
(.text+0x69e6): undefined reference to `VCPU_GPRS'
arch/powerpc/kvm/built-in.o: In function `kvmppc_handler_1':
(.text+0x69ea): undefined reference to `VCPU_GPRS'
arch/powerpc/kvm/built-in.o: In function `kvmppc_handler_2':
(.text+0x6a12): undefined reference to `VCPU_GPRS'
arch/powerpc/kvm/built-in.o:(.text+0x6a16): more undefined references to `VCPU_GPRS' follow

Caused by commit f38ae173fffd673d4bc5cb4062d9dc27146cfb4a ("KVM: PPC: Use
PACA backed shadow vcpu").  I have applied the following fixup patch for
today:

From: Stephen Rothwell <[email-masked]>
Date: Mon, 11 Jan 2010 19:15:02 +1100
Subject: [PATCH] kvm: another PPC fixup (asm-offsets)

Signed-off-by: Stephen Rothwell <[email-masked]>
---
 arch/powerpc/kernel/asm-offsets.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index be90ced..16dab65 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -437,11 +437,11 @@ int main(void)
 	DEFINE(VCPU_HIGHMEM_HANDLER, offsetof(struct kvm_vcpu, arch.highmem_handler));
 	DEFINE(VCPU_RMCALL, offsetof(struct kvm_vcpu, arch.rmcall));
 	DEFINE(VCPU_HFLAGS, offsetof(struct kvm_vcpu, arch.hflags));
-	DEFINE(VCPU_GPRS, offsetof(struct kvm_vcpu, arch.gpr));
 #else
 	DEFINE(VCPU_CR, offsetof(struct kvm_vcpu, arch.cr));
 	DEFINE(VCPU_XER, offsetof(struct kvm_vcpu, arch.xer));
 #endif /* CONFIG_PPC64 */
+	DEFINE(VCPU_GPRS, offsetof(struct kvm_vcpu, arch.gpr));
 #endif
 #ifdef CONFIG_44x
 	DEFINE(PGD_T_LOG2, PGD_T_LOG2);
-- 
1.6.5.7

-- 
Cheers,
Stephen Rothwell                    [email-masked]
http://www.canb.auug.org.au/~sfr/