VMX: don't unconditionally set the tsc_scaling.setup hook
authorJan Beulich <jbeulich@suse.com>
Thu, 19 Jul 2018 07:35:43 +0000 (09:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 19 Jul 2018 07:35:43 +0000 (09:35 +0200)
commit2e20a71404d5bff0b6a0bb604c89c2192c38755a
tree74f5ee3037d513a465c0d634d3771120355fb74a
parent773b86303ffe1a0181be3382d98680f58314f84d
VMX: don't unconditionally set the tsc_scaling.setup hook

Instead of checking hvm_tsc_scaling_supported inside the hook function,
install the hook only when setting state such that said predicate
becomes true.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c