Message ID | 1465815427-22041-1-git-send-email-sstabellini@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/exec.c b/exec.c index a9d465b..4f3818c 100644 --- a/exec.c +++ b/exec.c @@ -1935,7 +1935,7 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset, ram_addr = xen_ram_addr_from_mapcache(ptr); block = qemu_get_ram_block(ram_addr); if (block) { - *offset = (host - block->host); + *offset = ram_addr - block->offset; } rcu_read_unlock(); return block;