forked from Minki/linux
hyperv-fixes for 5.7-rc6
-----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEIbPD0id6easf0xsudhRwX5BBoF4FAl7Dri8THHdlaS5saXVA a2VybmVsLm9yZwAKCRB2FHBfkEGgXtWvB/wIE86Nni/FpiRVGSaDYQDduGgMvfxY yBRkKw1NdQMIJCkl/63XUcpT1U1lhGolk18CMIBo3ZSLv5xLrZDfDHaD2oTZG6lu WfL3lbKcYTsF+cpBm1DkBx7p32cXGDXQ/c5UZOXQEZVPtMI9U+HGg8iRfMPnPzTQ eb6o4T7HLNlx9WWHJzx/QbB7MZ+qOyb78EFO60FEJXA/lqbabzaAgQaz8inRKu8d 70ed5Sl4mUt12GZ2a9KlvdliWBFKf/sv/Rs6VBeBpTByrGJazzlGKBQHMO1oUrme Mg3+OoCTZlFwGgkjb/0TCrR0EkVkkxTrU9EYCXg5dQkrLmvgzkPbrCIk =CnNw -----END PGP SIGNATURE----- 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:
commit
97076ea41a
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user