2 * ioreq.h: I/O request definitions for device models
3 * Copyright (c) 2004, Intel Corporation.
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.
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
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.
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 #define IOPACKET_PORT 2
34 /* VMExit dispatcher should cooperate with instruction decoder to
35 prepare this structure and notify service OS and DM by sending
38 u64 addr; /* physical address */
39 u64 size; /* size in bytes */
40 u64 count; /* for rep prefixes */
43 void *pdata; /* pointer to data */
46 u8 pdata_valid:1; /* if 1, use pdata above */
47 u8 dir:1; /* 1=read, 0=write */
48 u8 port_mm:1; /* 0=portio, 1=mmio */
52 #define MAX_VECTOR 256
53 #define BITS_PER_BYTE 8
54 #define INTR_LEN (MAX_VECTOR/(BITS_PER_BYTE * sizeof(unsigned long)))
58 unsigned long vp_intr[INTR_LEN];
61 #endif /* _IOREQ_H_ */