I'm running kvm on a MPU system with two Xeon E5-2680v2 @ 2.8GHz CPUs. All my VMs are Windows boxes, predominantly version 10. libvirtd is in version 5 though I experienced the described issues also with earlier versions.
As for the CPU mode, I'm using a "host-passthrough" configuration so that the VM can use the whole feature set of the CPU.
<vcpu placement='static'>6</vcpu> <cpu mode='host-passthrough' check='partial'/>
Now, here is where I get a bit lost. Say I configured a VM with 6 vCPUs as above, and I don't specify a topology (which seems a valid thing to do), then my Windows VM claims it has access to 2 sockets and only 2 virtual processors, in total. This is not just a matter of what's shown there, it's clearly reflected in the performance.
As soon as I specify the topology and change the above lines to look as follows:
<vcpu placement='static'>6</vcpu> <cpu mode='host-passthrough' check='partial'> <topology sockets='1' cores='6' threads='1'/> </cpu>
the Windows VM now recognizes the correct amount of vCPUs and performance increases accordingly.
While I understand that the topology might differ in terms of how sockets, processors and threads are distributed, it just seems weird that not the right number of total vCPUs is given to the VM unless the topology is specified.
While I'm glad it works fine now, I'd still like to better understand why this issue exists and if I chose the best way to work around it.