]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.10.96/x86-xen-don-t-reset-vcpu_info-on-a-cancelled-suspend.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.10.96 / x86-xen-don-t-reset-vcpu_info-on-a-cancelled-suspend.patch
1 From 6a1f513776b78c994045287073e55bae44ed9f8c Mon Sep 17 00:00:00 2001
2 From: "Ouyang Zhaowei (Charles)" <ouyangzhaowei@huawei.com>
3 Date: Wed, 6 May 2015 09:47:04 +0800
4 Subject: x86/xen: don't reset vcpu_info on a cancelled suspend
5
6 From: "Ouyang Zhaowei (Charles)" <ouyangzhaowei@huawei.com>
7
8 commit 6a1f513776b78c994045287073e55bae44ed9f8c upstream.
9
10 On a cancelled suspend the vcpu_info location does not change (it's
11 still in the per-cpu area registered by xen_vcpu_setup()). So do not
12 call xen_hvm_init_shared_info() which would make the kernel think its
13 back in the shared info. With the wrong vcpu_info, events cannot be
14 received and the domain will hang after a cancelled suspend.
15
16 Signed-off-by: Charles Ouyang <ouyangzhaowei@huawei.com>
17 Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
18 Signed-off-by: David Vrabel <david.vrabel@citrix.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21 ---
22 arch/x86/xen/suspend.c | 3 ++-
23 1 file changed, 2 insertions(+), 1 deletion(-)
24
25 --- a/arch/x86/xen/suspend.c
26 +++ b/arch/x86/xen/suspend.c
27 @@ -30,7 +30,8 @@ void xen_arch_hvm_post_suspend(int suspe
28 {
29 #ifdef CONFIG_XEN_PVHVM
30 int cpu;
31 - xen_hvm_init_shared_info();
32 + if (!suspend_cancelled)
33 + xen_hvm_init_shared_info();
34 xen_callback_vector();
35 xen_unplug_emulated_devices();
36 if (xen_feature(XENFEAT_hvm_safe_pvclock)) {