[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/mwait-idle: fix ubsan warning
commit 2467ab2a74463107132f7d929d2ff0e30a8b6fa3 Author: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx> AuthorDate: Mon Jan 8 10:16:58 2024 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Jan 8 10:16:58 2024 +0100 x86/mwait-idle: fix ubsan warning Fix warning: (XEN) UBSAN: Undefined behaviour in arch/x86/cpu/mwait-idle.c:1300:44 (XEN) left shift of 15 by 28 places cannot be represented in type 'int' originating from sklh_idle_state_table_update() and hence observable on one kind of CPU only. Fixes: 5a211704e88 ("mwait-idle: prevent SKL-H boot failure when C8+C9+C10 enabled") Signed-off-by: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/include/asm/mwait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/mwait.h b/xen/arch/x86/include/asm/mwait.h index f377d9fdca..9298f987c4 100644 --- a/xen/arch/x86/include/asm/mwait.h +++ b/xen/arch/x86/include/asm/mwait.h @@ -4,7 +4,7 @@ #include <xen/types.h> #define MWAIT_SUBSTATE_MASK 0xf -#define MWAIT_CSTATE_MASK 0xf +#define MWAIT_CSTATE_MASK 0xfU #define MWAIT_SUBSTATE_SIZE 4 #define CPUID_MWAIT_LEAF 5 -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |