Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1510003imm; Sat, 2 Jun 2018 02:40:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKL61EM7oRMWZ6hd/YJuNXI7SHt9GJQsFr/CSD2ye6Sml+izJBXSet+MRuvqMnHbFkXv12Y X-Received: by 2002:a17:902:6e08:: with SMTP id u8-v6mr14232944plk.96.1527932414348; Sat, 02 Jun 2018 02:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527932414; cv=none; d=google.com; s=arc-20160816; b=K090K2qruS1o5hROtqjEtAyW8laR2DQ9+VZdOASYdO5z2qSthp3rmXKZWu0wxMnl7G iL2qQUDSKVqY5f0iILtoh+oAPwGe2gEKdAcOGPdCzH3XaZx/uPon5y9bkschvr+At4ws YTVG+YXsieRqdGj1Z8go3zDYbJ+ioVASQREv0xOMMH4jY7ncPoedOAL4oqA5zKiDnYu+ KoAPrFJPYjFFfoNliPFjL7g4mLHkHwT7+Gy/mmYNzZp/TSCongDo3VlDvGhKMgGU9gHt 3mEBuWgFh317F4amMtJN9QyiflFaqARVF5Jry3yICb1MQ9RfhGIliDtUEfR90M1nRMNT d0wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=mAZp66O7DmK6+tLYUOacS4YKm8IAG4caFzZFYYj0Fbc=; b=i3fPePi0oeKGiFkj8aeEAd+ZPlXqbi0N82WYgBmoOErZuG4TPTS3MR6t0L7nNEWmiX bGqpELgwFJVfVQZuh7/orMe7HtQm3I4Vd6nPbdze/LaNSNMwSCAfiyisMuSGiCHhJZSK n1lRz60HRKmdzeXUwi5yqZoBUGX+WIJa2mRe1+pE6/ybFSukwZSR8BxxilC1Y7GLIIsR Icl99cfXza5bh7qnK/64mHWfP1GAhltmPEyvckzyRpWpGoOAk8oMa4j+ik3focjoL/ad CZ7flc9rIOV6uzxqz/nxYiNWfgl17fGIV7taehToHMSRV50z/f9BU54aojYx0yoZmz2R uHzg== 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 87-v6si42186757pfo.137.2018.06.02.02.39.59; Sat, 02 Jun 2018 02:40:14 -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 S1751453AbeFBJix (ORCPT + 99 others); Sat, 2 Jun 2018 05:38:53 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60568 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbeFBJiw (ORCPT ); Sat, 2 Jun 2018 05:38: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 DE1851596; Sat, 2 Jun 2018 02:38:51 -0700 (PDT) Received: from armageddon.cambridge.arm.com (armageddon.cambridge.arm.com [10.1.206.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A91D23F24A; Sat, 2 Jun 2018 02:38:50 -0700 (PDT) Date: Sat, 2 Jun 2018 10:38:48 +0100 From: Catalin Marinas To: Marc Zyngier Cc: Stefan Wahren , Stephen Rothwell , Will Deacon , linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: Re: linux-next-20180601: build error in arch/arm64/kvm/hyp/hyp-entry.S Message-ID: <20180602093846.hgc2zu52hp66ylrz@armageddon.cambridge.arm.com> References: <457305318.78169.1527883507093@email.1und1.de> <20180601212619.6trmvqrgmbczekkt@armageddon.cambridge.arm.com> <86h8mla92t.wl-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86h8mla92t.wl-marc.zyngier@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 02, 2018 at 09:25:46AM +0100, Marc Zyngier wrote: > On Fri, 01 Jun 2018 22:26:19 +0100, > Catalin Marinas wrote: > > 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. I'll move them to the top of the file. Thanks for checking this. -- Catalin