xen: don't free percpu areas during suspend
authorJuergen Gross <jgross@suse.com>
Tue, 2 Apr 2019 05:34:55 +0000 (07:34 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 4 Apr 2019 10:10:12 +0000 (11:10 +0100)
commitaca2a985a55ad9a0fcc1a9f23c8c4755598928ec
tree34e1818122b9b8f55cc1ade98793a87c4ed1dc40
parent51c79e943fb3f9a746181f8b8415cf2baa5d26bd
xen: don't free percpu areas during suspend

Instead of freeing percpu areas during suspend and allocating them
again when resuming keep them. Only free an area in case a cpu didn't
come up again when resuming.

It should be noted that there is a potential change in behaviour as
the percpu areas are no longer zeroed out during suspend/resume. While
I have checked the called cpu notifier hooks to cope with that there
might be some well hidden dependency on the previous behaviour. OTOH
a component not registering itself for cpu down/up and expecting to
see a zeroed percpu variable after suspend/resume is kind of broken
already. And the opposite case, where a component is not registered
to be called for cpu down/up and is not expecting a percpu variable
suddenly to be zero due to suspend/resume is much more probable,
especially as the suspend/resume functionality seems not to be tested
that often.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/percpu.c