Hello, This is quite a trivial question, but I haven''t been able to find how to do it. Is there anyway to get the id of a PV DomU from inside the (same) PV DomU? Thanks, Roger.
On 01/31/12 11:01, Roger Pau Monné wrote:> This is quite a trivial question, but I haven''t been able to find how > to do it. Is there anyway to get the id of a PV DomU from inside the > (same) PV DomU?Here''s a hack (untested): one could create a loop event channel with EVTCHNOP_bind_interdomain (passing in DOMID_SELF as remote_dom), then query it with EVTCHNOP_status (also passing in DOMID_SELF). On return, "interdomain.dom" (= the remote end) should have the real domid. Laszlo
2012/1/31 Laszlo Ersek <lersek@redhat.com>:> On 01/31/12 11:01, Roger Pau Monné wrote: > >> This is quite a trivial question, but I haven't been able to find how >> to do it. Is there anyway to get the id of a PV DomU from inside the >> (same) PV DomU? > > > Here's a hack (untested): one could create a loop event channel with > EVTCHNOP_bind_interdomain (passing in DOMID_SELF as remote_dom), then query > it with EVTCHNOP_status (also passing in DOMID_SELF). On return, > "interdomain.dom" (= the remote end) should have the real domid.Thanks, sure that looks quite hackish, there's no other way to do it? I need to know the dom id to set the correct watches on xenstore for driver domains. Each driver domain should watch a specific path in xenstore, that is determined based on the id of the domain itself. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2012/1/31 Roger Pau Monné <roger.pau@entel.upc.edu>:> Hello, > > This is quite a trivial question, but I haven't been able to find how > to do it. Is there anyway to get the id of a PV DomU from inside the > (same) PV DomU? >xenstore read domid -- Vasiliy Tolstov, Clodo.ru e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, 2012-01-31 at 10:35 +0000, Roger Pau Monné wrote:> 2012/1/31 Laszlo Ersek <lersek@redhat.com>: > > On 01/31/12 11:01, Roger Pau Monné wrote: > > > >> This is quite a trivial question, but I haven't been able to find how > >> to do it. Is there anyway to get the id of a PV DomU from inside the > >> (same) PV DomU? > > > > > > Here's a hack (untested): one could create a loop event channel with > > EVTCHNOP_bind_interdomain (passing in DOMID_SELF as remote_dom), then query > > it with EVTCHNOP_status (also passing in DOMID_SELF). On return, > > "interdomain.dom" (= the remote end) should have the real domid. > > Thanks, sure that looks quite hackish, there's no other way to do it? > I need to know the dom id to set the correct watches on xenstore for > driver domains. Each driver domain should watch a specific path in > xenstore, that is determined based on the id of the domain itself.Would it make sense to put that path under the domain's "home directory"? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel