* [PATCH] x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV
@ 2020-07-12 23:10 Sedat Dilek
2020-07-13 5:10 ` Sedat Dilek
2020-07-13 11:13 ` Wei Liu
0 siblings, 2 replies; 5+ messages in thread
From: Sedat Dilek @ 2020-07-12 23:10 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
H. Peter Anvin, Andy Lutomirski, Peter Zijlstra,
Alexandre Chartre, Sedat Dilek, Wei Liu, linux-kernel,
clang-built-linux
Cc: Jian Cai, Nathan Chancellor
When using Clang's Integrated Assembler (LLVM_IAS=1) we fell over
ClangBuiltLinux (CBL) issue #1043 where Jian Cai provided a fix.
With Jian's fix applied another issue raised up when CONFIG_HYPERV=m.
It turned out that the conversion of vectors to IDTENTRY_SYSVEC in
case of CONFIG_HYPERV was incomplete and fails with a build error:
<instantiation>:9:6: error: expected absolute expression
.if HYPERVISOR_REENLIGHTENMENT_VECTOR == 3
^
<instantiation>:1:1: note: while in macro instantiation
idtentry HYPERVISOR_REENLIGHTENMENT_VECTOR asm_sysvec_hyperv_reenlightenment sysvec_hyperv_reenlightenment has_error_code=0
^
./arch/x86/include/asm/idtentry.h:627:1: note: while in macro instantiation
idtentry_sysvec HYPERVISOR_REENLIGHTENMENT_VECTOR sysvec_hyperv_reenlightenment;
^
<instantiation>:9:6: error: expected absolute expression
.if HYPERVISOR_STIMER0_VECTOR == 3
^
<instantiation>:1:1: note: while in macro instantiation
idtentry HYPERVISOR_STIMER0_VECTOR asm_sysvec_hyperv_stimer0 sysvec_hyperv_stimer0 has_error_code=0
^
./arch/x86/include/asm/idtentry.h:628:1: note: while in macro instantiation
idtentry_sysvec HYPERVISOR_STIMER0_VECTOR sysvec_hyperv_stimer0;
I and Nathan double-checked the hyperv(isor) vectors:
$ rg --no-heading "HYPERVISOR_REENLIGHTENMENT_VECTOR|HYPERVISOR_STIMER0_VECTOR"
$ rg --no-heading "HYPERV_REENLIGHTENMENT_VECTOR|HYPERV_STIMER0_VECTOR"
Fix these typos in arch/x86/include/asm/idtentry.h:
HYPERVISOR_REENLIGHTENMENT_VECTOR -> HYPERV_REENLIGHTENMENT_VECTOR
HYPERVISOR_STIMER0_VECTOR -> HYPERV_STIMER0_VECTOR
For more details see CBL issue #1088.
With both fixes applied I was able to build/assemble with a snapshot
version of LLVM/Clang from Debian/experimental.
Cc: Jian Cai <caij2003@gmail.com>
Cc: clang-built-linux@googlegroups.com
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Fixes: a16be368dd3f ("x86/entry: Convert various hypervisor vectors to IDTENTRY_SYSVEC")
Link: https://github.com/ClangBuiltLinux/linux/issues/1043
Link: https://github.com/ClangBuiltLinux/linux/issues/1088
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
arch/x86/include/asm/idtentry.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h
index 513eb2ccbdbf..a811f6c6cf15 100644
--- a/arch/x86/include/asm/idtentry.h
+++ b/arch/x86/include/asm/idtentry.h
@@ -624,8 +624,8 @@ DECLARE_IDTENTRY_SYSVEC(POSTED_INTR_NESTED_VECTOR, sysvec_kvm_posted_intr_nested
#if IS_ENABLED(CONFIG_HYPERV)
DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_CALLBACK_VECTOR, sysvec_hyperv_callback);
-DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_REENLIGHTENMENT_VECTOR, sysvec_hyperv_reenlightenment);
-DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_STIMER0_VECTOR, sysvec_hyperv_stimer0);
+DECLARE_IDTENTRY_SYSVEC(HYPERV_REENLIGHTENMENT_VECTOR, sysvec_hyperv_reenlightenment);
+DECLARE_IDTENTRY_SYSVEC(HYPERV_STIMER0_VECTOR, sysvec_hyperv_stimer0);
#endif
#if IS_ENABLED(CONFIG_ACRN_GUEST)
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV
2020-07-12 23:10 [PATCH] x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV Sedat Dilek
@ 2020-07-13 5:10 ` Sedat Dilek
2020-07-13 11:13 ` Wei Liu
1 sibling, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2020-07-13 5:10 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
H. Peter Anvin, Andy Lutomirski, Peter Zijlstra,
Alexandre Chartre, Sedat Dilek, Wei Liu, linux-kernel,
Clang-Built-Linux ML
Cc: Jian Cai, Nathan Chancellor
On Mon, Jul 13, 2020 at 1:11 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> When using Clang's Integrated Assembler (LLVM_IAS=1) we fell over
> ClangBuiltLinux (CBL) issue #1043 where Jian Cai provided a fix.
>
Just FYI: Patch submitted by Jian.
- Sedat -
[1] https://lore.kernel.org/patchwork/patch/1271455/
[2] https://lore.kernel.org/lkml/20200713012428.1039487-1-caij2003@gmail.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV
2020-07-12 23:10 [PATCH] x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV Sedat Dilek
2020-07-13 5:10 ` Sedat Dilek
@ 2020-07-13 11:13 ` Wei Liu
2020-07-13 15:59 ` Sedat Dilek
2020-07-14 11:15 ` Sedat Dilek
1 sibling, 2 replies; 5+ messages in thread
From: Wei Liu @ 2020-07-13 11:13 UTC (permalink / raw)
To: Sedat Dilek
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
H. Peter Anvin, Andy Lutomirski, Peter Zijlstra,
Alexandre Chartre, Wei Liu, linux-kernel, clang-built-linux,
Jian Cai, Nathan Chancellor
On Mon, Jul 13, 2020 at 01:10:50AM +0200, Sedat Dilek wrote:
> When using Clang's Integrated Assembler (LLVM_IAS=1) we fell over
> ClangBuiltLinux (CBL) issue #1043 where Jian Cai provided a fix.
>
> With Jian's fix applied another issue raised up when CONFIG_HYPERV=m.
>
> It turned out that the conversion of vectors to IDTENTRY_SYSVEC in
> case of CONFIG_HYPERV was incomplete and fails with a build error:
>
> <instantiation>:9:6: error: expected absolute expression
> .if HYPERVISOR_REENLIGHTENMENT_VECTOR == 3
> ^
> <instantiation>:1:1: note: while in macro instantiation
> idtentry HYPERVISOR_REENLIGHTENMENT_VECTOR asm_sysvec_hyperv_reenlightenment sysvec_hyperv_reenlightenment has_error_code=0
> ^
> ./arch/x86/include/asm/idtentry.h:627:1: note: while in macro instantiation
> idtentry_sysvec HYPERVISOR_REENLIGHTENMENT_VECTOR sysvec_hyperv_reenlightenment;
> ^
> <instantiation>:9:6: error: expected absolute expression
> .if HYPERVISOR_STIMER0_VECTOR == 3
> ^
> <instantiation>:1:1: note: while in macro instantiation
> idtentry HYPERVISOR_STIMER0_VECTOR asm_sysvec_hyperv_stimer0 sysvec_hyperv_stimer0 has_error_code=0
> ^
> ./arch/x86/include/asm/idtentry.h:628:1: note: while in macro instantiation
> idtentry_sysvec HYPERVISOR_STIMER0_VECTOR sysvec_hyperv_stimer0;
Hmm... Interesting. GCC never complained. Guests are perhaps broken in a
rather subtle way.
>
> I and Nathan double-checked the hyperv(isor) vectors:
>
> $ rg --no-heading "HYPERVISOR_REENLIGHTENMENT_VECTOR|HYPERVISOR_STIMER0_VECTOR"
> $ rg --no-heading "HYPERV_REENLIGHTENMENT_VECTOR|HYPERV_STIMER0_VECTOR"
>
> Fix these typos in arch/x86/include/asm/idtentry.h:
>
> HYPERVISOR_REENLIGHTENMENT_VECTOR -> HYPERV_REENLIGHTENMENT_VECTOR
> HYPERVISOR_STIMER0_VECTOR -> HYPERV_STIMER0_VECTOR
>
> For more details see CBL issue #1088.
>
> With both fixes applied I was able to build/assemble with a snapshot
> version of LLVM/Clang from Debian/experimental.
I think the issue found here is independent of the other. This patch
shouldn't need to wait for the other to land.
>
> Cc: Jian Cai <caij2003@gmail.com>
> Cc: clang-built-linux@googlegroups.com
> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
> Fixes: a16be368dd3f ("x86/entry: Convert various hypervisor vectors to IDTENTRY_SYSVEC")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1043
> Link: https://github.com/ClangBuiltLinux/linux/issues/1088
> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
> ---
> arch/x86/include/asm/idtentry.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h
> index 513eb2ccbdbf..a811f6c6cf15 100644
> --- a/arch/x86/include/asm/idtentry.h
> +++ b/arch/x86/include/asm/idtentry.h
> @@ -624,8 +624,8 @@ DECLARE_IDTENTRY_SYSVEC(POSTED_INTR_NESTED_VECTOR, sysvec_kvm_posted_intr_nested
>
> #if IS_ENABLED(CONFIG_HYPERV)
> DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_CALLBACK_VECTOR, sysvec_hyperv_callback);
> -DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_REENLIGHTENMENT_VECTOR, sysvec_hyperv_reenlightenment);
> -DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_STIMER0_VECTOR, sysvec_hyperv_stimer0);
> +DECLARE_IDTENTRY_SYSVEC(HYPERV_REENLIGHTENMENT_VECTOR, sysvec_hyperv_reenlightenment);
> +DECLARE_IDTENTRY_SYSVEC(HYPERV_STIMER0_VECTOR, sysvec_hyperv_stimer0);
Reviewed-by: Wei Liu <wei.liu@kernel.org>
Thomas, can you pick this up for 5.8? Thanks.
Wei.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV
2020-07-13 11:13 ` Wei Liu
@ 2020-07-13 15:59 ` Sedat Dilek
2020-07-14 11:15 ` Sedat Dilek
1 sibling, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2020-07-13 15:59 UTC (permalink / raw)
To: Wei Liu
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
H. Peter Anvin, Andy Lutomirski, Peter Zijlstra,
Alexandre Chartre, linux-kernel, Clang-Built-Linux ML, Jian Cai,
Nathan Chancellor
On Mon, Jul 13, 2020 at 1:13 PM Wei Liu <wei.liu@kernel.org> wrote:
>
> On Mon, Jul 13, 2020 at 01:10:50AM +0200, Sedat Dilek wrote:
> > When using Clang's Integrated Assembler (LLVM_IAS=1) we fell over
> > ClangBuiltLinux (CBL) issue #1043 where Jian Cai provided a fix.
> >
> > With Jian's fix applied another issue raised up when CONFIG_HYPERV=m.
> >
> > It turned out that the conversion of vectors to IDTENTRY_SYSVEC in
> > case of CONFIG_HYPERV was incomplete and fails with a build error:
> >
> > <instantiation>:9:6: error: expected absolute expression
> > .if HYPERVISOR_REENLIGHTENMENT_VECTOR == 3
> > ^
> > <instantiation>:1:1: note: while in macro instantiation
> > idtentry HYPERVISOR_REENLIGHTENMENT_VECTOR asm_sysvec_hyperv_reenlightenment sysvec_hyperv_reenlightenment has_error_code=0
> > ^
> > ./arch/x86/include/asm/idtentry.h:627:1: note: while in macro instantiation
> > idtentry_sysvec HYPERVISOR_REENLIGHTENMENT_VECTOR sysvec_hyperv_reenlightenment;
> > ^
> > <instantiation>:9:6: error: expected absolute expression
> > .if HYPERVISOR_STIMER0_VECTOR == 3
> > ^
> > <instantiation>:1:1: note: while in macro instantiation
> > idtentry HYPERVISOR_STIMER0_VECTOR asm_sysvec_hyperv_stimer0 sysvec_hyperv_stimer0 has_error_code=0
> > ^
> > ./arch/x86/include/asm/idtentry.h:628:1: note: while in macro instantiation
> > idtentry_sysvec HYPERVISOR_STIMER0_VECTOR sysvec_hyperv_stimer0;
>
> Hmm... Interesting. GCC never complained. Guests are perhaps broken in a
> rather subtle way.
>
> >
> > I and Nathan double-checked the hyperv(isor) vectors:
> >
> > $ rg --no-heading "HYPERVISOR_REENLIGHTENMENT_VECTOR|HYPERVISOR_STIMER0_VECTOR"
> > $ rg --no-heading "HYPERV_REENLIGHTENMENT_VECTOR|HYPERV_STIMER0_VECTOR"
> >
> > Fix these typos in arch/x86/include/asm/idtentry.h:
> >
> > HYPERVISOR_REENLIGHTENMENT_VECTOR -> HYPERV_REENLIGHTENMENT_VECTOR
> > HYPERVISOR_STIMER0_VECTOR -> HYPERV_STIMER0_VECTOR
> >
> > For more details see CBL issue #1088.
> >
> > With both fixes applied I was able to build/assemble with a snapshot
> > version of LLVM/Clang from Debian/experimental.
>
> I think the issue found here is independent of the other. This patch
> shouldn't need to wait for the other to land.
>
Yes, this one is - and can land - independently.
Without Jian's fix and CONFIG_HYPERV=m we have not seen the issue.
> >
> > Cc: Jian Cai <caij2003@gmail.com>
> > Cc: clang-built-linux@googlegroups.com
> > Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
> > Fixes: a16be368dd3f ("x86/entry: Convert various hypervisor vectors to IDTENTRY_SYSVEC")
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1043
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1088
> > Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
> > ---
> > arch/x86/include/asm/idtentry.h | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h
> > index 513eb2ccbdbf..a811f6c6cf15 100644
> > --- a/arch/x86/include/asm/idtentry.h
> > +++ b/arch/x86/include/asm/idtentry.h
> > @@ -624,8 +624,8 @@ DECLARE_IDTENTRY_SYSVEC(POSTED_INTR_NESTED_VECTOR, sysvec_kvm_posted_intr_nested
> >
> > #if IS_ENABLED(CONFIG_HYPERV)
> > DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_CALLBACK_VECTOR, sysvec_hyperv_callback);
> > -DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_REENLIGHTENMENT_VECTOR, sysvec_hyperv_reenlightenment);
> > -DECLARE_IDTENTRY_SYSVEC(HYPERVISOR_STIMER0_VECTOR, sysvec_hyperv_stimer0);
> > +DECLARE_IDTENTRY_SYSVEC(HYPERV_REENLIGHTENMENT_VECTOR, sysvec_hyperv_reenlightenment);
> > +DECLARE_IDTENTRY_SYSVEC(HYPERV_STIMER0_VECTOR, sysvec_hyperv_stimer0);
>
> Reviewed-by: Wei Liu <wei.liu@kernel.org>
>
Thanks for your review.
- Sedat -
> Thomas, can you pick this up for 5.8? Thanks.
>
> Wei.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV
2020-07-13 11:13 ` Wei Liu
2020-07-13 15:59 ` Sedat Dilek
@ 2020-07-14 11:15 ` Sedat Dilek
1 sibling, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2020-07-14 11:15 UTC (permalink / raw)
To: Wei Liu
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
H. Peter Anvin, Andy Lutomirski, Peter Zijlstra,
Alexandre Chartre, linux-kernel, Clang-Built-Linux ML, Jian Cai,
Nathan Chancellor
On Mon, Jul 13, 2020 at 1:13 PM Wei Liu <wei.liu@kernel.org> wrote:
> > With both fixes applied I was able to build/assemble with a snapshot
> > version of LLVM/Clang from Debian/experimental.
>
> I think the issue found here is independent of the other. This patch
> shouldn't need to wait for the other to land.
>
> Reviewed-by: Wei Liu <wei.liu@kernel.org>
>
Submitted a v2.
- Sedat -
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-07-14 11:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-12 23:10 [PATCH] x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV Sedat Dilek
2020-07-13 5:10 ` Sedat Dilek
2020-07-13 11:13 ` Wei Liu
2020-07-13 15:59 ` Sedat Dilek
2020-07-14 11:15 ` Sedat Dilek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).