APPLIED: [SRU][Xenial][PATCH] UBUNTU: SAUCE: Restore the IBRS host state on VMEXIT
Stefan Bader
stefan.bader at canonical.com
Fri Feb 1 12:45:26 UTC 2019
On 15.01.19 09:33, Juerg Haefliger wrote:
> BugLink: https://bugs.launchpad.net/bugs/1764956
>
> IBRS in Ubuntu can be controlled dynamically from userspace. Make sure
> the correct state is restored on VMEXIT.
>
> Suggested-by: Gavin Guo <gavin.guo at canonical.com>
> Signed-off-by: Juerg Haefliger <juergh at canonical.com>
> ---
Applied to xenial/master-next. Thanks.
-Stefan
> arch/x86/kernel/cpu/bugs.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index 15867c20ed1c..63d5b84e680b 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -189,6 +189,10 @@ x86_virt_spec_ctrl(u64 guest_spec_ctrl, u64 guest_virt_spec_ctrl, bool setguest)
> if (static_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD))
> hostval |= ssbd_tif_to_spec_ctrl(ti->flags);
>
> + /* IBRS dynamically controlled in MSR_SPEC_CTRL */
> + if (ibrs_enabled)
> + hostval |= SPEC_CTRL_IBRS;
> +
> if (hostval != guestval) {
> msrval = setguest ? guestval : hostval;
> wrmsrl(MSR_IA32_SPEC_CTRL, msrval);
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20190201/c0f4fa68/attachment.sig>
More information about the kernel-team
mailing list