From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiaofeng Ling Subject: Re: exception looking up device number for hda Date: Tue, 09 Aug 2005 10:58:17 +0800 Message-ID: <42F81BC9.9030008@intel.com> References: <42F3BF2C.70403@intel.com> <200508081548.18887.mark.williamson@cl.cam.ac.uk> <42F7F39E.3020300@intel.com> <200508090249.52113.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000006020006090005050406" Return-path: In-Reply-To: <200508090249.52113.mark.williamson@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Williamson Cc: Arun Sharma , Mike Wray , xen-devel@lists.xensource.com, takebe_akio@jp.fujitsu.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------000006020006090005050406 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I've already made a patch when I doing para-driver debugging. see the attach patch. Does it fit the requirement? It will skip setupping up the loop device for ioemu image files, but by xm vbd-list, it can still see the file bind to hda. so this command is still useful. Mark Williamson wrote: >>>Hope about an optional: vbd:/emu: prefix (or similar) on the second part >>>of the triplet for a disk? The default (for non VMX domains) could be >>>"vbd" so existing behaviour would remain the same. >> >>Sounds good to me. How about: >> >>hda = VBD hda >>vbd://hda = VBD hda >>ioemu://hda = IDE hda > > > Sounds fine but I think I'd actually ditch the // to fit in with the phy: and > file: syntax we already have. (and as David said in another post, to avoid > looking like a URL). > > --------------000006020006090005050406 Content-Type: text/x-patch; name="dm-config.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dm-config.patch" diff -r 48aed1403fe3 tools/examples/xmexample.vmx --- a/tools/examples/xmexample.vmx Fri Jul 22 16:44:33 2005 +++ b/tools/examples/xmexample.vmx Tue Aug 9 10:54:01 2005 @@ -46,7 +46,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 = [ 'ioemu:/var/images/min-el3-i386.img,hda,w' ] #---------------------------------------------------------------------------- # Set the kernel command line for the new domain. diff -r 48aed1403fe3 tools/python/xen/xend/Blkctl.py --- a/tools/python/xen/xend/Blkctl.py Fri Jul 22 16:44:33 2005 +++ b/tools/python/xen/xend/Blkctl.py Tue Aug 9 10:54:01 2005 @@ -30,7 +30,7 @@ # Special case phy devices - they don't require any (un)binding # Parallax also doesn't need script-based binding. - if (type == 'phy') or (type == 'parallax'): + if (type == 'phy') or (type == 'parallax') or (type == 'ioemu'): return dets if script is None: diff -r 48aed1403fe3 tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Fri Jul 22 16:44:33 2005 +++ b/tools/python/xen/xend/image.py Tue Aug 9 10:54:01 2005 @@ -287,12 +287,14 @@ device = sxp.child(self.vm.config, 'device') vbdinfo = sxp.child(device, 'vbd') if not vbdinfo: - raise VmError("vmx: missing vbd configuration") + continue uname = sxp.child_value(vbdinfo, 'uname') vbddev = sxp.child_value(vbdinfo, 'dev') (vbdtype, vbdparam) = string.split(uname, ':', 1) vbddev_list = ['hda', 'hdb', 'hdc', 'hdd'] - if vbdtype != 'file' or vbddev not in vbddev_list: + if vbdtype != 'ioemu': + continue + if vbddev not in vbddev_list: raise VmError("vmx: for qemu vbd type=file&dev=hda~hdd") ret.append("-%s" % vbddev) ret.append("%s" % vbdparam) diff -r 48aed1403fe3 tools/python/xen/xend/server/blkif.py --- a/tools/python/xen/xend/server/blkif.py Fri Jul 22 16:44:33 2005 +++ b/tools/python/xen/xend/server/blkif.py Tue Aug 9 10:54:01 2005 @@ -243,6 +243,8 @@ pass else: node = Blkctl.block('bind', self.type, self.params) + if self.type == 'ioemu': + return self.setNode(node) self.attachBackend() if change: --------------000006020006090005050406 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------000006020006090005050406--