Message ID | 20130225094353.GA12585@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/hw/vhost.c b/hw/vhost.c index dbf6b46..fe24f95 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -53,9 +53,9 @@ static void vhost_dev_sync_region(struct vhost_dev *dev, log = __sync_fetch_and_and(from, 0); while ((bit = sizeof(log) > sizeof(int) ? ffsll(log) : ffs(log))) { - ram_addr_t ram_addr; + hwaddr ram_addr; bit -= 1; - ram_addr = section->offset_within_region + addr + bit * VHOST_LOG_PAGE; + ram_addr = addr + bit * VHOST_LOG_PAGE - section->mr->addr; memory_region_set_dirty(section->mr, ram_addr, VHOST_LOG_PAGE); log &= ~(0x1ull << bit); }