Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1464758imm; Sat, 2 Jun 2018 01:27:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL1cQmOEgeNEqPzjbbE8JEeVIHIZxrfEP9ilnYcUyDIHJw7eDp3HNQRXPmk1I/VDpxD4A26 X-Received: by 2002:a17:902:bb8d:: with SMTP id m13-v6mr14405624pls.46.1527928063347; Sat, 02 Jun 2018 01:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527928063; cv=none; d=google.com; s=arc-20160816; b=TH79vxyNVf85tPeRfv5XO6mlRvIC9az9pc9kHtlkH5KZT5TDyFPB8RPcy4SyvKY87/ ASR4I+UkPxDHqWmeHlNCLCGfsziOpwcvkj6ZSa1Vr6BlLWKdnrylkERX8j6kY2hF21kl QcO5+nx2/UnykjQYTVeNCm1mGza9KN/gjmeHVOOUQXyQ1ex7TDr3N1amKWg7RtggRWUX s7z43eoxuldGZs/9LDxlEkbPn6jMvspgWqlOoE30KhlGtnRp799U598FE7a9EMaEgu9j ufm2Ry0SdHdRexg3RKcSHmcWtl3XoqknN32b7WczC632ALq9gz2/I/eiOnOmbdUJVgjn 2Ndw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=CWJvbZSUNtxX15om8PjQvEBQh8TWu0yuALYrmNWvVoU=; b=zJzAEgzQ/Afl/N6qIsHUzOvnEAFaTfJXkGY73RtQ2bVZ+JnoWrxg9K7DeMdhT8r3vF 6UvKhNJB3TSEwL+wXVTuQzzMWycPOtmGPwPVlWxda1Ec0aDa0eaTD1FR3Df8cQqnQy/K eHUDQEA74itu7Ep06ixMKsTI9oy/LZTXA5SBs6PxVddsRqd6Py7CbcpAT4MhT5GCNaUw zofuhDLxQ7cYCajvgC+U9nKLaT+Z77PTYInxSYrRPANAtqprC0Imlj2scs2DbQQFA86l zhkZNi1nNvrBUpMkabEZCXl5B/eJNj1jlDFjJGeq4w5s4QYAuM+/YwCOIB84/ZMfM1VE 03ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10-v6si32998708pgq.302.2018.06.02.01.27.28; Sat, 02 Jun 2018 01:27:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751555AbeFBIZ5 (ORCPT + 99 others); Sat, 2 Jun 2018 04:25:57 -0400 Received: from foss.arm.com ([217.140.101.70]:60172 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbeFBIZw (ORCPT ); Sat, 2 Jun 2018 04:25:52 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A03541529; Sat, 2 Jun 2018 01:25:51 -0700 (PDT) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 56BA43F24A; Sat, 2 Jun 2018 01:25:49 -0700 (PDT) Date: Sat, 02 Jun 2018 09:25:46 +0100 Message-ID: <86h8mla92t.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Catalin Marinas Cc: Stefan Wahren , Stephen Rothwell , , Will Deacon , , Subject: Re: linux-next-20180601: build error in arch/arm64/kvm/hyp/hyp-entry.S In-Reply-To: <20180601212619.6trmvqrgmbczekkt@armageddon.cambridge.arm.com> References: <457305318.78169.1527883507093@email.1und1.de> <20180601212619.6trmvqrgmbczekkt@armageddon.cambridge.arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 01 Jun 2018 22:26:19 +0100, Catalin Marinas wrote: > > Hi Stefan, > > On Fri, Jun 01, 2018 at 10:05:07PM +0200, Stefan Wahren wrote: > > i can't build todays linux-next-20180601 and get the following error message: > > > > arch/arm64/kvm/hyp/hyp-entry.S: Assembler messages: > > arch/arm64/kvm/hyp/hyp-entry.S:128: Error: constant expression required at operand 3 -- `bfi x0,x1,#VCPU_WORKAROUND_2_FLAG_SHIFT,#1' > > > > Related commit: > > arm64: KVM: Handle guest's ARCH_WORKAROUND_2 requests > > > > Toolchain: gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu > > Kernel config: arm64/defconfig > > Thanks for reporting this. > > I can hit this as well. It looks like an #ifndef __ASSEMBLY__ in the > wrong place in arch/arm64/include/asm/kvm_asm.h. I can't tell whether it > was caused by a merge conflict resolution or just some unfortunate > interaction between the security fixes going via the arm64 tree and the > other arm64 KVM patches. The merge between 55e3748e8902 in the arm64 tree, and both fa89d31c5306 and 46c4a30b0b16 in the kvmarm tree has resulted in a slight mis-merge which I didn't spot yesterday. Apologies for not realising this myself. Stephen, could you please add the following patchlet as a resolution of the merge? diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h index c5246d80b857..a169f3a88148 100644 --- a/arch/arm64/include/asm/kvm_asm.h +++ b/arch/arm64/include/asm/kvm_asm.h @@ -30,13 +30,13 @@ /* The hyp-stub will return this for any kvm_call_hyp() call */ #define ARM_EXCEPTION_HYP_GONE HVC_STUB_ERR +#define VCPU_WORKAROUND_2_FLAG_SHIFT 0 +#define VCPU_WORKAROUND_2_FLAG (_AC(1, UL) << VCPU_WORKAROUND_2_FLAG_SHIFT) + #ifndef __ASSEMBLY__ #include -#define VCPU_WORKAROUND_2_FLAG_SHIFT 0 -#define VCPU_WORKAROUND_2_FLAG (_AC(1, UL) << VCPU_WORKAROUND_2_FLAG_SHIFT) - /* Translate a kernel address of @sym into its equivalent linear mapping */ #define kvm_ksym_ref(sym) \ ({ \ Catalin: Alternatively, you could add a patch on top of the arm64 branch, moving these two defines to the top of the file, avoiding the conflict altogether. Thanks, M. -- Jazz is not dead, it just smell funny.