How to get a "Self Domid" from a running domain? I thought DOMID_SELF macro would do it but from the sources looks like DOMID_SELF is a fixed value and actually doesn''t get you the domid. Is there any other Macro or API to get the self domid (from the kernel)? Thx, Venkat _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir, are you aware of any such Macro or API? Venkat ________________________________ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Kumar, Venkat Sent: Friday, October 10, 2008 10:11 AM To: xen-devel@lists.xensource.com Subject: [Xen-devel] Self Domid How to get a "Self Domid" from a running domain? I thought DOMID_SELF macro would do it but from the sources looks like DOMID_SELF is a fixed value and actually doesn''t get you the domid. Is there any other Macro or API to get the self domid (from the kernel)? Thx, Venkat _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Am Freitag, 10. Oktober 2008 schrieb Kumar, Venkat:> How to get a "Self Domid" from a running domain? > > I thought DOMID_SELF macro would do it but from the sources looks like > DOMID_SELF is a fixed value and actually doesn''t get you the domid. Is > there any other Macro or API to get the self domid (from the kernel)? Thx, > VenkatYou can read the domid from the xenstore. There is an interface both from user land and kernel part in dom0. From within the domU you need to connect to the xenbus interface. Dietmar. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 10/10/08 09:13, "Dietmar Hahn" <dietmar.hahn@fujitsu-siemens.com> wrote:> Am Freitag, 10. Oktober 2008 schrieb Kumar, Venkat: >> How to get a "Self Domid" from a running domain? >> >> I thought DOMID_SELF macro would do it but from the sources looks like >> DOMID_SELF is a fixed value and actually doesn''t get you the domid. Is >> there any other Macro or API to get the self domid (from the kernel)? Thx, >> Venkat > > You can read the domid from the xenstore. > There is an interface both from user land and kernel part in dom0. > From within the domU you need to connect to the xenbus interface.There''s not really any good reason to know it, however. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yes, xenbus_scanf on "domid" node gets it. Thx, Venkat -----Original Message----- From: Dietmar Hahn [mailto:dietmar.hahn@fujitsu-siemens.com] Sent: Friday, October 10, 2008 1:44 PM To: Kumar, Venkat Cc: xen-devel@lists.xensource.com Subject: Re: [Xen-devel] Self Domid Am Freitag, 10. Oktober 2008 schrieb Kumar, Venkat:> How to get a "Self Domid" from a running domain? > > I thought DOMID_SELF macro would do it but from the sources looks like > DOMID_SELF is a fixed value and actually doesn''t get you the domid. Is > there any other Macro or API to get the self domid (from the kernel)? Thx, > VenkatYou can read the domid from the xenstore. There is an interface both from user land and kernel part in dom0.>From within the domU you need to connect to the xenbus interface.Dietmar. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel