Re: [Qemu-devel] [PATCH v4 2/5] x86: Allow physical address bits to be set

2016-07-08 Thread Eduardo Habkost
On Fri, Jul 08, 2016 at 05:59:16PM -0700, Richard Henderson wrote: > On 07/08/2016 04:36 PM, Eduardo Habkost wrote: > > -#elif defined(TARGET_X86_64) > > -#define TARGET_PHYS_ADDR_SPACE_BITS 42 > > -#elif defined(TARGET_I386) > > -#define TARGET_PHYS_ADDR_SPACE_BITS 36 > > [...] > > --- a

Re: [Qemu-devel] [PATCH v4 2/5] x86: Allow physical address bits to be set

2016-07-08 Thread Richard Henderson
On 07/08/2016 04:36 PM, Eduardo Habkost wrote: -#elif defined(TARGET_X86_64) -#define TARGET_PHYS_ADDR_SPACE_BITS 42 -#elif defined(TARGET_I386) -#define TARGET_PHYS_ADDR_SPACE_BITS 36 [...] --- a/target-i386/cpu.h +++ b/target-i386/cpu.h [...] +#ifdef TARGET_X86_64 +#define TARGE

Re: [Qemu-devel] [PATCH v4 2/5] x86: Allow physical address bits to be set

2016-07-08 Thread Eduardo Habkost
On Fri, Jul 08, 2016 at 04:01:36PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Currently QEMU sets the x86 number of physical address bits to the > magic number 40. This is only correct on some small AMD systems; > Intel systems tend to have 36, 39, 46 bits, a

Re: [Qemu-devel] [PATCH v4 2/5] x86: Allow physical address bits to be set

2016-07-08 Thread Eduardo Habkost
On Fri, Jul 08, 2016 at 08:25:32PM +0100, Dr. David Alan Gilbert wrote: > > > +return; > > > +} > > > > > > +if (env->features[FEAT_1_EDX] & CPUID_PSE36) { > > > +cpu->phys_bits = 36; > > > +} else { > > > +cpu->phys_bits = 32; > > > >

Re: [Qemu-devel] [PATCH v4 2/5] x86: Allow physical address bits to be set

2016-07-08 Thread Dr. David Alan Gilbert
* Eduardo Habkost (ehabk...@redhat.com) wrote: > On Fri, Jul 08, 2016 at 04:01:36PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Currently QEMU sets the x86 number of physical address bits to the > > magic number 40. This is only correct on some small AMD

Re: [Qemu-devel] [PATCH v4 2/5] x86: Allow physical address bits to be set

2016-07-08 Thread Paolo Bonzini
On 08/07/2016 20:59, Eduardo Habkost wrote: > > +if (env->features[FEAT_1_EDX] & CPUID_PSE36) { > > +cpu->phys_bits = 36; > > +} else { > > +cpu->phys_bits = 32; > > But TCG_PHYS_ADDR_BITS is still 36. Does this mean TCG > reserved-bit handling is broken i

Re: [Qemu-devel] [PATCH v4 2/5] x86: Allow physical address bits to be set

2016-07-08 Thread Eduardo Habkost
On Fri, Jul 08, 2016 at 04:01:36PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Currently QEMU sets the x86 number of physical address bits to the > magic number 40. This is only correct on some small AMD systems; > Intel systems tend to have 36, 39, 46 bits, a

[Qemu-devel] [PATCH v4 2/5] x86: Allow physical address bits to be set

2016-07-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Currently QEMU sets the x86 number of physical address bits to the magic number 40. This is only correct on some small AMD systems; Intel systems tend to have 36, 39, 46 bits, and large AMD systems tend to have 48. Having the value different from your actual hardw