Skip to contentSkip to conversation

stubdoms: generate stubdom config file

PATCH New Stefano Stabellini 1 participant 1 message 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.

---

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 -3
diff -r df61fe72ac66 tools/python/xen/xend/image.py
@@ -291,8 +291,6 @@
                 if int(dev_info.get('sdl', 0)) != 0 :
                     has_sdl = True
                 if has_sdl:
-                    self.display = dev_info.get('display', {})
-                    self.xauthority = dev_info.get('xauthority', {})
                     opengl = int(dev_info.get('opengl', opengl))
                 if has_vnc:
                     vnc_config = dev_info.get('other_config', {})
@@ -729,7 +727,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 } )