diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2010-07-13 20:41:56 -0300 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-07-13 20:41:56 -0300 |
commit | 496850369988be816680065e905edf74c7218b22 (patch) | |
tree | 53636c986659501dc125cff38ba4dbf4605eeb94 /hw | |
parent | deaf192a887b0d3abcfd1e54611954fdb1a65f77 (diff) | |
parent | 04b16653720cb3db353461e088612f8a24ff360b (diff) |
Merge commit '04b16653720cb3db353461e088612f8a24ff360b' into upstream-merge
* commit '04b16653720cb3db353461e088612f8a24ff360b':
qemu_ram_free: Implement it
savevm: Create a new continue flag to avoid resending block name
savevm: Use RAM blocks for basis of migration
savevm: Migrate RAM based on name/offset
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/device-assignment.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 4060fb445..2bba22f83 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -784,9 +784,14 @@ static void free_assigned_device(AssignedDevice *dev) continue; } else if (pci_region->type & IORESOURCE_MEM) { if (region->u.r_virtbase) { - int ret = munmap(region->u.r_virtbase, - (pci_region->size + 0xFFF) & 0xFFFFF000); - if (ret != 0) + if (region->memory_index) { + cpu_register_physical_memory(region->e_physbase, + region->e_size, + IO_MEM_UNASSIGNED); + qemu_ram_unmap(region->memory_index); + } + if (munmap(region->u.r_virtbase, + (pci_region->size + 0xFFF) & 0xFFFFF000)) fprintf(stderr, "Failed to unmap assigned device region: %s\n", strerror(errno)); |