summaryrefslogtreecommitdiffstats
path: root/target/i386/tcg/helper-tcg.h
diff options
context:
space:
mode:
authorPaolo Bonzini2021-03-18 14:35:56 +0100
committerPaolo Bonzini2021-03-19 13:48:18 +0100
commitb8184135835068e9579e678f0b54465ee6161d32 (patch)
tree92cfeadfc6c3c2339440ba970f139c0dafec56a6 /target/i386/tcg/helper-tcg.h
parentqom: use qemu_printf to print help for user-creatable objects (diff)
downloadqemu-b8184135835068e9579e678f0b54465ee6161d32.tar.gz
qemu-b8184135835068e9579e678f0b54465ee6161d32.tar.xz
qemu-b8184135835068e9579e678f0b54465ee6161d32.zip
target/i386: allow modifying TCG phys-addr-bits
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/tcg/helper-tcg.h')
-rw-r--r--target/i386/tcg/helper-tcg.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/target/i386/tcg/helper-tcg.h b/target/i386/tcg/helper-tcg.h
index c133c63555..ef60e2e04b 100644
--- a/target/i386/tcg/helper-tcg.h
+++ b/target/i386/tcg/helper-tcg.h
@@ -25,17 +25,13 @@
/* Maximum instruction code size */
#define TARGET_MAX_INSN_SIZE 16
-/*
- * XXX: This value should match the one returned by CPUID
- * and in exec.c
- */
-# if defined(TARGET_X86_64)
+#if defined(TARGET_X86_64)
# define TCG_PHYS_ADDR_BITS 40
-# else
+#else
# define TCG_PHYS_ADDR_BITS 36
-# endif
+#endif
-#define PHYS_ADDR_MASK MAKE_64BIT_MASK(0, TCG_PHYS_ADDR_BITS)
+QEMU_BUILD_BUG_ON(TCG_PHYS_ADDR_BITS > TARGET_PHYS_ADDR_SPACE_BITS);
/**
* x86_cpu_do_interrupt: