* [Qemu-devel] how to pass pcid to guest?
@ 2018-01-08 20:03 Stefan Priebe - Profihost AG
2018-01-08 22:07 ` Eric Blake
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Priebe - Profihost AG @ 2018-01-08 20:03 UTC (permalink / raw)
To: qemu-devel
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
Qemu is 2.9.1
Thanks!
Greets,
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] how to pass pcid to guest?
2018-01-08 20:03 [Qemu-devel] how to pass pcid to guest? Stefan Priebe - Profihost AG
@ 2018-01-08 22:07 ` Eric Blake
2018-01-09 13:12 ` Stefan Priebe - Profihost AG
2018-01-10 13:02 ` Daniel P. Berrange
0 siblings, 2 replies; 4+ messages in thread
From: Eric Blake @ 2018-01-08 22:07 UTC (permalink / raw)
To: Stefan Priebe - Profihost AG, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
On 01/08/2018 02:03 PM, 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).
Indeed; you are still waiting on the qemu patch mentioned here:
https://www.qemu.org/2018/01/04/spectre/
which is still undergoing the review process, but should be up (in the
form of 2.11.1) "in the next few days".
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] how to pass pcid to guest?
2018-01-08 22:07 ` Eric Blake
@ 2018-01-09 13:12 ` Stefan Priebe - Profihost AG
2018-01-10 13:02 ` Daniel P. Berrange
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Priebe - Profihost AG @ 2018-01-09 13:12 UTC (permalink / raw)
To: Eric Blake, qemu-devel
Am 08.01.2018 um 23:07 schrieb Eric Blake:
> On 01/08/2018 02:03 PM, 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).
>
> Indeed; you are still waiting on the qemu patch mentioned here:
> https://www.qemu.org/2018/01/04/spectre/
>
> which is still undergoing the review process, but should be up (in the
> form of 2.11.1) "in the next few days".
OK thanks as the performance difference is significant:
no pcid:
# time for i in $(seq 1 1 50); do du -sx /; done
...
real 0m26.614s
user 0m17.548s
sys 0m9.056s
kvm started with +pcid:
# time for i in $(seq 1 1 50); do du -sx /; done
...
real 0m14.734s
user 0m7.755s
sys 0m6.973s
Greets,
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] how to pass pcid to guest?
2018-01-08 22:07 ` Eric Blake
2018-01-09 13:12 ` Stefan Priebe - Profihost AG
@ 2018-01-10 13:02 ` Daniel P. Berrange
1 sibling, 0 replies; 4+ messages in thread
From: Daniel P. Berrange @ 2018-01-10 13:02 UTC (permalink / raw)
To: Eric Blake; +Cc: Stefan Priebe - Profihost AG, qemu-devel
On Mon, Jan 08, 2018 at 04:07:53PM -0600, Eric Blake wrote:
> On 01/08/2018 02:03 PM, 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).
>
> Indeed; you are still waiting on the qemu patch mentioned here:
> https://www.qemu.org/2018/01/04/spectre/
>
> which is still undergoing the review process, but should be up (in the
> form of 2.11.1) "in the next few days".
There's two different things here. The Spectre patch you mention is about
exposing a new CPUID feature 'ibrs' that is added to fix Spectre. The 'pcid'
feature Stefan mentions is a pre-existing feature that is not a security fix,
but rather a way to improve the performance when the KAISER/KPTI patches are
enabled for Meltdown.
'pcid' is available in QEMU's Haswell, Broadwell & Skylake based CPU
models by default. For other named CPU models, you can turn it on using
',+pcid' after the model name. eg '-cpu Westmere,+pcid' (as long as your
host supports it of course)
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-10 13:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-08 20:03 [Qemu-devel] how to pass pcid to guest? Stefan Priebe - Profihost AG
2018-01-08 22:07 ` Eric Blake
2018-01-09 13:12 ` Stefan Priebe - Profihost AG
2018-01-10 13:02 ` Daniel P. Berrange
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).