mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 00:02:19 -04:00
Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
Pull hyperv fix from Wei Liu: "One patch from Vitaly to fix reenlightenment notifications" * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: Properly suspend/resume reenlightenment notifications
This commit is contained in:
@@ -226,10 +226,18 @@ static int hv_cpu_die(unsigned int cpu)
|
||||
|
||||
rdmsrl(HV_X64_MSR_REENLIGHTENMENT_CONTROL, *((u64 *)&re_ctrl));
|
||||
if (re_ctrl.target_vp == hv_vp_index[cpu]) {
|
||||
/* Reassign to some other online CPU */
|
||||
/*
|
||||
* Reassign reenlightenment notifications to some other online
|
||||
* CPU or just disable the feature if there are no online CPUs
|
||||
* left (happens on hibernation).
|
||||
*/
|
||||
new_cpu = cpumask_any_but(cpu_online_mask, cpu);
|
||||
|
||||
re_ctrl.target_vp = hv_vp_index[new_cpu];
|
||||
if (new_cpu < nr_cpu_ids)
|
||||
re_ctrl.target_vp = hv_vp_index[new_cpu];
|
||||
else
|
||||
re_ctrl.enabled = 0;
|
||||
|
||||
wrmsrl(HV_X64_MSR_REENLIGHTENMENT_CONTROL, *((u64 *)&re_ctrl));
|
||||
}
|
||||
|
||||
@@ -293,6 +301,13 @@ static void hv_resume(void)
|
||||
|
||||
hv_hypercall_pg = hv_hypercall_pg_saved;
|
||||
hv_hypercall_pg_saved = NULL;
|
||||
|
||||
/*
|
||||
* Reenlightenment notifications are disabled by hv_cpu_die(0),
|
||||
* reenable them here if hv_reenlightenment_cb was previously set.
|
||||
*/
|
||||
if (hv_reenlightenment_cb)
|
||||
set_hv_tscchange_cb(hv_reenlightenment_cb);
|
||||
}
|
||||
|
||||
/* Note: when the ops are called, only CPU0 is online and IRQs are disabled. */
|
||||
|
||||
Reference in New Issue
Block a user