From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJ2z9-0006Fc-5K for qemu-devel@nongnu.org; Fri, 22 Mar 2013 10:30:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJ2z7-0001cu-BQ for qemu-devel@nongnu.org; Fri, 22 Mar 2013 10:30:23 -0400 From: Alexander Graf Date: Fri, 22 Mar 2013 15:28:37 +0100 Message-Id: <1363962572-11025-4-git-send-email-agraf@suse.de> In-Reply-To: <1363962572-11025-1-git-send-email-agraf@suse.de> References: <1363962572-11025-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 03/58] target-ppc: Remove CONFIG_PSERIES dependency in kvm.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel qemu-devel Cc: Blue Swirl , "qemu-ppc@nongnu.org list:PowerPC" , =?utf-8?q?Aur=C3=A9lien=20Jarno?= , David Gibson From: David Gibson target-ppc/kvm.c has an #ifdef on CONFIG_PSERIES, for the handling of KVM exits due to a PAPR hypercall from the guest. However, since commit e4c8b28cde12d01ada8fe869567dc5717a2dfcb7 "ppc: express FDT dependency of pSeries and e500 boards via default-configs/", this hasn't worked properly. That patch altered the configuration setup so that although CONFIG_PSERIES is visible from the Makefiles, it is not visible from C files. This broke the pseries machine when KVM is in use. This patch makes a quick and dirty fix, by removing the CONFIG_PSERIES dependency, replacing it with TARGET_PPC64 (since removing it entirely leads to type mismatch errors). Technically this breaks the build when configured with --disable-fdt, since that disables CONFIG_PSERIES on TARGET_PPC64. However, it turns out the build was already broken in that case, so this fixes pseries kvm without breaking anything extra. I'm looking into how to fix that build breakage, but I don't think that need delay applying this patch. Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- target-ppc/kvm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index e663ff0..9870d60 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -1077,7 +1077,7 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run) dprintf("handle halt\n"); ret = kvmppc_handle_halt(cpu); break; -#ifdef CONFIG_PSERIES +#if defined(TARGET_PPC64) case KVM_EXIT_PAPR_HCALL: dprintf("handle PAPR hypercall\n"); run->papr_hcall.ret = spapr_hypercall(cpu, -- 1.6.0.2