From 7cb359cc1997a9879b48e2c85b1eb0c05c968e1f Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Sun, 25 Feb 2018 20:23:19 -0500 Subject: [PATCH] target-i386: Provide TCG_PHYS_ADDR_BITS Provide a constant for the number of address bits supported under TCG. Backports commit 709787ee997f0a0ccab78e0edaf10d48929151ee from qemu --- qemu/target-i386/cpu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu/target-i386/cpu.h b/qemu/target-i386/cpu.h index a801687a..1a911db7 100644 --- a/qemu/target-i386/cpu.h +++ b/qemu/target-i386/cpu.h @@ -1409,11 +1409,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) + CPUX86State *cpu_x86_init_user(struct uc_struct *uc, const char *cpu_model); #define cpu_init cpu_x86_init_user