| Submitter | Michael S. Tsirkin |
|---|---|
| Date | Feb. 23, 2013, 9:54 p.m. |
| Message ID | <20130223215455.GA19763@redhat.com> |
| Download | mbox | patch |
| Permalink | /patch/222750/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/hw/vhost.c b/hw/vhost.c index dbf6b46..72c0095 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -53,9 +53,10 @@ 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->offset_within_address_space; memory_region_set_dirty(section->mr, ram_addr, VHOST_LOG_PAGE); log &= ~(0x1ull << bit); }