[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] ioreq process conflict when EVTCHNOP_bind_interdomain hypercall and vcpu pio occur concurrently
If Qemu calls xc_evtchn_bind_interdomain to allocate an free port for each vcpu, it will receive empty io-request triggered by xen. I say it empty as the ioreq in shared page is not filled. So qemu can simply skip the first ioreq of each vcpu by a pervcpu flag. You should not skip the first one by check ioreq->state , as the shared page may be modified by real vm trigged io req, so ioreq->state becomes REQUEST READY. Any bugs here? Liuyongan 2014-11-14 > -----Original Message----- > From: Liuyongan > Sent: Tuesday, November 11, 2014 8:45 PM > To: 'xen-devel@xxxxxxxxxxxxx' > Cc: 'JBeulich@xxxxxxxx'; Shanhaitao (Tony); Huangzhichao; zhangyuexi; > Fanhenglong; Qianhuibin > Subject: ioreq process conflict when EVTCHNOP_bind_interdomain hypercall > and vcpu pio occur concurrently > > I wonder if it is necessary for xen to trigger the event channel pending when > the port related a vcpu port io. > > Suppose a scenario as follows: > > 1) Qemu make a hypercall using codes: > for (i = 0; i < smp_cpus; i++) { > rc = xc_evtchn_bind_interdomain(state->xce_handle, xen_domid, > > xen_vcpu_eport(state->shared_page, i)); > if (rc == -1) { > fprintf(stderr, "bind interdomain ioctl(shared_page) error %d\n", > errno); > return -1; > } > state->ioreq_local_port[i] = rc; > ... > } > > 2) Xen do_event_channel_op allocate a free port and call evtchn_set_pending > to trigger a evtchn event. > > 3) Qemu enters main_loop and begin the evtchn event (pio event). > > 4) The vcpus of a vm begin to trigger real pio exit, and this ioreq_t will > conflict with the one triggered in step 2. > > This will certainly cause failures of real port io. > > Does anyone here have any suggestions? _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |