ia64/xen-unstable

changeset 589:5ed7375f954a

bitkeeper revision 1.326.1.1 (3f0d3006ZIpQaVRSSN8pEanJ8WPbCg)

We don't need or, really, want, to export the domain-side block device
number for virtual disks, so don't bother. Instead, we
export the mode of the segment, which actually makes much more
sense anyway.
author sos22@labyrinth.cl.cam.ac.uk
date Thu Jul 10 09:21:10 2003 +0000 (2003-07-10)
parents 125f43340354
children 3e071d151e22
files BitKeeper/etc/ignore xen/drivers/block/xen_segment.c xen/include/hypervisor-ifs/segment.h xen/include/xeno/segment.h xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_segment_proc.c
line diff
     1.1 --- a/BitKeeper/etc/ignore	Thu Jul 10 08:57:37 2003 +0000
     1.2 +++ b/BitKeeper/etc/ignore	Thu Jul 10 09:21:10 2003 +0000
     1.3 @@ -439,3 +439,21 @@ xenolinux-2.4.21-sparse/arch/xeno/driver
     1.4  xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c.bak
     1.5  xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c~
     1.6  xenolinux-2.4.21-sparse/include/linux/blk.h~
     1.7 +xen/drivers/net/8139too.o
     1.8 +xen/drivers/net/e100/e100.o
     1.9 +xen/drivers/net/e100/e100_config.o
    1.10 +xen/drivers/net/e100/e100_eeprom.o
    1.11 +xen/drivers/net/e100/e100_main.o
    1.12 +xen/drivers/net/e100/e100_phy.o
    1.13 +xen/drivers/net/e100/e100_test.o
    1.14 +xen/drivers/net/pcnet32.o
    1.15 +xen/drivers/net/tulip/21142.o
    1.16 +xen/drivers/net/tulip/eeprom.o
    1.17 +xen/drivers/net/tulip/interrupt.o
    1.18 +xen/drivers/net/tulip/media.o
    1.19 +xen/drivers/net/tulip/pnic.o
    1.20 +xen/drivers/net/tulip/pnic2.o
    1.21 +xen/drivers/net/tulip/timer.o
    1.22 +xen/drivers/net/tulip/tulip.o
    1.23 +xen/drivers/net/tulip/tulip_core.o
    1.24 +xen/drivers/net/via-rhine.o
     2.1 --- a/xen/drivers/block/xen_segment.c	Thu Jul 10 08:57:37 2003 +0000
     2.2 +++ b/xen/drivers/block/xen_segment.c	Thu Jul 10 09:21:10 2003 +0000
     2.3 @@ -194,16 +194,12 @@ void xen_segment_probe_all(xen_segment_i
     2.4  	if ( xsegments[loop].mode == XEN_SEGMENT_UNUSED )
     2.5  	    continue;
     2.6  
     2.7 -        device = MK_VIRTUAL_XENDEV(xsegments[loop].segment_number);
     2.8 -
     2.9 -	printk("Doing seg %d.\n", xsi->count);
    2.10 -	xsi->segments[xsi->count].device = device;
    2.11 +	xsi->segments[xsi->count].mode = xsegments[loop].mode;
    2.12  	xsi->segments[xsi->count].domain = xsegments[loop].domain;
    2.13  	memcpy(xsi->segments[xsi->count].key,
    2.14  	       xsegments[loop].key,
    2.15  	       XEN_SEGMENT_KEYSIZE);
    2.16  	xsi->segments[xsi->count].seg_nr = xsegments[loop].segment_number;
    2.17 -	printk("Done.\n");
    2.18          xsi->count++;	
    2.19      }
    2.20  
     3.1 --- a/xen/include/hypervisor-ifs/segment.h	Thu Jul 10 08:57:37 2003 +0000
     3.2 +++ b/xen/include/hypervisor-ifs/segment.h	Thu Jul 10 09:21:10 2003 +0000
     3.3 @@ -3,15 +3,19 @@
     3.4  
     3.5  #define XEN_MAX_SEGMENTS 100     /* total number of segments across all doms */
     3.6  
     3.7 +#define XEN_SEGMENT_UNUSED 0          /* bzero default */
     3.8 +#define XEN_SEGMENT_RO XEN_DISK_READ_ONLY
     3.9 +#define XEN_SEGMENT_RW XEN_DISK_READ_WRITE
    3.10 +
    3.11  typedef struct xen_segment_info
    3.12  {
    3.13 -  int count;
    3.14 -  struct {
    3.15 -    unsigned domain;
    3.16 -    unsigned seg_nr;
    3.17 -    char key[XEN_SEGMENT_KEYSIZE];
    3.18 -    unsigned short device;
    3.19 -  } segments[XEN_MAX_SEGMENTS];
    3.20 +    int count;
    3.21 +    struct {
    3.22 +        unsigned domain;
    3.23 +        unsigned seg_nr;
    3.24 +        char key[XEN_SEGMENT_KEYSIZE];
    3.25 +        unsigned short mode;             /* UNUSED, RO, or RW. */
    3.26 +    } segments[XEN_MAX_SEGMENTS];
    3.27  } xen_segment_info_t;
    3.28  
    3.29  #endif /* __HYP_IFS_SEGMENT_H__ */
     4.1 --- a/xen/include/xeno/segment.h	Thu Jul 10 08:57:37 2003 +0000
     4.2 +++ b/xen/include/xeno/segment.h	Thu Jul 10 09:21:10 2003 +0000
     4.3 @@ -35,10 +35,6 @@ typedef struct extent
     4.4      unsigned long size;               /* size of this extent */
     4.5  } extent_t;
     4.6  
     4.7 -#define XEN_SEGMENT_UNUSED 0          /* bzero default */
     4.8 -#define XEN_SEGMENT_RO XEN_DISK_READ_ONLY
     4.9 -#define XEN_SEGMENT_RW XEN_DISK_READ_WRITE
    4.10 -
    4.11  typedef struct segment
    4.12  {
    4.13      int mode;                         /* UNUSED, RO, or RW */
     5.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_segment_proc.c	Thu Jul 10 08:57:37 2003 +0000
     5.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_segment_proc.c	Thu Jul 10 09:21:10 2003 +0000
     5.3 @@ -51,7 +51,7 @@ static int proc_vhd_show(struct seq_file
     5.4  		data->segments[data->count - 1].domain,
     5.5  		data->segments[data->count - 1].seg_nr,
     5.6  		data->segments[data->count - 1].key,
     5.7 -		physdev_to_xldev(data->segments[data->count - 1].device));
     5.8 +		data->segments[data->count - 1].mode);
     5.9  
    5.10      return 0;
    5.11  }