Commit 6e489f3f88f6f50f5e7d9c94e36e153741453581
1 parent
925ce05f
Revert "Fake dirty loggin when it's not there"
This reverts commit bd836776. PPC should just implement dirty logging so we can avoid all the fall-out from this changeset. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
1 additions
and
12 deletions
kvm-all.c
| ... | ... | @@ -318,7 +318,6 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, |
| 318 | 318 | KVMDirtyLog d; |
| 319 | 319 | KVMSlot *mem; |
| 320 | 320 | int ret = 0; |
| 321 | - int r; | |
| 322 | 321 | |
| 323 | 322 | d.dirty_bitmap = NULL; |
| 324 | 323 | while (start_addr < end_addr) { |
| ... | ... | @@ -327,11 +326,6 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, |
| 327 | 326 | break; |
| 328 | 327 | } |
| 329 | 328 | |
| 330 | - /* We didn't activate dirty logging? Don't care then. */ | |
| 331 | - if(!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) { | |
| 332 | - continue; | |
| 333 | - } | |
| 334 | - | |
| 335 | 329 | size = ((mem->memory_size >> TARGET_PAGE_BITS) + 7) / 8; |
| 336 | 330 | if (!d.dirty_bitmap) { |
| 337 | 331 | d.dirty_bitmap = qemu_malloc(size); |
| ... | ... | @@ -343,8 +337,7 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, |
| 343 | 337 | |
| 344 | 338 | d.slot = mem->slot; |
| 345 | 339 | |
| 346 | - r = kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d); | |
| 347 | - if (r == -EINVAL) { | |
| 340 | + if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) == -1) { | |
| 348 | 341 | dprintf("ioctl failed %d\n", errno); |
| 349 | 342 | ret = -1; |
| 350 | 343 | break; |
| ... | ... | @@ -358,10 +351,6 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, |
| 358 | 351 | |
| 359 | 352 | if (test_le_bit(nr, bitmap)) { |
| 360 | 353 | cpu_physical_memory_set_dirty(addr); |
| 361 | - } else if (r < 0) { | |
| 362 | - /* When our KVM implementation doesn't know about dirty logging | |
| 363 | - * we can just assume it's always dirty and be fine. */ | |
| 364 | - cpu_physical_memory_set_dirty(addr); | |
| 365 | 354 | } |
| 366 | 355 | } |
| 367 | 356 | start_addr = phys_addr; | ... | ... |