* Problem about DOMID_SELF
@ 2012-04-15 8:58 夏业添
2012-04-16 7:39 ` Ian Campbell
0 siblings, 1 reply; 2+ messages in thread
From: 夏业添 @ 2012-04-15 8:58 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 750 bytes --]
Hi everyone,
I'm new on this field. The comment of source code says that "DOMID_SELF is
used in certain contexts to refer to oneself." Is this id the micro returns
the same as the id which i can get by xm list?
This is the result of my xm list:
[xyt@localhost xen_onoff]$ sudo xm list
Name ID Mem VCPUs State
Time(s)
Domain-0 0 1974 2 r-----
30180.0
reciever 512
1 0.0
sender 2 512 1 -b----
76.1
But if I use printk(KERN_EMERG"this dom:%d\n",DOMID_SELF) on Dom0, the
result is 32752 instead of 0.
Could someone tell me why this happens? Thanks!
[-- Attachment #1.2: Type: text/html, Size: 866 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem about DOMID_SELF
2012-04-15 8:58 Problem about DOMID_SELF 夏业添
@ 2012-04-16 7:39 ` Ian Campbell
0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2012-04-16 7:39 UTC (permalink / raw)
To: 夏业添; +Cc: xen-devel@lists.xen.org
On Sun, 2012-04-15 at 09:58 +0100, 夏业添 wrote:
> Hi everyone,
>
> I'm new on this field. The comment of source code says that
> "DOMID_SELF is used in certain contexts to refer to oneself." Is this
> id the micro returns the same as the id which i can get by xm list?
DOMID_SELF is a magic number used as a placeholder to mean "this
domain", it is interpreted this way by various routines in the
hypervsor, it is not literally the domid of the current domain.
I suggest you grep the Xen source for the definition and use of
DOMID_SELF, all should become clear.
In general domains are not (and do not need to be) aware of their own
domain id.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-16 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-15 8:58 Problem about DOMID_SELF 夏业添
2012-04-16 7:39 ` Ian Campbell
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).