@@ -324,18 +324,12 @@ static void assigned_dev_ioport_map(PCIDevice *pci_dev, int region_num,
kvm_ioperm(env, data);
}
- register_ioport_read(addr, size, 1, assigned_dev_ioport_readb,
- (r_dev->v_addrs + region_num));
- register_ioport_read(addr, size, 2, assigned_dev_ioport_readw,
- (r_dev->v_addrs + region_num));
- register_ioport_read(addr, size, 4, assigned_dev_ioport_readl,
- (r_dev->v_addrs + region_num));
- register_ioport_write(addr, size, 1, assigned_dev_ioport_writeb,
- (r_dev->v_addrs + region_num));
- register_ioport_write(addr, size, 2, assigned_dev_ioport_writew,
- (r_dev->v_addrs + region_num));
- register_ioport_write(addr, size, 4, assigned_dev_ioport_writel,
- (r_dev->v_addrs + region_num));
+ register_ioport_read(addr, size, 1, assigned_dev_ioport_readb, region);
+ register_ioport_read(addr, size, 2, assigned_dev_ioport_readw, region);
+ register_ioport_read(addr, size, 4, assigned_dev_ioport_readl, region);
+ register_ioport_write(addr, size, 1, assigned_dev_ioport_writeb, region);
+ register_ioport_write(addr, size, 2, assigned_dev_ioport_writew, region);
+ register_ioport_write(addr, size, 4, assigned_dev_ioport_writel, region);
}
static uint32_t assigned_dev_pci_read(PCIDevice *d, int pos, int len)