debuggers.hg

view xen/include/xeno/segment.h @ 628:3e071d151e22

bitkeeper revision 1.329 (3f0d30d74QKz0HxzOWPKez8__UdvjQ)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/rac61/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/sos22/xeno.bk
author sos22@labyrinth.cl.cam.ac.uk
date Thu Jul 10 09:24:39 2003 +0000 (2003-07-10)
parents 01725801761a 5ed7375f954a
children f33864f401d8 75e23848b238
line source
1 #ifndef __SEGMENT_H__
2 #define __SEGMENT_H__
4 #include <hypervisor-ifs/block.h>
5 #include <hypervisor-ifs/segment.h>
7 /* Describes a physical disk extent. */
8 typedef struct {
9 unsigned short dev;
10 unsigned short nr_sects;
11 unsigned long sector_number;
12 unsigned long buffer;
13 } phys_seg_t;
15 struct task_struct;
17 void xen_segment_initialize(void);
18 void xen_refresh_segment_list (struct task_struct *p);
19 int xen_segment_create(xv_disk_t *xvd);
20 int xen_segment_map_request(
21 phys_seg_t *pseg, struct task_struct *p, int operation,
22 unsigned short segment_number,
23 unsigned long sect_nr, unsigned long buffer, unsigned short nr_sects);
25 /*
26 * virtual hard disks
27 *
28 * each segment is composed of a number of extents
29 */
31 typedef struct extent
32 {
33 int disk; /* A XEN_IDE_DEV or a XEN_SCSI_DEV */
34 unsigned long offset; /* offset into disk */
35 unsigned long size; /* size of this extent */
36 } extent_t;
38 typedef struct segment
39 {
40 int mode; /* UNUSED, RO, or RW */
41 int domain;
42 int segment_number; /* segment number for domain */
43 char key[XEN_SEGMENT_KEYSIZE]; /* for the userspace tools in dom0 */
44 int num_extents; /* number of extents */
45 extent_t *extents;
46 } segment_t;
48 #endif