xref: /openbmc/linux/arch/x86/xen/suspend_hvm.c (revision 40662333)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/types.h>
3 
4 #include <xen/xen.h>
5 #include <xen/hvm.h>
6 #include <xen/features.h>
7 #include <xen/interface/features.h>
8 #include <xen/events.h>
9 
10 #include "xen-ops.h"
11 
12 void xen_hvm_post_suspend(int suspend_cancelled)
13 {
14 	if (!suspend_cancelled) {
15 		xen_hvm_init_shared_info();
16 		xen_vcpu_restore();
17 	}
18 	if (xen_percpu_upcall) {
19 		unsigned int cpu;
20 
21 		for_each_online_cpu(cpu)
22 			BUG_ON(xen_set_upcall_vector(cpu));
23 	} else {
24 		xen_setup_callback_vector();
25 	}
26 	xen_unplug_emulated_devices();
27 }
28