6 #include <palacios/vmm_types.h>
7 #include <palacios/vmm_util.h>
15 struct vmm_io_hook * head;
20 int v3_unhook_io_port(struct guest_info * info, uint_t port);
24 int v3_hook_io_port(struct guest_info * info, uint_t port,
25 int (*read)(ushort_t port, void * dst, uint_t length, void * priv_data),
26 int (*write)(ushort_t port, void * src, uint_t length, void * priv_data),
29 void init_vmm_io_map(struct guest_info * info);
36 // FOREACH_IO_HOOK(vmm_io_map_t * io_map, vmm_io_hook_t * io_hook)
37 #define FOREACH_IO_HOOK(io_map, io_hook) for (io_hook = (io_map).head; io_hook != NULL; io_hook = (io_hook)->next)
43 // Reads data into the IO port (IN, INS)
44 int (*read)(ushort_t port, void * dst, uint_t length, void * priv_data);
46 // Writes data from the IO port (OUT, OUTS)
47 int (*write)(ushort_t port, void * src, uint_t length, void * priv_data);
51 struct vmm_io_hook * next;
52 struct vmm_io_hook * prev;
57 struct vmm_io_hook * v3_get_io_hook(struct vmm_io_map * io_map, uint_t port);
60 void PrintDebugIOMap(struct vmm_io_map * io_map);