ia64/xen-unstable

changeset 3131:47c04a4e4ef4

bitkeeper revision 1.1159.192.3 (41a5f022GBi9_4NENr9ydoPoqjQhRA)

Merge maf46@ssh-relay1.cl.cam.ac.uk:/usr/groups/netos/xeno/BK/xen-2.0-testing.bk
into fleming.research:/scratch/fleming/mafetter/foo
author mafetter@fleming.research
date Thu Nov 25 14:45:54 2004 +0000 (2004-11-25)
parents 733fc4c2fdcd 7827d8db3729
children f92f84310af3
files linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S	Thu Nov 25 12:25:16 2004 +0000
     1.2 +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S	Thu Nov 25 14:45:54 2004 +0000
     1.3 @@ -102,10 +102,9 @@ VM_MASK		= 0x00020000
     1.4  	pushl %edx; \
     1.5  	pushl %ecx; \
     1.6  	pushl %ebx; \
     1.7 -	movl $(__KERNEL_DS), %edx; \
     1.8 +	movl $(__USER_DS), %edx; \
     1.9  	movl %edx, %ds; \
    1.10  	movl %edx, %es;
    1.11 -	# XXXcl USER?
    1.12  
    1.13  #define RESTORE_INT_REGS \
    1.14  	popl %ebx;	\
     2.1 --- a/linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h	Thu Nov 25 12:25:16 2004 +0000
     2.2 +++ b/linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h	Thu Nov 25 14:45:54 2004 +0000
     2.3 @@ -64,6 +64,7 @@
     2.4  
     2.5  struct xlbd_type_info {
     2.6  	int partn_shift;
     2.7 +	int partn_per_major;
     2.8  	int devs_per_major;
     2.9  	int hardsect_size;
    2.10  	int max_sectors;
    2.11 @@ -77,8 +78,8 @@ struct xlbd_type_info {
    2.12   */
    2.13  struct xlbd_major_info {
    2.14  	int major;
    2.15 +	int index;
    2.16  	int usage;
    2.17 -	int xd_device;
    2.18  	struct xlbd_type_info *type;
    2.19  };
    2.20  
     3.1 --- a/linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c	Thu Nov 25 12:25:16 2004 +0000
     3.2 +++ b/linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c	Thu Nov 25 14:45:54 2004 +0000
     3.3 @@ -44,6 +44,7 @@
     3.4  
     3.5  static struct xlbd_type_info xlbd_ide_type = {
     3.6  	.partn_shift = 6,
     3.7 +	.partn_per_major = 2,
     3.8  	// XXXcl todo blksize_size[major]  = 1024;
     3.9  	.hardsect_size = 512,
    3.10  	.max_sectors = 128,  /* 'hwif->rqsize' if we knew it */
    3.11 @@ -53,6 +54,7 @@ static struct xlbd_type_info xlbd_ide_ty
    3.12  
    3.13  static struct xlbd_type_info xlbd_scsi_type = {
    3.14  	.partn_shift = 4,
    3.15 +	.partn_per_major = 16,
    3.16  	// XXXcl todo blksize_size[major]  = 1024; /* XXX 512; */
    3.17  	.hardsect_size = 512,
    3.18  	.max_sectors = 128*8, /* XXX 128; */
    3.19 @@ -62,6 +64,7 @@ static struct xlbd_type_info xlbd_scsi_t
    3.20  
    3.21  static struct xlbd_type_info xlbd_vbd_type = {
    3.22  	.partn_shift = 4,
    3.23 +	.partn_per_major = 16,
    3.24  	// XXXcl todo blksize_size[major]  = 512;
    3.25  	.hardsect_size = 512,
    3.26  	.max_sectors = 128,
    3.27 @@ -167,13 +170,17 @@ static struct xlbd_major_info *xlbd_get_
    3.28  	switch (mi_idx) {
    3.29  	case 0 ... (NUM_IDE_MAJORS - 1):
    3.30  		major_info[mi_idx]->type = &xlbd_ide_type;
    3.31 +		major_info[mi_idx]->index = mi_idx;
    3.32  		break;
    3.33  	case NUM_IDE_MAJORS ... (NUM_IDE_MAJORS + NUM_SCSI_MAJORS - 1):
    3.34  		major_info[mi_idx]->type = &xlbd_scsi_type;
    3.35 +		major_info[mi_idx]->index = mi_idx - NUM_IDE_MAJORS;
    3.36  		break;
    3.37  	case (NUM_IDE_MAJORS + NUM_SCSI_MAJORS) ...
    3.38  		(NUM_IDE_MAJORS + NUM_SCSI_MAJORS + NUM_VBD_MAJORS - 1):
    3.39  		major_info[mi_idx]->type = &xlbd_vbd_type;
    3.40 +		major_info[mi_idx]->index = mi_idx -
    3.41 +			(NUM_IDE_MAJORS + NUM_SCSI_MAJORS);
    3.42  		break;
    3.43  	}
    3.44  	major_info[mi_idx]->major = new_major;
    3.45 @@ -222,7 +229,8 @@ static struct gendisk *xlvbd_get_gendisk
    3.46  	gd->fops = &xlvbd_block_fops;
    3.47  	gd->private_data = di;
    3.48  	sprintf(gd->disk_name, "%s%c%d", mi->type->name,
    3.49 -	    'a' + (xd_minor >> mi->type->partn_shift),
    3.50 +	    'a' + mi->index * mi->type->partn_per_major +
    3.51 +		(xd_minor >> mi->type->partn_shift),
    3.52  	    xd_minor & ((1 << mi->type->partn_shift) - 1));
    3.53  	/*  sprintf(gd->devfs_name, "%s%s/disc%d", mi->type->name, , ); XXXdevfs */
    3.54  
     4.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Nov 25 12:25:16 2004 +0000
     4.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Nov 25 14:45:54 2004 +0000
     4.3 @@ -994,13 +994,13 @@ class XendDomainInfo:
     4.4  
     4.5          @return: deferred
     4.6          """
     4.7 -        if (self.get_devices("vbd") == None):
     4.8 +        if self.get_devices("vbd") == []:
     4.9              ctrl = xend.blkif_create(self.dom, recreate=self.recreate)
    4.10              back = ctrl.getBackendInterface(0)
    4.11              return back.connect(recreate=self.recreate)
    4.12          else:
    4.13              return None
    4.14 -    
    4.15 +
    4.16      def dom_construct(self, dom, config):
    4.17          """Construct a vm for an existing domain.
    4.18