[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [help] problem with `tools/xenstore/xs.c: xs_talkv()`

On Fri, Jan 4, 2013 at 11:55 AM, 马磊 <aware.why@xxxxxxxxx> wrote:

On Wed, Jan 2, 2013 at 10:34 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
On Wed, 2012-12-26 at 09:53 +0000, 马磊 wrote:

> I got xen source code from
> http://www.xen.org/download/index_4.1.2.html .
> when using `xl restore`,xc_evtchn_alloc_unbound will raise this
> error: xc: error: do_evtchn_op: HYPERVISOR_event_channel_op failed: -1
> (3 = No such process): Internal error.
> what does this mean and what does such process refer to?

"No such process" is what strerror(3) returns for ESRCH. In this case it
won't be a process which is not found but most likely it is the event
channel. (this misuse of terminology is a symptom of reusing the POSIX
errno numbers in the hypercall interface)


Thanks for your kindness! 

    I looked into the functions for logging, in this case,  `3 = No such process` was from `errno` and the ` HYPERVISOR_event_channel_op failed: -1 ` was from hypervisor-level error(src/xen/common/event_channel.c).
In my option, that's to say, error number of -1 was caused by hypervisor; but what was the error number of 3 caused by,  dom0?
Do both the two error numbers refer to the description defined in errno.h or else hypervisor has its own error description?

    I run `xl restore` in sudo mode, it had no reason for `EPERM`.

Besides, the error `ESRCH` is raised by src/xen/common/event_channel.c:evtchn_bind_interdomain 
160-static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)                                                                                                                                                                   
 162    struct evtchn *lchn, *rchn;                                                                                                                                                                                                         
 163    struct domain *ld = current->domain, *rd;                                                                                                                                                                                           
 164    int            lport, rport = bind->remote_port;                                                                                                                                                                                    
 165    domid_t        rdom = bind->remote_dom;                                                                                                                                                                                             
 166    long           rc;                                                                                                                                                                                                                  
 168    if ( rdom == DOMID_SELF )                                                                                                                                                                                                           
 169        rdom = current->domain->domain_id;                                                                                                                                                                                              
 171    if ( (rd = rcu_lock_domain_by_id(rdom)) == NULL )                                                                                                                                                                                   
 172        return -ESRCH;  
but in actually, the error `xc_evtchn_alloc_unbound will raise this error: xc: error: do_evtchn_op: HYPERVISOR_event_channel_op failed: -1 (3 = No such process): Internal error.` I mentioned above is 
caused by src/xen/common/event_channel.c:evtchn_alloc_unbound
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.