xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports
authorOlaf Hering <olaf@aepfle.de>
Thu, 25 Aug 2011 16:30:48 +0000 (18:30 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 1 Sep 2011 15:48:54 +0000 (11:48 -0400)
commit62cc5fc7b2e0218144e162afb8191db9b924b5e6
tree8d8d301157536fe6d65c8ca3303995a81a5a7d3b
parentc4c303c7c5679b4b368e12f41124aee29c325b76
xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports

During a kexec boot some virqs such as timer and debugirq were already
registered by the old kernel.  The hypervisor will return -EEXISTS from
the new EVTCHNOP_bind_virq request and the BUG in bind_virq_to_irq()
triggers.  Catch the -EEXISTS error and loop through all possible ports to find
what port belongs to the virq/cpu combo.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
[v2:
  - use NR_EVENT_CHANNELS instead of private MAX_EVTCHNS]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/events.c