[lkml]   [2018]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] x86: vmx: Allow direct access to MSR_IA32_SPEC_CTRL

> On Jan 28, 2018, at 12:21 PM, Konrad Rzeszutek Wilk <> wrote:
>> On January 28, 2018 2:29:10 PM EST, KarimAllah Ahmed <> wrote:
>> Add direct access to MSR_IA32_SPEC_CTRL for guests. This is needed for
>> guests
>> that will only mitigate Spectre V2 through IBRS+IBPB and will not be
>> using a
>> retpoline+IBPB based approach.
>> To avoid the overhead of atomically saving and restoring the
>> 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.

Do you mean that the host would intercept the guest WRMSR and do WRMSR itself? I would suggest that doing so is inconsistent with the docs. As specified, doing WRMSR to write 1 to IBRS does *not* protect the guest.

For that matter, what are the semantics of VMRESUME doing a write to IBRS as part of its MSR switch? Is it treated as IBRS=1 from guest context?

 \ /
  Last update: 2018-01-28 21:41    [W:0.108 / U:1.288 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site