debuggers.hg

view xen/include/public/io/ioreq.h @ 3606:002034af24e6

bitkeeper revision 1.1159.231.11 (41f97e1amKuDHSrW5ZWKsTy4ZIfNRA)

Fix the direction flag for string I/O instructions.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@labyrinth.cl.cam.ac.uk
date Thu Jan 27 23:49:46 2005 +0000 (2005-01-27)
parents b9ab4345fd1b
children bc0fbb38cb25
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
31 #define IOPACKET_PORT 2
33 /* VMExit dispatcher should cooperate with instruction decoder to
34 prepare this structure and notify service OS and DM by sending
35 virq */
36 typedef struct {
37 u64 addr; /* physical address */
38 u64 size; /* size in bytes */
39 u64 count; /* for rep prefixes */
40 union {
41 u64 data; /* data */
42 void *pdata; /* pointer to data */
43 } u;
44 u8 state:4;
45 u8 pdata_valid:1; /* if 1, use pdata above */
46 u8 dir:1; /* 1=read, 0=write */
47 u8 port_mm:1; /* 0=portio, 1=mmio */
48 u8 df:1;
49 } ioreq_t;
51 #define MAX_VECTOR 256
52 #define BITS_PER_BYTE 8
53 #define INTR_LEN (MAX_VECTOR/(BITS_PER_BYTE * sizeof(unsigned long)))
55 typedef struct {
56 ioreq_t vp_ioreq;
57 unsigned long vp_intr[INTR_LEN];
58 } vcpu_iodata_t;
60 #endif /* _IOREQ_H_ */