|
|
9ae3a8 |
From bde7a88eaae5b1f1d2dd83a4d4fd232991d2397d Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Juan Quintela <quintela@redhat.com>
|
|
|
9ae3a8 |
Date: Tue, 14 Jan 2014 15:07:45 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 34/40] memory: unfold memory_region_test_and_clear()
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Juan Quintela <quintela@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1389712071-23303-35-git-send-email-quintela@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 56689
|
|
|
9ae3a8 |
O-Subject: [RHEL7 qemu-kvm PATCH 34/40] memory: unfold memory_region_test_and_clear()
|
|
|
9ae3a8 |
Bugzilla: 997559
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
We are going to update the bitmap directly
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 12291ec18fdce3c1973c172f5a942a1bd26b9a5f)
|
|
|
9ae3a8 |
Signed-off-by: Juan Quintela <quintela@trasno.org>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
arch_init.c | 10 +++++++---
|
|
|
9ae3a8 |
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
arch_init.c | 10 +++++++---
|
|
|
9ae3a8 |
1 files changed, 7 insertions(+), 3 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/arch_init.c b/arch_init.c
|
|
|
9ae3a8 |
index d71fb33..41da357 100644
|
|
|
9ae3a8 |
--- a/arch_init.c
|
|
|
9ae3a8 |
+++ b/arch_init.c
|
|
|
9ae3a8 |
@@ -48,6 +48,7 @@
|
|
|
9ae3a8 |
#include "qmp-commands.h"
|
|
|
9ae3a8 |
#include "trace.h"
|
|
|
9ae3a8 |
#include "exec/cpu-all.h"
|
|
|
9ae3a8 |
+#include "exec/ram_addr.h"
|
|
|
9ae3a8 |
#include "hw/acpi/acpi.h"
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
#ifdef DEBUG_ARCH_INIT
|
|
|
9ae3a8 |
@@ -400,9 +401,12 @@ static void migration_bitmap_sync(void)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
|
|
|
9ae3a8 |
for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) {
|
|
|
9ae3a8 |
- if (memory_region_test_and_clear_dirty(block->mr,
|
|
|
9ae3a8 |
- addr, TARGET_PAGE_SIZE,
|
|
|
9ae3a8 |
- DIRTY_MEMORY_MIGRATION)) {
|
|
|
9ae3a8 |
+ if (cpu_physical_memory_get_dirty(block->mr->ram_addr + addr,
|
|
|
9ae3a8 |
+ TARGET_PAGE_SIZE,
|
|
|
9ae3a8 |
+ DIRTY_MEMORY_MIGRATION)) {
|
|
|
9ae3a8 |
+ cpu_physical_memory_reset_dirty(block->mr->ram_addr + addr,
|
|
|
9ae3a8 |
+ TARGET_PAGE_SIZE,
|
|
|
9ae3a8 |
+ DIRTY_MEMORY_MIGRATION);
|
|
|
9ae3a8 |
migration_bitmap_set_dirty(block->mr, addr);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|