ia64/xen-unstable

changeset 6203:60d20acf8928

merge
author iap10@firebug.cl.cam.ac.uk
date Tue Aug 16 01:04:32 2005 +0000 (2005-08-16)
parents 8523b124c8f8 b310a1b71b54
children 2c2015c11b49
files linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_64 tools/debugger/pdb/Domain.ml tools/debugger/pdb/Domain.mli tools/debugger/pdb/Makefile tools/debugger/pdb/PDB.ml tools/debugger/pdb/Process.ml tools/debugger/pdb/Process.mli tools/debugger/pdb/debugger.ml tools/debugger/pdb/linux-2.6-module/debug.c tools/debugger/pdb/linux-2.6-module/module.c tools/debugger/pdb/linux-2.6-module/pdb_debug.h tools/debugger/pdb/linux-2.6-module/pdb_module.h tools/debugger/pdb/linux-2.6-patches/i386_ksyms.patch tools/debugger/pdb/pdb_caml_domain.c tools/debugger/pdb/pdb_caml_process.c tools/debugger/pdb/readme tools/examples/network-bridge tools/examples/xmexample.vmx tools/ioemu/hw/ide.c tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/image.py tools/python/xen/xend/server/blkif.py tools/python/xen/xm/create.py
line diff
    20.1 --- a/tools/examples/xmexample.vmx	Tue Aug 16 01:01:19 2005 +0000
    20.2 +++ b/tools/examples/xmexample.vmx	Tue Aug 16 01:04:32 2005 +0000
    20.3 @@ -34,7 +34,7 @@ name = "ExampleVMXDomain"
    20.4  # and MODE is r for read-only, w for read-write.
    20.5  
    20.6  #disk = [ 'phy:hda1,hda1,r' ]
    20.7 -disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ]
    20.8 +disk = [ 'file:/var/images/min-el3-i386.img,ioemu:hda,w' ]
    20.9  
   20.10  #----------------------------------------------------------------------------
   20.11  # Set according to whether you want the domain restarted when it exits.
    21.1 --- a/tools/ioemu/hw/ide.c	Tue Aug 16 01:01:19 2005 +0000
    21.2 +++ b/tools/ioemu/hw/ide.c	Tue Aug 16 01:04:32 2005 +0000
    21.3 @@ -430,6 +430,7 @@ static void ide_identify(IDEState *s)
    21.4          put_le16(p + 59, 0x100 | s->mult_sectors);
    21.5      put_le16(p + 60, s->nb_sectors);
    21.6      put_le16(p + 61, s->nb_sectors >> 16);
    21.7 +    put_le16(p + 63, 0x07);
    21.8      put_le16(p + 80, (1 << 1) | (1 << 2));
    21.9      put_le16(p + 82, (1 << 14));
   21.10      put_le16(p + 83, (1 << 14));
   21.11 @@ -460,7 +461,7 @@ static void ide_atapi_identify(IDEState 
   21.12      put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */
   21.13      put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */
   21.14      put_le16(p + 53, 3); /* words 64-70, 54-58 valid */
   21.15 -    put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */
   21.16 +    put_le16(p + 63, 0x07); /* Multi-word DMA mode 2 */ 
   21.17      put_le16(p + 64, 1); /* PIO modes */
   21.18      put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */
   21.19      put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */
    22.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue Aug 16 01:01:19 2005 +0000
    22.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Aug 16 01:04:32 2005 +0000
    22.3 @@ -743,8 +743,7 @@ class XendDomainInfo:
    22.4              for ctrl in self.getDeviceControllers():
    22.5                  ctrl.initController(reboot=True)
    22.6          else:
    22.7 -	    if self.image.ostype != 'vmx':
    22.8 -                self.create_configured_devices()
    22.9 +            self.create_configured_devices()
   22.10          if not self.device_model_pid:
   22.11              self.device_model_pid = self.image.createDeviceModel()
   22.12  
   22.13 @@ -916,8 +915,7 @@ class XendDomainInfo:
   22.14          """
   22.15          self.configure_fields()
   22.16          self.create_devices()
   22.17 -	if self.image.ostype != 'vmx':
   22.18 -            self.create_blkif()
   22.19 +        self.create_blkif()
   22.20  
   22.21      def create_blkif(self):
   22.22          """Create the block device interface (blkif) for the vm.
    23.1 --- a/tools/python/xen/xend/image.py	Tue Aug 16 01:01:19 2005 +0000
    23.2 +++ b/tools/python/xen/xend/image.py	Tue Aug 16 01:04:32 2005 +0000
    23.3 @@ -16,6 +16,7 @@
    23.4  #============================================================================
    23.5  
    23.6  import os, string
    23.7 +import re
    23.8  
    23.9  import xen.lowlevel.xc; xc = xen.lowlevel.xc.new()
   23.10  from xen.xend import sxp
   23.11 @@ -329,8 +330,15 @@ class VmxImageHandler(ImageHandler):
   23.12              if name == 'vbd':
   23.13                 vbdinfo = sxp.child(device, 'vbd')
   23.14                 uname = sxp.child_value(vbdinfo, 'uname')
   23.15 -               vbddev = sxp.child_value(vbdinfo, 'dev')
   23.16 +               typedev = sxp.child_value(vbdinfo, 'dev')
   23.17                 (vbdtype, vbdparam) = string.split(uname, ':', 1)
   23.18 +               if re.match('^ioemu:', typedev):
   23.19 +                  (emtype, vbddev) = string.split(typedev, ':', 1)
   23.20 +               else:
   23.21 +                  emtype = 'vbd'
   23.22 +                  vbddev = typedev
   23.23 +               if emtype != 'ioemu':
   23.24 +                  continue;
   23.25                 vbddev_list = ['hda', 'hdb', 'hdc', 'hdd']
   23.26                 if vbddev not in vbddev_list:
   23.27                    raise VmError("vmx: for qemu vbd type=file&dev=hda~hdd")
    24.1 --- a/tools/python/xen/xend/server/blkif.py	Tue Aug 16 01:01:19 2005 +0000
    24.2 +++ b/tools/python/xen/xend/server/blkif.py	Tue Aug 16 01:04:32 2005 +0000
    24.3 @@ -18,6 +18,7 @@
    24.4  """Support for virtual block devices.
    24.5  """
    24.6  import string
    24.7 +import re
    24.8  
    24.9  from xen.util import blkif
   24.10  from xen.xend.XendError import XendError, VmError
   24.11 @@ -199,6 +200,7 @@ class BlkDev(Dev):
   24.12          self.vdev = None
   24.13          self.mode = None
   24.14          self.type = None
   24.15 +        self.emtype = None
   24.16          self.params = None
   24.17          self.node = None
   24.18          self.device = None
   24.19 @@ -237,7 +239,12 @@ class BlkDev(Dev):
   24.20          # Split into type and type-specific params (which are passed to the
   24.21          # type-specific control script).
   24.22          (self.type, self.params) = string.split(self.uname, ':', 1)
   24.23 -        self.dev = sxp.child_value(config, 'dev')
   24.24 +        typedev = sxp.child_value(config, 'dev')
   24.25 +        if re.match( '^ioemu:', typedev):
   24.26 +            (self.emtype, self.dev) = string.split(typedev, ':', 1)
   24.27 +        else:
   24.28 +            self.emtype = 'vbd'
   24.29 +            self.dev = typedev
   24.30          if not self.dev:
   24.31              raise VmError('vbd: Missing dev')
   24.32          self.mode = sxp.child_value(config, 'mode', 'r')
   24.33 @@ -258,6 +265,8 @@ class BlkDev(Dev):
   24.34          if recreate:
   24.35              pass
   24.36          else:
   24.37 +            if self.emtype == 'ioemu':
   24.38 +                return
   24.39              node = Blkctl.block('bind', self.type, self.params)
   24.40              self.setNode(node)
   24.41              self.attachBackend()
    25.1 --- a/tools/python/xen/xm/create.py	Tue Aug 16 01:01:19 2005 +0000
    25.2 +++ b/tools/python/xen/xm/create.py	Tue Aug 16 01:04:32 2005 +0000
    25.3 @@ -592,9 +592,14 @@ def choose_vnc_display():
    25.4          return d
    25.5      return None
    25.6  
    25.7 +vncpid = None
    25.8 +
    25.9  def spawn_vnc(display):
   25.10 -    os.system("vncviewer -log *:stdout:0 -listen %d &" %
   25.11 -              (VNC_BASE_PORT + display))
   25.12 +    vncargs = (["vncviewer" + "-log", "*:stdout:0",
   25.13 +            "-listen", "%d" % (VNC_BASE_PORT + display) ])
   25.14 +    global vncpid    
   25.15 +    vncpid = os.spawnvp(os.P_NOWAIT, "vncviewer", vncargs)
   25.16 +
   25.17      return VNC_BASE_PORT + display
   25.18      
   25.19  def preprocess_vnc(opts, vals):
   25.20 @@ -639,6 +644,9 @@ def make_domain(opts, config):
   25.21          else:
   25.22              dominfo = server.xend_domain_create(config)
   25.23      except XendError, ex:
   25.24 +        import signal
   25.25 +        if vncpid:
   25.26 +            os.kill(vncpid, signal.SIGKILL)
   25.27          opts.err(str(ex))
   25.28  
   25.29      dom = sxp.child_value(dominfo, 'name')