ia64/xen-unstable

view xen/include/asm-x86/vmx_intercept.h @ 8492:9fc306e40a7c

Move public hvm interfaces into xen/include/public/hvm.
Add new header hvm_info_table.h for defining location and
contents of acpi-style hvm_info_table. Remove duplicate
definition in vmxassist/acpi_madt.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jan 03 14:58:34 2006 +0100 (2006-01-03)
parents 781b6dd73e4c
children
line source
1 #ifndef _VMX_INTERCEPT_H
2 #define _VMX_INTERCEPT_H
4 #include <xen/config.h>
5 #include <xen/init.h>
6 #include <xen/lib.h>
7 #include <xen/time.h>
8 #include <xen/errno.h>
9 #include <public/hvm/ioreq.h>
11 #define MAX_IO_HANDLER 8
13 #define VMX_PORTIO 0
14 #define VMX_MMIO 1
16 typedef int (*intercept_action_t)(ioreq_t *);
17 typedef unsigned long (*vmx_mmio_read_t)(struct vcpu *v,
18 unsigned long addr,
19 unsigned long length);
21 typedef void (*vmx_mmio_write_t)(struct vcpu *v,
22 unsigned long addr,
23 unsigned long length,
24 unsigned long val);
26 typedef int (*vmx_mmio_check_t)(struct vcpu *v, unsigned long addr);
28 struct io_handler {
29 int type;
30 unsigned long addr;
31 unsigned long size;
32 intercept_action_t action;
33 };
35 struct vmx_io_handler {
36 int num_slot;
37 struct io_handler hdl_list[MAX_IO_HANDLER];
38 };
40 struct vmx_mmio_handler {
41 vmx_mmio_check_t check_handler;
42 vmx_mmio_read_t read_handler;
43 vmx_mmio_write_t write_handler;
44 };
46 /* global io interception point in HV */
47 extern int vmx_io_intercept(ioreq_t *p, int type);
48 extern int register_io_handler(unsigned long addr, unsigned long size,
49 intercept_action_t action, int type);
51 static inline int vmx_portio_intercept(ioreq_t *p)
52 {
53 return vmx_io_intercept(p, VMX_PORTIO);
54 }
56 int vmx_mmio_intercept(ioreq_t *p);
58 static inline int register_portio_handler(unsigned long addr,
59 unsigned long size,
60 intercept_action_t action)
61 {
62 return register_io_handler(addr, size, action, VMX_PORTIO);
63 }
65 #endif /* _VMX_INTERCEPT_H */