xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* How to get DomU id from DomU
@ 2012-01-31 10:01 Roger Pau Monné
  2012-01-31 10:30 ` Laszlo Ersek
  2012-01-31 10:43 ` Vasiliy Tolstov
  0 siblings, 2 replies; 5+ messages in thread
From: Roger Pau Monné @ 2012-01-31 10:01 UTC (permalink / raw)
  To: xen-devel

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to get DomU id from DomU
  2012-01-31 10:01 How to get DomU id from DomU Roger Pau Monné
@ 2012-01-31 10:30 ` Laszlo Ersek
  2012-01-31 10:35   ` Roger Pau Monné
  2012-01-31 10:43 ` Vasiliy Tolstov
  1 sibling, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2012-01-31 10:30 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: xen-devel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to get DomU id from DomU
  2012-01-31 10:30 ` Laszlo Ersek
@ 2012-01-31 10:35   ` Roger Pau Monné
  2012-01-31 10:46     ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Roger Pau Monné @ 2012-01-31 10:35 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: xen-devel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to get DomU id from DomU
  2012-01-31 10:01 How to get DomU id from DomU Roger Pau Monné
  2012-01-31 10:30 ` Laszlo Ersek
@ 2012-01-31 10:43 ` Vasiliy Tolstov
  1 sibling, 0 replies; 5+ messages in thread
From: Vasiliy Tolstov @ 2012-01-31 10:43 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to get DomU id from DomU
  2012-01-31 10:35   ` Roger Pau Monné
@ 2012-01-31 10:46     ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2012-01-31 10:46 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: xen-devel@lists.xensource.com, Laszlo Ersek

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-31 10:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-31 10:01 How to get DomU id from DomU Roger Pau Monné
2012-01-31 10:30 ` Laszlo Ersek
2012-01-31 10:35   ` Roger Pau Monné
2012-01-31 10:46     ` Ian Campbell
2012-01-31 10:43 ` Vasiliy Tolstov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).