Skip to contentSkip to conversation

stubdoms: generate stubdom config file

PATCH In review Stefano Stabellini 2 participants 2 messages Apr 22, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stubdoms: generate stubdom config file

Hi all,
this patch removes the need for a second configuration file for
stubdoms: it is going to be automatically generated by the script stubdom-dm using command line options and xenstore to find any needed information.
The configuration script will be placed under /etc/xen/stubdoms and automatically removed when the domain is destroyed.
The only change needed in xend is not to write on xenstore sdl, opengl and serial command line options for qemu, because stubdoms do not support them.
It is safe to remove those two options from xenstore because qemu does not use xenstore to read commans line options.
Finally this patch fixes blkfront disconnections from backends and display and xauthority variables for pv guests.

I realize that it is late to make these changes for 3.4 but I think they contain important fixes and have the nice side effect of allowing pv drivers to work properly on stubdom based guests.
Besides they do not affect the normal qemu case.
If anyone that uses stubdoms is against these changes for 3.4, now is the time to speak up.

update: removed any change that affect non-stubdom cases, to be sent separately afterwards.

---

extras/mini-os/blkfront.c +0 -4
diff -r df61fe72ac66 extras/mini-os/blkfront.c
@@ -244,10 +244,6 @@
     xenbus_wait_for_value(path, "5", &dev->events);
 
     err = xenbus_printf(XBT_NIL, nodename, "state", "%u", 6);
-    xenbus_wait_for_value(path, "6", &dev->events);
-
-    err = xenbus_printf(XBT_NIL, nodename, "state", "%u", 1);
-    xenbus_wait_for_value(path, "2", &dev->events);
 
     xenbus_unwatch_path(XBT_NIL, path);
 
stubdom/stubdom-dm +71 -9

114 lines not on this page · raw message

tools/python/xen/xend/image.py +6 -1
diff -r df61fe72ac66 tools/python/xen/xend/image.py
@@ -729,7 +729,12 @@
 
         if not self.display :
             self.display = ''
-        self.vm.storeVm(("image/dmargs", " ".join(self.dmargs)),
+        # Do not store sdl, opengl and serial related qemu cli options
+        self.vm.storeVm(("image/dmargs", " ".join([ x for x in self.dmargs
+                        if x != "-sdl"
+                        and x != "-disable-opengl"
+                        and x != "-serial"
+                        and x != "pty" ])),
                         ("image/device-model", self.device_model),
                         ("image/display", self.display))
         self.vm.permissionsVm("image/dmargs", { 'dom': self.vm.getDomid(), 'read': True } )
Acked-by on v1 1/1
#1 lore raw

Stefano Stabellini writes ("[Xen-devel] [PATCH] [UPDATE] stubdoms: generate stubdom config file"):

Quoted 2 lines

update: removed any change that affect non-stubdom cases, to be sent separately afterwards.

I have reviewed this by eye and it should indeed only affect stubdom. In the stubdom case I think it's an improvement and the stability of stubdom is going to be not so ideal in 3.4 anyway. So I think this is fine for 3.4.

Quoted 1 line

Ian.