On Wed, Mar 04, 2015 at 02:52:06PM +0000, Jiang, Yunhong wrote: > Hi, Daniel > I'm a bit confused of the None/'none' for CONF.libvirt.cpu_mode. Per my > understanding, None means there is no configuration provided and libvirt will > select the default value based on the virt_type, none means no cpu_mode > information should be provided. For the guest, am I right? > > In _get_guest_cpu_model_config() on virt/libvirt/driver.py, > if mode is 'none', kvm/qemu virt_type will return a > vconfig.LibvirtConfigGuestCPU() while other virt type will return None. > What's the difference of this return difference?
The LibvirtConfigGuestCPU object is used for more than just configuring the CPU model. It is also used for expressing CPU topology (sockets, cores, threads) and NUMA topology. So even if cpu model is None, we still need that object in the kvm case. 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 :| __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev