aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu.h
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2016-07-08 16:01:35 +0100
committerEduardo Habkost <ehabkost@redhat.com>2016-07-20 11:58:43 -0300
commit709787ee997f0a0ccab78e0edaf10d48929151ee (patch)
tree68ee4b29284addb1486be6e9be028f1e55f9e8c2 /target-i386/cpu.h
parent338404d061144956b76f9893ca3434d057dff2d4 (diff)
target-i386: Provide TCG_PHYS_ADDR_BITS
Provide a constant for the number of address bits supported under TCG. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r--target-i386/cpu.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 5b14a72baa..8b6bd0be2a 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -1419,11 +1419,13 @@ uint64_t cpu_get_tsc(CPUX86State *env);
/* XXX: This value should match the one returned by CPUID
* and in exec.c */
# if defined(TARGET_X86_64)
-# define PHYS_ADDR_MASK 0xffffffffffLL
+# define TCG_PHYS_ADDR_BITS 40
# else
-# define PHYS_ADDR_MASK 0xfffffffffLL
+# define TCG_PHYS_ADDR_BITS 36
# endif
+#define PHYS_ADDR_MASK MAKE_64BIT_MASK(0, TCG_PHYS_ADDR_BITS)
+
#define cpu_init(cpu_model) CPU(cpu_x86_init(cpu_model))
#define cpu_signal_handler cpu_x86_signal_handler