qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] memory: synchronize dirty bitmap before unmapping a range
@ 2011-07-31 19:47 Avi Kivity
  2011-08-01  7:34 ` Jan Kiszka
  2011-08-05 16:47 ` Anthony Liguori
  0 siblings, 2 replies; 11+ messages in thread
From: Avi Kivity @ 2011-07-31 19:47 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Jan Kiszka, kvm

When a range is being unmapped, ask accelerators (e.g. kvm) to synchronize the
dirty bitmap to avoid losing information forever.

Fixes grub2 screen update.

Signed-off-by: Avi Kivity <avi@redhat.com>
---

Please apply before the PCI batch to avoid bisectability issues (and don't
pull, since that removes ordering).

 memory.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/memory.c b/memory.c
index 5c6e63d..5f20320 100644
--- a/memory.c
+++ b/memory.c
@@ -245,6 +245,10 @@ static void as_memory_range_add(AddressSpace *as, FlatRange *fr)
 
 static void as_memory_range_del(AddressSpace *as, FlatRange *fr)
 {
+    if (fr->dirty_log_mask) {
+        cpu_physical_sync_dirty_bitmap(fr->addr.start,
+                                       fr->addr.start + fr->addr.size);
+    }
     cpu_register_physical_memory(fr->addr.start, fr->addr.size,
                                  IO_MEM_UNASSIGNED);
 }
-- 
1.7.5.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-08-05 16:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-31 19:47 [Qemu-devel] [PATCH] memory: synchronize dirty bitmap before unmapping a range Avi Kivity
2011-08-01  7:34 ` Jan Kiszka
2011-08-01  7:52   ` Jan Kiszka
2011-08-01  8:16     ` Avi Kivity
2011-08-01  9:05       ` Jan Kiszka
2011-08-01  9:30         ` Avi Kivity
2011-08-01  9:32           ` Avi Kivity
2011-08-01  9:45         ` Avi Kivity
2011-08-01 10:21           ` Jan Kiszka
2011-08-01 10:27             ` Avi Kivity
2011-08-05 16:47 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).