[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <HK0P153MB016460EAB0E994FFD0653EB2BFBE0@HK0P153MB0164.APCP153.PROD.OUTLOOK.COM>
Date: Tue, 12 May 2020 21:03:36 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: vkuznets <vkuznets@...hat.com>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>
CC: Wei Liu <wei.liu@...nel.org>, "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
Michael Kelley <mikelley@...rosoft.com>,
Tianyu Lan <Tianyu.Lan@...rosoft.com>
Subject: RE: [PATCH] x86/hyperv: Properly suspend/resume reenlightenment
notifications
> From: Vitaly Kuznetsov <vkuznets@...hat.com>
> Sent: Tuesday, May 12, 2020 9:02 AM
> To: linux-hyperv@...r.kernel.org
> Cc: Wei Liu <wei.liu@...nel.org>; x86@...nel.org;
> linux-kernel@...r.kernel.org; kvm@...r.kernel.org; Michael Kelley
> <mikelley@...rosoft.com>; Dexuan Cui <decui@...rosoft.com>; Tianyu Lan
> <Tianyu.Lan@...rosoft.com>
> Subject: [PATCH] x86/hyperv: Properly suspend/resume reenlightenment
> notifications
>
> Errors during hibernation with reenlightenment notifications enabled were
> reported:
>
> [ 51.730435] PM: hibernation entry
> [ 51.737435] PM: Syncing filesystems ...
> ...
> [ 54.102216] Disabling non-boot CPUs ...
> [ 54.106633] smpboot: CPU 1 is now offline
> [ 54.110006] unchecked MSR access error: WRMSR to 0x40000106 (tried
> to
> write 0x47c72780000100ee) at rIP: 0xffffffff90062f24
> native_write_msr+0x4/0x20)
> [ 54.110006] Call Trace:
> [ 54.110006] hv_cpu_die+0xd9/0xf0
> ...
>
> Normally, hv_cpu_die() just reassigns reenlightenment notifications to some
> other CPU when the CPU receiving them goes offline. Upon hibernation, there
> is no other CPU which is still online so cpumask_any_but(cpu_online_mask)
> returns >= nr_cpu_ids and using it as hv_vp_index index is incorrect.
> Disable the feature when cpumask_any_but() fails.
>
> Also, as we now disable reenlightenment notifications upon hibernation we
> need to restore them on resume. Check if hv_reenlightenment_cb was
> previously set and restore from hv_resume().
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> ---
Looks good to me. Thanks!
Reviewed-by: Dexuan Cui <decui@...rosoft.com>
Powered by blists - more mailing lists