From 98dc9606868a807206ad0f4c3a45046d4e0e1260 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 1 Feb 2018 11:32:45 +0100 Subject: [PATCH] x86/shim: don't use 32-bit compare on boolean variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Current upstream gas silently assumes 32-bit operand size for most operations where the size can't be inferred from an involved register (my own one doesn't anymore, which is how I've noticed this). It is pure luck that the 3 bytes following pvh_boot are currently padding ones. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Reviewed-by: Roger Pau Monné --- xen/arch/x86/boot/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index 3cb66fc06b..63bc1b3621 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -585,7 +585,7 @@ trampoline_setup: push %eax /* Magic number. */ call reloc #ifdef CONFIG_PVH_GUEST - cmp $0, sym_fs(pvh_boot) + cmpb $0, sym_fs(pvh_boot) je 1f mov %eax, sym_fs(pvh_start_info_pa) jmp 2f -- 2.30.2