diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2022-01-21 15:59:03 +0000 |
---|---|---|
committer | Andrew Cooper <andrew.cooper3@citrix.com> | 2022-02-04 15:45:25 +0000 |
commit | e7ccc7a8ab92502a12dc31f652b0ca3b1be04b7e (patch) | |
tree | bafb5f205eee584af0c4f5bc77e277c95779c676 /xen/arch/x86/acpi/power.c | |
parent | 6ef732726add103ee8f63293e326ad43b1643239 (diff) |
x86/spec-ctrl: Use common MSR_SPEC_CTRL logic for AMD
Currently, amd_init_ssbd() works by being the only write to MSR_SPEC_CTRL in
the system. This ceases to be true when using the common logic.
Include AMD MSR_SPEC_CTRL in has_spec_ctrl to activate the common paths, and
introduce an AMD specific block to control alternatives. Also update the
boot/resume paths to configure default_xen_spec_ctrl.
svm.h needs an adjustment to remove a dependency on include order.
For now, only active alternatives for HVM - PV will require more work. No
functional change, as no alternatives are defined yet for HVM yet.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit 378f2e6df31442396f0afda19794c5c6091d96f9)
Diffstat (limited to 'xen/arch/x86/acpi/power.c')
-rw-r--r-- | xen/arch/x86/acpi/power.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c index bac9c16389..d4bdc3e7df 100644 --- a/xen/arch/x86/acpi/power.c +++ b/xen/arch/x86/acpi/power.c @@ -295,7 +295,7 @@ static int enter_state(u32 state) /* Re-enabled default NMI/#MC use of MSR_SPEC_CTRL. */ ci->spec_ctrl_flags |= (default_spec_ctrl_flags & SCF_ist_wrmsr); - if ( boot_cpu_has(X86_FEATURE_IBRSB) ) + if ( boot_cpu_has(X86_FEATURE_IBRSB) || boot_cpu_has(X86_FEATURE_IBRS) ) { wrmsrl(MSR_SPEC_CTRL, default_xen_spec_ctrl); ci->last_spec_ctrl = default_xen_spec_ctrl; |