Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xen: suspend: pass extra hypercall argument via suspend_info struct

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

authored by

Ian Campbell and committed by
Stefano Stabellini
36b401e2 ceb18029

+8 -2
+8 -2
drivers/xen/manage.c
··· 36 36 37 37 struct suspend_info { 38 38 int cancelled; 39 + unsigned long arg; /* extra hypercall argument */ 39 40 }; 40 41 41 42 #ifdef CONFIG_PM_SLEEP ··· 59 58 * or the domain was merely checkpointed, and 0 if it 60 59 * is resuming in a new domain. 61 60 */ 62 - si->cancelled = HYPERVISOR_suspend(0UL); 61 + si->cancelled = HYPERVISOR_suspend(si->arg); 63 62 64 63 xen_hvm_post_suspend(si->cancelled); 65 64 gnttab_resume(); ··· 98 97 * or the domain was merely checkpointed, and 0 if it 99 98 * is resuming in a new domain. 100 99 */ 101 - si->cancelled = HYPERVISOR_suspend(virt_to_mfn(xen_start_info)); 100 + si->cancelled = HYPERVISOR_suspend(si->arg); 102 101 103 102 xen_post_suspend(si->cancelled); 104 103 gnttab_resume(); ··· 149 148 } 150 149 151 150 si.cancelled = 1; 151 + 152 + if (xen_hvm_domain()) 153 + si.arg = 0UL; 154 + else 155 + si.arg = virt_to_mfn(xen_start_info); 152 156 153 157 if (xen_hvm_domain()) 154 158 err = stop_machine(xen_hvm_suspend, &si, cpumask_of(0));