* Daniel P. Berrange (berra...@redhat.com) wrote: > On Tue, Jul 05, 2016 at 12:29:30PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrange (berra...@redhat.com) wrote: > > > On Mon, Jul 04, 2016 at 08:16:08PM +0100, Dr. David Alan Gilbert (git) > > > wrote: > > > > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > > > > > > > On 32 bit systems fix up phys_bits to be consistent with what > > > > we tell the guest; don't ever bother with using the phys_bits > > > > property. > > > > > > > @@ -2990,6 +2986,15 @@ static void x86_cpu_realizefn(DeviceState *dev, > > > > Error **errp) > > > > cpu->phys_bits = host_phys_bits; > > > > > > > > } > > > > + } else { > > > > + /* For 32 bit systems don't use the user set value, but keep > > > > + * phys_bits consistent with what we tell the guest. > > > > + */ > > > > + if (env->features[FEAT_1_EDX] & CPUID_PSE36) { > > > > + cpu->phys_bits = 36; > > > > + } else { > > > > + cpu->phys_bits = 32; > > > > + } > > > > > > I kind of feel like we should report an error and exit if the > > > user/app has provided a phys_bits property value, rather than > > > silently ignoring their provided value, on the basis that this > > > is a user/app configuration error. > > > > Do we have an easy way to tell that the user has set the parameter > > as opposed to it being the default? > > Not sure if there's an official way, but you could perhaps default > phys_bits to -1, and treat -1 as being equivalent to 0 if set by > the user.
Done in v3 (I used 9999 since I'd kept it as an unsigned) Dave > > > Regards, > Daniel > -- > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| > |: http://libvirt.org -o- http://virt-manager.org :| > |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| > |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK