[pve-devel] cpuflag: pcid needed in guest for good performance after meltdown

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Jan 9 14:58:24 CET 2018


On Mon, Jan 08, 2018 at 09:34:57PM +0100, Stefan Priebe - Profihost AG wrote:
> Hello,
> 
> for meltdown mitigation and performance it's important to have the pcid
> flag passed down to the guest (f.e.
> https://groups.google.com/forum/m/#!topic/mechanical-sympathy/L9mHTbeQLNU).
> 
> My host shows the flag:
> # grep ' pcid ' /proc/cpuinfo  | wc -l
> 56
> 
> But the guest does not:
> # grep pcid /proc/cpuinfo
> #
> 
> Guest was started with:
> -cpu IvyBridge,+kvm_pv_unhalt,+kvm_pv_eoi,enforce,vendor=GenuineIntel
> 
> Is this something missing in host kernel or in PVE?
> 
> Greets,
> Stefan

we are preparing a patch for qemu-server to allow enabling the pcid
cpuflag on a VM config level (especially since most VMs will run with
kvm64, where changing the default is not an option!).

switching it on by default for SandyBridge and co (which are missing it
in Qemu, but support it technically) will likely happen with the move to
Qemu 2.11, pending further feedback and review (it is not clear at all
how various guest OS handle getting the flag changed out under them when
migrating, and we don't want to integrate specific pinning support in a
rushed through manner).

for now you can of course just patch a hardcoded +pcid in to the cpu
flag list on your hosts if you know your CPUs all support it and
stop/start your VMs to regain lost performance.




More information about the pve-devel mailing list