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
     1.1 --- a/tools/examples/xmexample.vmx	Tue Aug 16 01:01:19 2005 +0000
     1.2 +++ b/tools/examples/xmexample.vmx	Tue Aug 16 01:04:32 2005 +0000
     1.3 @@ -34,7 +34,7 @@ name = "ExampleVMXDomain"
     1.4  # and MODE is r for read-only, w for read-write.
     1.5  
     1.6  #disk = [ 'phy:hda1,hda1,r' ]
     1.7 -disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ]
     1.8 +disk = [ 'file:/var/images/min-el3-i386.img,ioemu:hda,w' ]
     1.9  
    1.10  #----------------------------------------------------------------------------
    1.11  # Set according to whether you want the domain restarted when it exits.
     2.1 --- a/tools/ioemu/hw/ide.c	Tue Aug 16 01:01:19 2005 +0000
     2.2 +++ b/tools/ioemu/hw/ide.c	Tue Aug 16 01:04:32 2005 +0000
     2.3 @@ -430,6 +430,7 @@ static void ide_identify(IDEState *s)
     2.4          put_le16(p + 59, 0x100 | s->mult_sectors);
     2.5      put_le16(p + 60, s->nb_sectors);
     2.6      put_le16(p + 61, s->nb_sectors >> 16);
     2.7 +    put_le16(p + 63, 0x07);
     2.8      put_le16(p + 80, (1 << 1) | (1 << 2));
     2.9      put_le16(p + 82, (1 << 14));
    2.10      put_le16(p + 83, (1 << 14));
    2.11 @@ -460,7 +461,7 @@ static void ide_atapi_identify(IDEState 
    2.12      put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */
    2.13      put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */
    2.14      put_le16(p + 53, 3); /* words 64-70, 54-58 valid */
    2.15 -    put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */
    2.16 +    put_le16(p + 63, 0x07); /* Multi-word DMA mode 2 */ 
    2.17      put_le16(p + 64, 1); /* PIO modes */
    2.18      put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */
    2.19      put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */
     3.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue Aug 16 01:01:19 2005 +0000
     3.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Aug 16 01:04:32 2005 +0000
     3.3 @@ -743,8 +743,7 @@ class XendDomainInfo:
     3.4              for ctrl in self.getDeviceControllers():
     3.5                  ctrl.initController(reboot=True)
     3.6          else:
     3.7 -	    if self.image.ostype != 'vmx':
     3.8 -                self.create_configured_devices()
     3.9 +            self.create_configured_devices()
    3.10          if not self.device_model_pid:
    3.11              self.device_model_pid = self.image.createDeviceModel()
    3.12  
    3.13 @@ -916,8 +915,7 @@ class XendDomainInfo:
    3.14          """
    3.15          self.configure_fields()
    3.16          self.create_devices()
    3.17 -	if self.image.ostype != 'vmx':
    3.18 -            self.create_blkif()
    3.19 +        self.create_blkif()
    3.20  
    3.21      def create_blkif(self):
    3.22          """Create the block device interface (blkif) for the vm.
     4.1 --- a/tools/python/xen/xend/image.py	Tue Aug 16 01:01:19 2005 +0000
     4.2 +++ b/tools/python/xen/xend/image.py	Tue Aug 16 01:04:32 2005 +0000
     4.3 @@ -16,6 +16,7 @@
     4.4  #============================================================================
     4.5  
     4.6  import os, string
     4.7 +import re
     4.8  
     4.9  import xen.lowlevel.xc; xc = xen.lowlevel.xc.new()
    4.10  from xen.xend import sxp
    4.11 @@ -329,8 +330,15 @@ class VmxImageHandler(ImageHandler):
    4.12              if name == 'vbd':
    4.13                 vbdinfo = sxp.child(device, 'vbd')
    4.14                 uname = sxp.child_value(vbdinfo, 'uname')
    4.15 -               vbddev = sxp.child_value(vbdinfo, 'dev')
    4.16 +               typedev = sxp.child_value(vbdinfo, 'dev')
    4.17                 (vbdtype, vbdparam) = string.split(uname, ':', 1)
    4.18 +               if re.match('^ioemu:', typedev):
    4.19 +                  (emtype, vbddev) = string.split(typedev, ':', 1)
    4.20 +               else:
    4.21 +                  emtype = 'vbd'
    4.22 +                  vbddev = typedev
    4.23 +               if emtype != 'ioemu':
    4.24 +                  continue;
    4.25                 vbddev_list = ['hda', 'hdb', 'hdc', 'hdd']
    4.26                 if vbddev not in vbddev_list:
    4.27                    raise VmError("vmx: for qemu vbd type=file&dev=hda~hdd")
     5.1 --- a/tools/python/xen/xend/server/blkif.py	Tue Aug 16 01:01:19 2005 +0000
     5.2 +++ b/tools/python/xen/xend/server/blkif.py	Tue Aug 16 01:04:32 2005 +0000
     5.3 @@ -18,6 +18,7 @@
     5.4  """Support for virtual block devices.
     5.5  """
     5.6  import string
     5.7 +import re
     5.8  
     5.9  from xen.util import blkif
    5.10  from xen.xend.XendError import XendError, VmError
    5.11 @@ -199,6 +200,7 @@ class BlkDev(Dev):
    5.12          self.vdev = None
    5.13          self.mode = None
    5.14          self.type = None
    5.15 +        self.emtype = None
    5.16          self.params = None
    5.17          self.node = None
    5.18          self.device = None
    5.19 @@ -237,7 +239,12 @@ class BlkDev(Dev):
    5.20          # Split into type and type-specific params (which are passed to the
    5.21          # type-specific control script).
    5.22          (self.type, self.params) = string.split(self.uname, ':', 1)
    5.23 -        self.dev = sxp.child_value(config, 'dev')
    5.24 +        typedev = sxp.child_value(config, 'dev')
    5.25 +        if re.match( '^ioemu:', typedev):
    5.26 +            (self.emtype, self.dev) = string.split(typedev, ':', 1)
    5.27 +        else:
    5.28 +            self.emtype = 'vbd'
    5.29 +            self.dev = typedev
    5.30          if not self.dev:
    5.31              raise VmError('vbd: Missing dev')
    5.32          self.mode = sxp.child_value(config, 'mode', 'r')
    5.33 @@ -258,6 +265,8 @@ class BlkDev(Dev):
    5.34          if recreate:
    5.35              pass
    5.36          else:
    5.37 +            if self.emtype == 'ioemu':
    5.38 +                return
    5.39              node = Blkctl.block('bind', self.type, self.params)
    5.40              self.setNode(node)
    5.41              self.attachBackend()
     6.1 --- a/tools/python/xen/xm/create.py	Tue Aug 16 01:01:19 2005 +0000
     6.2 +++ b/tools/python/xen/xm/create.py	Tue Aug 16 01:04:32 2005 +0000
     6.3 @@ -592,9 +592,14 @@ def choose_vnc_display():
     6.4          return d
     6.5      return None
     6.6  
     6.7 +vncpid = None
     6.8 +
     6.9  def spawn_vnc(display):
    6.10 -    os.system("vncviewer -log *:stdout:0 -listen %d &" %
    6.11 -              (VNC_BASE_PORT + display))
    6.12 +    vncargs = (["vncviewer" + "-log", "*:stdout:0",
    6.13 +            "-listen", "%d" % (VNC_BASE_PORT + display) ])
    6.14 +    global vncpid    
    6.15 +    vncpid = os.spawnvp(os.P_NOWAIT, "vncviewer", vncargs)
    6.16 +
    6.17      return VNC_BASE_PORT + display
    6.18      
    6.19  def preprocess_vnc(opts, vals):
    6.20 @@ -639,6 +644,9 @@ def make_domain(opts, config):
    6.21          else:
    6.22              dominfo = server.xend_domain_create(config)
    6.23      except XendError, ex:
    6.24 +        import signal
    6.25 +        if vncpid:
    6.26 +            os.kill(vncpid, signal.SIGKILL)
    6.27          opts.err(str(ex))
    6.28  
    6.29      dom = sxp.child_value(dominfo, 'name')