diff -r 6783e2ec60c0 xen/common/event_channel.c --- a/xen/common/event_channel.c Mon Jul 28 11:27:48 2008 +0100 +++ b/xen/common/event_channel.c Thu Jul 31 16:55:14 2008 +0800 @@ -446,6 +446,9 @@ static long __evtchn_close(struct domain default: BUG(); } + + /* clear pending event to avoid unexpected behavior */ + clear_bit(port1, &shared_info(d1, evtchn_pending)); /* Reset binding to vcpu0 when the channel is freed. */ chn1->state = ECS_FREE;