evtchn: make EVTCHNOP_reset suitable for kexec
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 1 Aug 2014 14:46:40 +0000 (16:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 1 Aug 2014 14:46:40 +0000 (16:46 +0200)
commit400b3bd6426f3334e47f16d55fd42f438d7fe6fa
tree95cc2c390d549063bd6514047e45949b9b9d335c
parent340f8cb83013dc80ebd29ed5b743040a5a45c146
evtchn: make EVTCHNOP_reset suitable for kexec

It would be nice to allow guests to close all event channels in
ABI-agnostic way in case of kexec/kdump. EVTCHNOP_reset looks suitable
for this purpose. However control blocks for vcpus and event array need
cleanup when FIFO ABI is being used.

With this change a guest can simply do EVTCHNOP_reset before kexec in
both 2-level and FIFO cases. It is also important to perform store/console
channel remapping after such call.

The issue can also be solved by introducing a new EVTCHNOP operation but
it seems that EVTCHNOP_reset can be reused.

[The idea was suggested by Ian Campbell, Andrew Cooper, and David Vrabel]

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
xen/common/event_channel.c
xen/common/event_fifo.c
xen/include/public/event_channel.h