From: Arun Sharma <arun.sharma@intel.com>
To: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>,
Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH][VT] Distinguish ioemu handled devices and para virtualized devices
Date: Mon, 15 Aug 2005 14:43:13 -0700 [thread overview]
Message-ID: <20050815214313.GA17333@intel.com> (raw)
Distinguish ioemu handled devices and para virtualized devices
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
--- a/tools/examples/xmexample.vmx Thu Aug 11 20:38:44 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 c589ca6d292b -r 9413e453e83b tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Thu Aug 11 20:38:44 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py Fri Aug 12 17:25:49 2005
@@ -743,8 +743,7 @@
for ctrl in self.getDeviceControllers():
ctrl.initController(reboot=True)
else:
- if self.image.ostype != 'vmx':
- self.create_configured_devices()
+ self.create_configured_devices()
if not self.device_model_pid:
self.device_model_pid = self.image.createDeviceModel()
@@ -916,8 +915,7 @@
"""
self.configure_fields()
self.create_devices()
- if self.image.ostype != 'vmx':
- self.create_blkif()
+ self.create_blkif()
def create_blkif(self):
"""Create the block device interface (blkif) for the vm.
diff -r c589ca6d292b -r 9413e453e83b tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Thu Aug 11 20:38:44 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 c589ca6d292b -r 9413e453e83b tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py Thu Aug 11 20:38:44 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()
reply other threads:[~2005-08-15 21:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050815214313.GA17333@intel.com \
--to=arun.sharma@intel.com \
--cc=Ian.Pratt@cl.cam.ac.uk \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.