On Thu, Jun 16, 2016 at 07:26:01PM +0200, Paolo Bonzini wrote: > > > On 16/06/2016 19:12, Dr. David Alan Gilbert (git) wrote: > > if (env->features[FEAT_8000_0001_EDX] & CPUID_EXT2_LM) { > > - /* 64 bit processor */ > > -/* XXX: The physical address space is limited to 42 bits in exec.c. */ > > - *eax = 0x00003028; /* 48 bits virtual, 40 bits physical */ > > + /* 64 bit processor, 48 bits virtual, configurable > > + * physical bits. > > + */ > > + *eax = 0x00003000 + cpu->phys_bits; > > This probably ought to be range checked in realize. I think you can > also implement the magic 0 value there and have a bit less indentation.
Yes, please. We should move everything that requires looking at the host inside realize. Close to the "if (cpu->host_features)" check. > > In addition, "-cpu host" should have phys-bits=0. Yes. -- Eduardo