|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 2/4] xen/arm: Add sb instruction support
Hi Bertrand, On 31/05/2022 11:43, Bertrand Marquis wrote: diff --git a/xen/arch/arm/include/asm/cpufeature.h b/xen/arch/arm/include/asm/cpufeature.h index f7368766c0..9649a7afee 100644 --- a/xen/arch/arm/include/asm/cpufeature.h +++ b/xen/arch/arm/include/asm/cpufeature.h @@ -67,8 +67,9 @@ #define ARM_WORKAROUND_BHB_LOOP_24 13 #define ARM_WORKAROUND_BHB_LOOP_32 14 #define ARM_WORKAROUND_BHB_SMCC_3 15 +#define ARM64_HAS_SB 16 The feature is for both 32-bit and 64-bit. So I would prefer if it is called ARM_HAS_SB. -#define ARM_NCAPS 16+#define ARM_NCAPS 17#ifndef __ASSEMBLY__ @@ -78,6 +79,9 @@ extern DECLARE_BITMAP(cpu_hwcaps, ARM_NCAPS); +void check_local_cpu_features(void); Looking at the patch bcab2ac84931 "xen/arm64: Place a speculation barrier following an ret instruction", the macro was defined before including <asm/arm*/macros.h> so 'sb' could be used in macros defined by the headers. I can't remember whether I chose the order because I had a failure on some compilers. However, I couldn't find anything in the assembler documentation suggesting that a macro A could use B before it is used. So I would rather avoid to move the macro if there are no strong argument for it. +#include <asm/alternative.h>#if defined (CONFIG_ARM_32) Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |