x86/spec_ctrl: Elide MSR_SPEC_CTRL handling in idle context when possible
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 7 May 2018 13:06:16 +0000 (14:06 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 22 May 2018 17:41:33 +0000 (18:41 +0100)
commitb0a4c9ee50da034a5ddf8ac6237a3f2093a5c541
tree3b4f586151a2d460d42652a90465147474f197c2
parent1a58f06a8d354d60ba5d72c5ba382490a0d2b496
x86/spec_ctrl: Elide MSR_SPEC_CTRL handling in idle context when possible

If Xen is virtualising MSR_SPEC_CTRL handling for guests, but using 0 as its
own MSR_SPEC_CTRL value, spec_ctrl_{enter,exit}_idle() need not write to the
MSR.

Requested-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
(cherry picked from commit 94df6e8588e35cc2028ccb3fd2921c6e6360605e)

Gbp-Pq: Name x86spec_ctrl-elide-msr_spec_ctrl-handlin.patch
xen/arch/x86/spec_ctrl.c
xen/include/asm-x86/cpufeature.h
xen/include/asm-x86/spec_ctrl.h