Paolo Bonzini 6886867e98 exec: fix migration with devices that use address_space_rw
Devices that use address_space_rw to write large areas to memory
(as opposed to address_space_map/unmap) were broken with respect
to migration since fe680d0 (exec: Limit translation limiting in
address_space_translate to xen, 2014-05-07).  Such devices include
IDE CD-ROMs.

The reason is that invalidate_and_set_dirty (called by address_space_rw
but not address_space_map/unmap) was only setting the dirty bit for
the first page in the translation.

To fix this, introduce cpu_physical_memory_set_dirty_range_nocode that
is the same as cpu_physical_memory_set_dirty_range except it does not
muck with the DIRTY_MEMORY_CODE bitmap.  This function can be used if
the caller invalidates translations with tb_invalidate_phys_page_range.

There is another difference between cpu_physical_memory_set_dirty_range
and cpu_physical_memory_set_dirty_flag; the former includes a call
to xen_modified_memory.  This is handled separately in
invalidate_and_set_dirty, and is not needed in other callers of
cpu_physical_memory_set_dirty_range_nocode, so leave it alone.

Just one nit: now that invalidate_and_set_dirty takes care of handling
multiple pages, there is no need for address_space_unmap to wrap it
in a loop.  In fact that loop would now be O(n^2).

Reported-by: Dave Gilbert <dgilbert@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-07-22 10:38:50 +02:00
2014-07-15 15:34:13 +02:00
2014-07-09 15:50:11 +02:00
2014-06-23 11:00:12 -04:00
2014-07-08 15:08:03 +02:00
2014-06-27 09:27:56 -04:00
2014-06-05 16:10:33 +02:00
2014-06-29 18:59:06 +03:00
2014-06-05 16:10:33 +02:00
2014-07-18 14:57:35 +02:00
2014-07-11 14:50:18 +01:00
2014-06-27 09:27:55 -04:00
2014-06-16 13:24:35 +02:00
2014-06-09 15:43:40 +02:00
2014-07-09 15:50:11 +02:00
2014-07-09 15:50:11 +02:00
2014-06-23 11:12:28 -04:00
2014-07-10 17:06:29 +02:00
2014-06-23 11:01:25 -04:00
2014-06-05 16:10:33 +02:00
2014-07-14 12:03:21 +02:00
2014-06-19 18:44:21 +03:00
2014-06-19 16:41:54 +03:00
2014-06-23 11:01:25 -04:00
2014-06-23 19:09:50 +02:00
2014-06-30 12:50:17 +02:00
2014-07-06 09:13:53 +03:00
2014-05-28 17:36:21 +02:00
2014-07-07 09:15:29 +02:00
2014-06-16 17:23:21 +08:00
2014-07-07 09:15:29 +02:00
2014-06-09 15:43:40 +02:00
2014-05-24 00:07:29 +04:00
2014-06-27 10:39:10 +02:00
2014-06-05 16:10:33 +02:00
2014-07-08 16:53:59 +01:00
2014-07-01 14:21:50 +01:00
2014-05-07 16:16:43 +00:00
2014-07-07 10:37:40 +00:00
2014-07-07 10:37:40 +00:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
No description provided
Readme 404 MiB
Languages
C 82.6%
C++ 6.5%
Python 3.4%
Dylan 2.9%
Shell 1.6%
Other 2.8%