Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


keyboard buf fixes
[palacios.git] / palacios / src / devices / i440fx.c
index 9b52eed..f622016 100644 (file)
@@ -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++) {