X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fi440fx.c;h=f6220166d43f3b72f5b74dc0c584c034e9dbc9d3;hb=3b250574aa0961aea7cc3ac3ca65f3e76672b977;hp=9b52eeda52a0d6c0fd2f76a39e051292fce3b981;hpb=ec660ce1c5410ef08a7820f7ee064a30b416a523;p=palacios.git diff --git a/palacios/src/devices/i440fx.c b/palacios/src/devices/i440fx.c index 9b52eed..f622016 100644 --- a/palacios/src/devices/i440fx.c +++ b/palacios/src/devices/i440fx.c @@ -32,13 +32,11 @@ struct i440_state { static int io_read(struct guest_info * core, ushort_t port, void * dst, uint_t length, void * priv_data) { - // struct vm_device * dev = priv_data; PrintError("Unhandled read on port %x\n", port); return -1; } static int io_write(struct guest_info * core, ushort_t port, void * src, uint_t length, void * priv_data) { - // struct vm_device * dev = priv_data; PrintError("Unhandled write on port %x\n", port); return -1; } @@ -49,12 +47,6 @@ static int io_write(struct guest_info * core, ushort_t port, void * src, uint_t static int i440_free(struct vm_device * dev) { struct i440_state * state = dev->private_data; - int i; - - for (i = 0; i < 4; i++) { - v3_unhook_io_port(dev->vm, 0x0cf8 + i); - v3_unhook_io_port(dev->vm, 0x0cfc + i); - } // unregister from PCI @@ -99,8 +91,8 @@ static int i440_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { } for (i = 0; i < 4; i++) { - v3_hook_io_port(vm, 0x0cf8 + i, &io_read, &io_write, dev); - v3_hook_io_port(vm, 0x0cfc + i, &io_read, &io_write, dev); + v3_dev_hook_io(dev, 0x0cf8 + i, &io_read, &io_write); + v3_dev_hook_io(dev, 0x0cfc + i, &io_read, &io_write); } for (i = 0; i < 6; i++) {