public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next-20180601: build error in arch/arm64/kvm/hyp/hyp-entry.S
@ 2018-06-01 20:05 Stefan Wahren
  2018-06-01 21:26 ` Catalin Marinas
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Wahren @ 2018-06-01 20:05 UTC (permalink / raw)
  To: Stephen Rothwell, Marc Zyngier
  Cc: linux-arm-kernel, Catalin Marinas, Will Deacon, linux-kernel,
	kvmarm

Hi,

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

Regards
Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next-20180601: build error in arch/arm64/kvm/hyp/hyp-entry.S
  2018-06-01 20:05 linux-next-20180601: build error in arch/arm64/kvm/hyp/hyp-entry.S Stefan Wahren
@ 2018-06-01 21:26 ` Catalin Marinas
  2018-06-02  8:25   ` Marc Zyngier
  0 siblings, 1 reply; 4+ messages in thread
From: Catalin Marinas @ 2018-06-01 21:26 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Stephen Rothwell, Marc Zyngier, linux-arm-kernel, Will Deacon,
	linux-kernel, kvmarm

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.

I'll have a proper look tomorrow.

-- 
Catalin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next-20180601: build error in arch/arm64/kvm/hyp/hyp-entry.S
  2018-06-01 21:26 ` Catalin Marinas
@ 2018-06-02  8:25   ` Marc Zyngier
  2018-06-02  9:38     ` Catalin Marinas
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Zyngier @ 2018-06-02  8:25 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Stefan Wahren, Stephen Rothwell, linux-arm-kernel, Will Deacon,
	linux-kernel, kvmarm

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 <linux/mm.h>
 
-#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.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: linux-next-20180601: build error in arch/arm64/kvm/hyp/hyp-entry.S
  2018-06-02  8:25   ` Marc Zyngier
@ 2018-06-02  9:38     ` Catalin Marinas
  0 siblings, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2018-06-02  9:38 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Stefan Wahren, Stephen Rothwell, Will Deacon, linux-kernel,
	kvmarm

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 <linux/mm.h>
>  
> -#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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-02  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-01 20:05 linux-next-20180601: build error in arch/arm64/kvm/hyp/hyp-entry.S Stefan Wahren
2018-06-01 21:26 ` Catalin Marinas
2018-06-02  8:25   ` Marc Zyngier
2018-06-02  9:38     ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox