Here we already have: AssignedDevRegion *region = &r_dev->v_addrs[region_num]; Signed-off-by: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx> --- hw/device-assignment.c | 18 ++++++------------ 1 files changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 26cb797..975bf29 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -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) -- 1.7.3.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html