Srujan D. Kotikela
2010-Sep-27 19:24 UTC
[Xen-devel] Unable to bind two domains for event channel
hi, I am trying to create an event channel between Dom0 and Dom2 *CODE:* int main(void){ int xce_handle, src_port, dst_port, xc_handle; int dom, remote_dom; dom=0; remote_dom=2; xc_handle=xc_interface_open(); //open the hypervisor interface printf("\n Accquired HYPERVISOR INTERFACE HANDLE: %d \n", xc_handle); dst_port = xc_evtchn_alloc_unbound(xc_handle, remote_dom, dom); //allocate a port on the remote domain printf("\n Allocated the port %d \n", dst_port); xce_handle = xc_evtchn_open(); //create a handle for event channel printf("\n Accquired HYPERVISOR INTERFACE EVTCHN HANDLE: %d\n", xce_handle); src_port = xc_evtchn_bind_interdomain(xce_handle, dom, dst_port); printf("\n Allocated the port %d \n", src_port); xc_interface_close(xc_handle); xc_evtchn_close(xce_handle); return 0; } *OUTPUT*: Accquired HYPERVISOR INTERFACE HANDLE: 3 Allocated the port 19 Accquired HYPERVISOR INTERFACE EVTCHN HANDLE: 4 Allocated the port -1 My src_port is not getting allocated. I am getting -1 (error) as the return value for xc_evtchn_bind_interdomain. Can anyone help me with this? Thanks in advance, Srujan D. Kotikela _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-Sep-27 19:31 UTC
Re: [Xen-devel] Unable to bind two domains for event channel
On 27/09/2010 20:24, "Srujan D. Kotikela" <ksrujandas@gmail.com> wrote:> My src_port is not getting allocated. I am getting -1 (error) as the return > value for xc_evtchn_bind_interdomain. Can anyone help me with this?You should be passing remote_dom to xc_evtchn_bind_interdomain(), not dom. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Srujan D. Kotikela
2010-Sep-27 19:58 UTC
Re: [Xen-devel] Unable to bind two domains for event channel
Hi, what is the wrapper for EVTCHNOP_send ? -- Srujan D. Kotikela On Mon, Sep 27, 2010 at 2:35 PM, Srujan D. Kotikela <ksrujandas@gmail.com>wrote:> Hi Keir, > > Thanks a lot. It worked. I misunderstood the documentation (function > prototype) or should it be corrected? > > evtchn_port_or_error_t > xc_evtchn_bind_interdomain(int xce_handle, *int domid*, > evtchn_port_t *remote_port*); > > -- > Srujan D. Kotikela > > > > On Mon, Sep 27, 2010 at 2:31 PM, Keir Fraser <keir@xen.org> wrote: > >> On 27/09/2010 20:24, "Srujan D. Kotikela" <ksrujandas@gmail.com> wrote: >> >> > My src_port is not getting allocated. I am getting -1 (error) as the >> return >> > value for xc_evtchn_bind_interdomain. Can anyone help me with this? >> >> You should be passing remote_dom to xc_evtchn_bind_interdomain(), not dom. >> >> -- Keir >> >> >> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel