From patchwork Thu Mar 14 01:53:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 227421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BCF7A2C0087 for ; Thu, 14 Mar 2013 12:54:37 +1100 (EST) Received: from localhost ([::1]:45792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFxNI-00070R-LL for incoming@patchwork.ozlabs.org; Wed, 13 Mar 2013 21:54:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFxMl-0006tw-FV for qemu-devel@nongnu.org; Wed, 13 Mar 2013 21:54:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFxMd-000479-FR for qemu-devel@nongnu.org; Wed, 13 Mar 2013 21:53:59 -0400 Received: from ozlabs.org ([203.10.76.45]:34813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFxMc-00045E-SX; Wed, 13 Mar 2013 21:53:51 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4AC7B2C00A4; Thu, 14 Mar 2013 12:53:39 +1100 (EST) From: David Gibson To: agraf@suse.de Date: Thu, 14 Mar 2013 12:53:27 +1100 Message-Id: <1363226008-26639-5-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363226008-26639-1-git-send-email-david@gibson.dropbear.id.au> References: <1363226008-26639-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 203.10.76.45 Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Subject: [Qemu-devel] [PATCH 4/5] target-ppc: Remove CONFIG_PSERIES dependency in kvm.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- target-ppc/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index eaa11a1..72d5398 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -1193,7 +1193,7 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run) dprintf("handle halt\n"); ret = kvmppc_handle_halt(env); 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,