debuggers.hg

view xen/include/xeno/segment.h @ 620:01725801761a

bitkeeper revision 1.322 (3f0d22cccb17_me9ZBYMkbZaFLovQg)

Get the new segment probing stuff to actually return useful
information...
author sos22@labyrinth.cl.cam.ac.uk
date Thu Jul 10 08:24:44 2003 +0000 (2003-07-10)
parents f51eab080fa1
children 5ed7375f954a 3e071d151e22
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 #define XEN_SEGMENT_UNUSED 0 /* bzero default */
39 #define XEN_SEGMENT_RO XEN_DISK_READ_ONLY
40 #define XEN_SEGMENT_RW XEN_DISK_READ_WRITE
42 typedef struct segment
43 {
44 int mode; /* UNUSED, RO, or RW */
45 int domain;
46 int segment_number; /* segment number for domain */
47 char key[XEN_SEGMENT_KEYSIZE]; /* for the userspace tools in dom0 */
48 int num_extents; /* number of extents */
49 extent_t *extents;
50 } segment_t;
52 #endif