summaryrefslogtreecommitdiffstats
path: root/target-i386
diff options
context:
space:
mode:
authorEduardo Habkost2015-05-29 21:31:12 +0200
committerEduardo Habkost2015-06-02 20:15:52 +0200
commit458cf469f4a1cb520b07092f5537c5a6d2389d23 (patch)
tree149f539c61a0d0b2fdc15c1e6addf7e7d5e0a231 /target-i386
parentpc: Ensure non-zero CPU ref count after attaching to ICC bus (diff)
downloadqemu-458cf469f4a1cb520b07092f5537c5a6d2389d23.tar.gz
qemu-458cf469f4a1cb520b07092f5537c5a6d2389d23.tar.xz
qemu-458cf469f4a1cb520b07092f5537c5a6d2389d23.zip
target-i386: Fix signedness of MSR_IA32_APICBASE_BASE
Existing definition triggers the following when using clang -fsanitize=undefined: hw/intc/apic_common.c:314:55: runtime error: left shift of 1048575 by 12 places cannot be represented in type 'int' Fix it so we won't try to shift a 1 to the sign bit of a signed integer. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/cpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 4ee12ca2e9..26182bdc7e 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -305,7 +305,7 @@
#define MSR_IA32_APICBASE 0x1b
#define MSR_IA32_APICBASE_BSP (1<<8)
#define MSR_IA32_APICBASE_ENABLE (1<<11)
-#define MSR_IA32_APICBASE_BASE (0xfffff<<12)
+#define MSR_IA32_APICBASE_BASE (0xfffffU<<12)
#define MSR_IA32_FEATURE_CONTROL 0x0000003a
#define MSR_TSC_ADJUST 0x0000003b
#define MSR_IA32_TSCDEADLINE 0x6e0