6 #include <palacios/vmm_types.h>
7 #include <palacios/vmm_util.h>
12 int v3_unhook_io_port(struct guest_info * info, uint_t port);
16 int v3_hook_io_port(struct guest_info * info, uint_t port,
17 int (*read)(ushort_t port, void * dst, uint_t length, void * priv_data),
18 int (*write)(ushort_t port, void * src, uint_t length, void * priv_data),
31 struct vmm_io_hook * head;
36 void init_vmm_io_map(struct guest_info * info);
38 // FOREACH_IO_HOOK(vmm_io_map_t * io_map, vmm_io_hook_t * io_hook)
39 #define FOREACH_IO_HOOK(io_map, io_hook) for (io_hook = (io_map).head; io_hook != NULL; io_hook = (io_hook)->next)
45 // Reads data into the IO port (IN, INS)
46 int (*read)(ushort_t port, void * dst, uint_t length, void * priv_data);
48 // Writes data from the IO port (OUT, OUTS)
49 int (*write)(ushort_t port, void * src, uint_t length, void * priv_data);
53 struct vmm_io_hook * next;
54 struct vmm_io_hook * prev;
59 struct vmm_io_hook * v3_get_io_hook(struct vmm_io_map * io_map, uint_t port);
62 void PrintDebugIOMap(struct vmm_io_map * io_map);