HomeFreeBSD

xen-intr: fix removal of event channels during resume

Description

xen-intr: fix removal of event channels during resume

Event channel handlers cannot be removed during resume because there might
be an interrupt thread running on a CPU currently blocked in the
cpususpend_handler, which prevents the call to intr_remove_handler from
finishing and completely freezes the system during resume. r291022 tried to
fix this by allowing recursion in intr_remove_handler, but that's clearly
not enough.

Instead don't remove the handlers at the interrupt resume phase, and let
each driver remove the handler by itself during resume. In order to do this,
change the opaque event channel handler cookie to use the global interrupt
vector instead of the event channel port. The event channel port cannot be
used because after resume all event channels are reset, and the port numbers
can change.

Sponsored by: Citrix Systems R&D
MFC after: 5 days

Details

Provenance
roygerAuthored on
Parents
rS303489: indent(1): Removed whitespace shouldn't be considered in column calculations.
Branches
Unknown
Tags
Unknown