From: Thomas Leonard Date: Thu, 26 Jun 2014 11:28:21 +0000 (+0100) Subject: mini-os: use unbind_evtchn in unbind_all_ports X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1aadb720cada315436ba386b579a6a7d05da0056;p=people%2Fliuw%2Flibxenctrl-split%2Fmini-os.git mini-os: use unbind_evtchn in unbind_all_ports This marks the channel as closed, in case someone tries to use it again. Signed-off-by: Thomas Leonard Acked-by: Ian Campbell Acked-by: Samuel Thibault --- diff --git a/events.c b/events.c index f708cb4..3c92d82 100644 --- a/events.c +++ b/events.c @@ -43,7 +43,6 @@ void unbind_all_ports(void) int cpu = 0; shared_info_t *s = HYPERVISOR_shared_info; vcpu_info_t *vcpu_info = &s->vcpu_info[cpu]; - int rc; for ( i = 0; i < NR_EVS; i++ ) { @@ -53,14 +52,8 @@ void unbind_all_ports(void) if ( test_and_clear_bit(i, bound_ports) ) { - struct evtchn_close close; printk("port %d still bound!\n", i); - mask_evtchn(i); - close.port = i; - rc = HYPERVISOR_event_channel_op(EVTCHNOP_close, &close); - if ( rc ) - printk("WARN: close_port %s failed rc=%d. ignored\n", i, rc); - clear_evtchn(i); + unbind_evtchn(i); } } vcpu_info->evtchn_upcall_pending = 0;