direct-io.hg
changeset 893:211811259dff
bitkeeper revision 1.559.1.2 (3fa8e59fjgu1Rm3Cu-9n7CbSrKjgAg)
manual merge
manual merge
author | smh22@labyrinth.cl.cam.ac.uk |
---|---|
date | Wed Nov 05 11:57:19 2003 +0000 (2003-11-05) |
parents | 10d149839712 |
children | 92d4612dd1bc |
files | xen/drivers/block/xen_block.c xen/include/hypervisor-ifs/vbd.h |
line diff
1.1 --- a/xen/drivers/block/xen_block.c Wed Nov 05 11:51:24 2003 +0000 1.2 +++ b/xen/drivers/block/xen_block.c Wed Nov 05 11:57:19 2003 +0000 1.3 @@ -235,6 +235,11 @@ long do_block_io_op(block_io_op_t *u_blo 1.4 } 1.5 break; 1.6 1.7 + case BLOCK_IO_OP_RING_ADDRESS: 1.8 + op.u.ring_mfn = virt_to_phys(p->blk_ring_base) >> PAGE_SHIFT; 1.9 + ret = copy_to_user(u_block_io_op, &op, sizeof(op)) ? -EFAULT : 0; 1.10 + break; 1.11 + 1.12 case BLOCK_IO_OP_VBD_CREATE: 1.13 /* create a new VBD for a given domain; caller must be privileged */ 1.14 if(!IS_PRIV(p))
2.1 --- a/xen/include/hypervisor-ifs/vbd.h Wed Nov 05 11:51:24 2003 +0000 2.2 +++ b/xen/include/hypervisor-ifs/vbd.h Wed Nov 05 11:57:19 2003 +0000 2.3 @@ -36,12 +36,13 @@ typedef struct { 2.4 /* Block I/O trap operations and associated structures. 2.5 */ 2.6 2.7 -#define BLOCK_IO_OP_SIGNAL 0 /* let xen know we have work to do */ 2.8 -#define BLOCK_IO_OP_RESET 1 /* reset ring indexes on quiescent i/f */ 2.9 -#define BLOCK_IO_OP_VBD_CREATE 2 /* create a new VBD for a given domain */ 2.10 -#define BLOCK_IO_OP_VBD_ADD 3 /* add an extent to a given VBD */ 2.11 -#define BLOCK_IO_OP_VBD_REMOVE 4 /* remove an extent from a given VBD */ 2.12 -#define BLOCK_IO_OP_VBD_DELETE 5 /* delete a VBD */ 2.13 +#define BLOCK_IO_OP_SIGNAL 0 /* let xen know we have work to do */ 2.14 +#define BLOCK_IO_OP_RESET 1 /* reset ring indexes on quiescent i/f */ 2.15 +#define BLOCK_IO_OP_RING_ADDRESS 2 /* returns machine address of I/O ring */ 2.16 +#define BLOCK_IO_OP_VBD_CREATE 3 /* create a new VBD for a given domain */ 2.17 +#define BLOCK_IO_OP_VBD_ADD 4 /* add an extent to a given VBD */ 2.18 +#define BLOCK_IO_OP_VBD_REMOVE 5 /* remove an extent from a given VBD */ 2.19 +#define BLOCK_IO_OP_VBD_DELETE 6 /* delete a VBD */ 2.20 2.21 2.22 typedef struct _xen_extent { 2.23 @@ -84,11 +85,12 @@ typedef struct block_io_op_st 2.24 union 2.25 { 2.26 /* no entry for BLOCK_IO_OP_SIGNAL */ 2.27 + /* no entry for BLOCK_IO_OP_RESET */ 2.28 + unsigned long ring_mfn; 2.29 vbd_create_t create_info; 2.30 vbd_add_t add_info; 2.31 vbd_remove_t remove_info; 2.32 vbd_delete_t delete_info; 2.33 - /* no entry for BLOCK_IO_OP_RESET */ 2.34 } 2.35 u; 2.36 } block_io_op_t;