ia64/xen-unstable

view xen/include/public/io/ioreq.h @ 5755:be1153585cb0

Fix hgignore regexps some more.
author kaf24@firebug.cl.cam.ac.uk
date Tue Jul 12 16:19:59 2005 +0000 (2005-07-12)
parents 4669354bba9a
children 20140d3fbf83 f27205ea60ef b2f4823b6ff0
line source
1 /*
2 * ioreq.h: I/O request definitions for device models
3 * Copyright (c) 2004, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
17 *
18 */
20 #ifndef _IOREQ_H_
21 #define _IOREQ_H_
23 #define IOREQ_READ 1
24 #define IOREQ_WRITE 0
26 #define STATE_INVALID 0
27 #define STATE_IOREQ_READY 1
28 #define STATE_IOREQ_INPROCESS 2
29 #define STATE_IORESP_READY 3
30 #define STATE_IORESP_HOOK 4
32 /* VMExit dispatcher should cooperate with instruction decoder to
33 prepare this structure and notify service OS and DM by sending
34 virq */
35 typedef struct {
36 u64 addr; /* physical address */
37 u64 size; /* size in bytes */
38 u64 count; /* for rep prefixes */
39 union {
40 u64 data; /* data */
41 void *pdata; /* pointer to data */
42 } u;
43 u8 state:4;
44 u8 pdata_valid:1; /* if 1, use pdata above */
45 u8 dir:1; /* 1=read, 0=write */
46 u8 port_mm:1; /* 0=portio, 1=mmio */
47 u8 df:1;
48 } ioreq_t;
50 #define MAX_VECTOR 256
51 #define BITS_PER_BYTE 8
52 #define INTR_LEN (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u64)))
54 typedef struct {
55 u64 pic_intr[INTR_LEN];
56 u64 pic_mask[INTR_LEN];
57 int eport; /* Event channel port */
58 } global_iodata_t;
60 typedef struct {
61 ioreq_t vp_ioreq;
62 unsigned long vp_intr[INTR_LEN];
63 } vcpu_iodata_t;
65 typedef struct {
66 global_iodata_t sp_global;
67 vcpu_iodata_t vcpu_iodata[1];
68 } shared_iopage_t;
70 #endif /* _IOREQ_H_ */