On Sat, Jul 07, 2012 at 07:10:53PM +0300, Zeeshan Ali (Khattak) wrote:
Hi,
I'm trying to set exact CPU topology to qemu-kvm domains to match
host's topology. In my case, host topology is: 1 socket, 2 cores and 2
threads. If I set the XML like this:
<domain type='kvm'>
..
<vcpu placement='static'>4</vcpu>
<os>
<type arch='i686' machine='pc-0.15'>hvm</type>
<boot dev='hd'/>
</os>
<cpu mode='host-model'>
<model fallback='allow'/>
<topology sockets='1' cores='2' threads='2'/>
</cpu>
..
The qemu commandline launched for this domain looks like this:
/usr/bin/qemu-kvm -name fedora17-2 -S -M pc-0.15 -cpu
core2duo,+lahf_lm,+rdtscp,+aes,+popcnt,+sse4.2,+sse4.1,+pdcm,+xtpr,+cx16,+tm2,+est,+smx,+vmx,+ds_cpl,+dtes64,+pclmuldq,+pbe,+tm,+ht,+ss,+acpi,+ds
-enable-kvm -m 1152 -smp 4,sockets=1,cores=2,threads=2 -uuid
c573342b-2876-05b8-098e-6d5314cab062 -nodefconfig -nodefaults -chardev
socket,id=charmonitor,path=/home/zeenix/.config/libvirt/qemu/lib/fedora17-2.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc
base=utc,driftfix=slew -no-kvm-pit-reinjection -no-shutdown -no-acpi
I debugged this together with Zeeshan, and the issue comes from this -no-acpi flag
which libvirt added because the domain XML was missing
<features><acpi/></features>
So in the end that was a bug in Boxes, not really a libvirt/qemu issue.
Unless libvirt/qemu should be taught that CPU topology won't work without ACPI
and complain about it?
Christophe