[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Distinguish ioemu handled devices and para virtualized devices



# HG changeset patch
# User adsharma@xxxxxxxxxxxxxxxxxxxx
# Node ID 9413e453e83b0cd6b3a7593ee4c29ec5d645dfad
# Parent  2ea4790cbeaa917efa94dea14a8f464efe66798e
Distinguish ioemu handled devices and para virtualized devices

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

diff -r 2ea4790cbeaa -r 9413e453e83b tools/examples/xmexample.vmx
--- a/tools/examples/xmexample.vmx      Fri Aug 12 17:24:05 2005
+++ b/tools/examples/xmexample.vmx      Fri Aug 12 17:25:49 2005
@@ -34,7 +34,7 @@
 # and MODE is r for read-only, w for read-write.
 
 #disk = [ 'phy:hda1,hda1,r' ]
-disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ]
+disk = [ 'file:/var/images/min-el3-i386.img,ioemu:hda,w' ]
 
 #----------------------------------------------------------------------------
 # Set according to whether you want the domain restarted when it exits.
diff -r 2ea4790cbeaa -r 9413e453e83b tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Fri Aug 12 17:24:05 2005
+++ b/tools/python/xen/xend/image.py    Fri Aug 12 17:25:49 2005
@@ -16,6 +16,7 @@
 #============================================================================
 
 import os, string
+import re
 
 import xen.lowlevel.xc; xc = xen.lowlevel.xc.new()
 from xen.xend import sxp
@@ -329,8 +330,15 @@
             if name == 'vbd':
                vbdinfo = sxp.child(device, 'vbd')
                uname = sxp.child_value(vbdinfo, 'uname')
-               vbddev = sxp.child_value(vbdinfo, 'dev')
+               typedev = sxp.child_value(vbdinfo, 'dev')
                (vbdtype, vbdparam) = string.split(uname, ':', 1)
+               if re.match('^ioemu:', typedev):
+                  (emtype, vbddev) = string.split(typedev, ':', 1)
+               else:
+                  emtype = 'vbd'
+                  vbddev = typedev
+               if emtype != 'ioemu':
+                  continue;
                vbddev_list = ['hda', 'hdb', 'hdc', 'hdd']
                if vbddev not in vbddev_list:
                   raise VmError("vmx: for qemu vbd type=file&dev=hda~hdd")
diff -r 2ea4790cbeaa -r 9413e453e83b tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Fri Aug 12 17:24:05 2005
+++ b/tools/python/xen/xend/server/blkif.py     Fri Aug 12 17:25:49 2005
@@ -18,6 +18,7 @@
 """Support for virtual block devices.
 """
 import string
+import re
 
 from xen.util import blkif
 from xen.xend.XendError import XendError, VmError
@@ -199,6 +200,7 @@
         self.vdev = None
         self.mode = None
         self.type = None
+        self.emtype = None
         self.params = None
         self.node = None
         self.device = None
@@ -237,7 +239,12 @@
         # Split into type and type-specific params (which are passed to the
         # type-specific control script).
         (self.type, self.params) = string.split(self.uname, ':', 1)
-        self.dev = sxp.child_value(config, 'dev')
+        typedev = sxp.child_value(config, 'dev')
+        if re.match( '^ioemu:', typedev):
+            (self.emtype, self.dev) = string.split(typedev, ':', 1)
+        else:
+            self.emtype = 'vbd'
+            self.dev = typedev
         if not self.dev:
             raise VmError('vbd: Missing dev')
         self.mode = sxp.child_value(config, 'mode', 'r')
@@ -258,6 +265,8 @@
         if recreate:
             pass
         else:
+            if self.emtype == 'ioemu':
+                return
             node = Blkctl.block('bind', self.type, self.params)
             self.setNode(node)
             self.attachBackend()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.