Skip to contentSkip to conversation

xencommons: write domain 0's domid to xenstore

PATCH Superseded Matthew Daley 3 participants 4 messages Oct 31, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xencommons: write domain 0's domid to xenstore

libvchan's init_xs_srv (server-side xenstore-related initialization) expects to find the current domain's domid at this xenstore key. libxl (and xend) write this for domains they create. Do the same for domain 0, allowing the use of libvchan in dom0.

---
 tools/hotplug/Linux/init.d/xencommons |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/hotplug/Linux/init.d/xencommons +2 -1
index a2e633b..4ebd636 100644
@@ -108,8 +108,9 @@ do_start () {
 		    exit 1
 		fi
 
-		echo Setting domain 0 name...
+		echo Setting domain 0 name and domid...
 		${BINDIR}/xenstore-write "/local/domain/0/name" "Domain-0"
+		${BINDIR}/xenstore-write "/local/domain/0/domid" 0
 	fi
 
 	echo Starting xenconsoled...
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/1 xencommons: write domain 0's domid to xenstore

libvchan's init_xs_srv (server-side xenstore-related initialization) expects to find the current domain's domid at this xenstore key. libxl (and xend) write this for domains they create. Do the same for domain 0, allowing the use of libvchan in dom0.

---
v2: Modify NetBSD xencommons too.

 tools/hotplug/Linux/init.d/xencommons |    3 ++-
 tools/hotplug/NetBSD/rc.d/xencommons  |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
tools/hotplug/Linux/init.d/xencommons +2 -1
index a2e633b..4ebd636 100644
@@ -108,8 +108,9 @@ do_start () {
 		    exit 1
 		fi
 
-		echo Setting domain 0 name...
+		echo Setting domain 0 name and domid...
 		${BINDIR}/xenstore-write "/local/domain/0/name" "Domain-0"
+		${BINDIR}/xenstore-write "/local/domain/0/domid" 0
 	fi
 
 	echo Starting xenconsoled...
tools/hotplug/NetBSD/rc.d/xencommons +2 -1
index fe4c9ac..b1c3531 100644
@@ -68,8 +68,9 @@ xen_startcmd()
 
 	printf "\n"
 
-	printf "Setting domain 0 name.\n"
+	printf "Setting domain 0 name and domid.\n"
 	${BINDIR}/xenstore-write "/local/domain/0/name" "Domain-0"
+	${BINDIR}/xenstore-write "/local/domain/0/domid" 0
 }
 
 xen_stop()
Signature · 1 line
1.7.10.4
Acked-by on v2 1/1
#2 lore raw
Quoted 6 lines · Matthew Daley

libvchan's init_xs_srv (server-side xenstore-related initialization) expects to find the current domain's domid at this xenstore key. libxl (and xend) write this for domains they create. Do the same for domain 0, allowing the use of libvchan in dom0.

I also have a patch similar to this one in my driver domain series:

http://marc.info/?l=xen-devel&m=138070596009369

Which also adds a function to get the domid from libxl. I'm happy for this to go in before mine:

#3 lore raw
Quoted 8 lines · Roger Pau Monné
Quoted 6 lines · Matthew Daley

libvchan's init_xs_srv (server-side xenstore-related initialization) expects to find the current domain's domid at this xenstore key. libxl (and xend) write this for domains they create. Do the same for domain 0, allowing the use of libvchan in dom0.

Quoted 8 lines

I also have a patch similar to this one in my driver domain series:

http://marc.info/?l=xen-devel&m=138070596009369

Which also adds a function to get the domid from libxl. I'm happy for this to go in before mine:

Thanks both of you. Acked also and applied.