]> git.proxmox.com Git - mirror_qemu.git/commit
CPUPhysMemoryClient: Pass guest physical address not region offset
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 3 May 2011 18:36:46 +0000 (12:36 -0600)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 5 May 2011 13:23:12 +0000 (16:23 +0300)
commit8d4c78e7c8adf0a4440a8de92738b3820fc8215a
tree845c5a98655a79ff9fb7d969418903020f39c323
parentc2f42bf003eac96ee4093faaf44cbf784ac64398
CPUPhysMemoryClient: Pass guest physical address not region offset

When we're trying to get a newly registered phys memory client updated
with the current page mappings, we end up passing the region offset
(a ram_addr_t) as the start address rather than the actual guest
physical memory address (target_phys_addr_t).  If your guest has less
than 3.5G of memory, these are coincidentally the same thing.  If
there's more, the region offset for the memory above 4G starts over
at 0, so the set_memory client will overwrite it's lower memory entries.

Instead, keep track of the guest phsyical address as we're walking the
tables and pass that to the set_memory client.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
exec.c