On 25.06.2024 23:10, Andrew Cooper wrote: > On 25/06/2024 3:49 pm, Jan Beulich wrote: >> On 25.06.2024 15:51, Oleksii Kurochko wrote: >>> --- a/xen/arch/riscv/include/asm/cmpxchg.h >>> +++ b/xen/arch/riscv/include/asm/cmpxchg.h >>> @@ -18,6 +18,20 @@ >>> : "r" (new) \ >>> : "memory" ); >>> >>> +/* >>> + * Binutils < 2.37 doesn't understand ANDN. If the toolchain is too >>> +ld, form >> Same question: Why's 2.37 suddenly of interest? > > You deleted the commit message which explains why:
Not really. My whole point is that while the intention of the change looks okay, description and comment describe things insufficiently, to say the least. >> RISC-V does a conditional toolchain test for the Zbb extension >> (xen/arch/riscv/rules.mk), but unconditionally uses the ANDN >> instruction in emulate_xchg_1_2(). > > Either Zbb needs to be mandatory (both in the toolchain and the board > running Xen), or emulate_xchg_1_2() needs to not use the ANDN instruction. > > I opted for the latter. And I agree with that. Jan