On Sun, 2018-01-28 at 15:21 -0500, Konrad Rzeszutek Wilk wrote: > >To avoid the overhead of atomically saving and restoring the MSR_IA32_SPEC_CTRL > >for guests that do not actually use the MSR, only add_atomic_switch_msr when a > >non-zero is written to it. > > > We tried this and found that it was about 3% slower that doing the > old way of rdmsr and wrmsr. > > But that was also with the host doing IBRS as well. The common case will be that neither host nor guest are doing IBRS. Until the guest touches the MSR we do absolutely *nothing* with it, which is definitely the fastest option.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature