X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_io.c;h=a73fae49035ad2059087e10a6f7abead560ae43c;hb=56f8088296ee4116a4811a2f4f843edd80a7748d;hp=8266837fed6b85d9e9729e0a07a44e18bf35cf54;hpb=6c28cc8753bb0e1b17b5c6c2ee296eb60e09079c;p=palacios.git diff --git a/palacios/src/palacios/vmm_io.c b/palacios/src/palacios/vmm_io.c index 8266837..a73fae4 100644 --- a/palacios/src/palacios/vmm_io.c +++ b/palacios/src/palacios/vmm_io.c @@ -1,3 +1,6 @@ +/* (c) 2008, Jack Lange */ +/* (c) 2008, The V3VEE Project */ + #include #include #include @@ -11,7 +14,8 @@ #endif -void init_vmm_io_map(struct vmm_io_map * io_map) { +void init_vmm_io_map(struct guest_info * info) { + struct vmm_io_map * io_map = &(info->io_map); io_map->num_ports = 0; io_map->head = NULL; } @@ -130,10 +134,11 @@ static int default_read(ushort_t port, void * dst, uint_t length, void * priv_da return 0; } -int v3_hook_io_port(struct vmm_io_map * io_map, uint_t port, - int (*read)(ushort_t port, void * dst, uint_t length, void * priv_data), - int (*write)(ushort_t port, void * src, uint_t length, void * priv_data), - void * priv_data) { +int v3_hook_io_port(struct guest_info * info, uint_t port, + int (*read)(ushort_t port, void * dst, uint_t length, void * priv_data), + int (*write)(ushort_t port, void * src, uint_t length, void * priv_data), + void * priv_data) { + struct vmm_io_map * io_map = &(info->io_map); struct vmm_io_hook * io_hook = (struct vmm_io_hook *)V3_Malloc(sizeof(struct vmm_io_hook)); io_hook->port = port; @@ -163,7 +168,8 @@ int v3_hook_io_port(struct vmm_io_map * io_map, uint_t port, return 0; } -int v3_unhook_io_port(struct vmm_io_map * io_map, uint_t port) { +int v3_unhook_io_port(struct guest_info * info, uint_t port) { + struct vmm_io_map * io_map = &(info->io_map); struct vmm_io_hook * hook = v3_get_io_hook(io_map, port); if (hook == NULL) {