From patchwork Tue Feb 13 04:51:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mackerras X-Patchwork-Id: 872608 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="lwM3Xnr4"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zgVX55PFJz9t5l for ; Tue, 13 Feb 2018 15:52:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933423AbeBMEwf (ORCPT ); Mon, 12 Feb 2018 23:52:35 -0500 Received: from ozlabs.org ([103.22.144.67]:37875 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933378AbeBMEwe (ORCPT ); Mon, 12 Feb 2018 23:52:34 -0500 Received: by ozlabs.org (Postfix, from userid 1003) id 3zgVX06xnqz9sBZ; Tue, 13 Feb 2018 15:52:32 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1518497552; bh=ih9nDYhmrs0PpPQNEJtpBQvGB/1fu/dbyWPLIQi4qRw=; h=Date:From:To:Cc:Subject:From; b=lwM3Xnr4dqKGCiKXmLBQaY3iP3w3f3/xqdl+6RbeGoit27SmHrAT7irhfbb0clPoh gm+Eqfw+njqQMfRueaIL4aa931l1bHH54zatsvLOmluo8kl7eEdRAA1PcZIAUMWJF2 A2QD1XXUfeuvrYrURF16uHONb/fDcmeJFLs4OleBa3wGHkdWbr7hQL8UdirI7CQSCc T3onNguqmgz9JHc6bBDe+aqIC8C60VDtgAUzflsAEZ4MXAoIA7e4qlLigb4SwoETmh jiROZM/gdBiZ+1vHtta+MeruJg9kGx4BYDLcBvCgEM4mupaWQyfO7V71aToT0hQKs0 zKrhILKShHKRQ== Date: Tue, 13 Feb 2018 15:51:30 +1100 From: Paul Mackerras To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: Christian Zigotzky Subject: [PATCH 1/2] KVM: PPC: Fix compile error that occurs when CONFIG_ALTIVEC=n Message-ID: <20180213045130.r35rdy24uokzixho@oak.ozlabs.ibm.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org Commit accb757d798c ("KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_run", 2017-12-04) added a "goto out" statement and an "out:" label to kvm_arch_vcpu_ioctl_run(). Since the only "goto out" is inside a CONFIG_VSX block, compiling with CONFIG_VSX=n gives a warning that label "out" is defined but not used, and because arch/powerpc is compiled with -Werror, that becomes a compile error that makes the kernel build fail. Merge commit 1ab03c072feb ("Merge tag 'kvm-ppc-next-4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc", 2018-02-09) added a similar block of code inside a #ifdef CONFIG_ALTIVEC, with a "goto out" statement. In order to make the build succeed, this adds a #ifdef around the "out:" label. This is a minimal, ugly fix, to be replaced later by a refactoring of the code. Since CONFIG_VSX depends on CONFIG_ALTIVEC, it is sufficient to use #ifdef CONFIG_ALTIVEC here. Fixes: accb757d798c ("KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_run") Reported-by: Christian Zigotzky Signed-off-by: Paul Mackerras Reported-by: Christian Zigotzky Signed-off-by: Paul Mackerras --- arch/powerpc/kvm/powerpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 403e642c78f5..0083142c2f84 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1608,7 +1608,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) kvm_sigset_deactivate(vcpu); +#ifdef CONFIG_ALTIVEC out: +#endif vcpu_put(vcpu); return r; }