Message ID | 1467990099-27853-2-git-send-email-dgilbert@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jul 08, 2016 at 04:01:35PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> > > 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> > --- > target-i386/cpu.h | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/target-i386/cpu.h b/target-i386/cpu.h > index 474b0b9..b3162b7 100644 > --- a/target-i386/cpu.h > +++ b/target-i386/cpu.h > @@ -1403,11 +1403,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 > -- > 2.7.4 >
diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 474b0b9..b3162b7 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -1403,11 +1403,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