From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>,
qemu-devel@nongnu.org, quintela@redhat.com
Subject: [Qemu-devel] [PATCH 6/8] memory: obsolete cpu_physical_memory_[gs]et_dirty_tracking()
Date: Wed, 21 Dec 2011 15:34:35 +0200 [thread overview]
Message-ID: <1324474477-22267-7-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1324474477-22267-1-git-send-email-avi@redhat.com>
The getter is no longer used, so it is completely removed.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
arch_init.c | 7 +++----
cpu-all.h | 4 ----
exec-obsolete.h | 2 ++
exec.c | 10 ----------
memory.c | 2 ++
5 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 381c055..d3adacf 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -251,7 +251,7 @@ int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
int ret;
if (stage < 0) {
- cpu_physical_memory_set_dirty_tracking(0);
+ memory_global_dirty_log_stop();
return 0;
}
@@ -274,8 +274,7 @@ int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
}
}
- /* Enable dirty memory tracking */
- cpu_physical_memory_set_dirty_tracking(1);
+ memory_global_dirty_log_start();
qemu_put_be64(f, ram_bytes_total() | RAM_SAVE_FLAG_MEM_SIZE);
@@ -320,7 +319,7 @@ int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
while ((bytes_sent = ram_save_block(f)) != 0) {
bytes_transferred += bytes_sent;
}
- cpu_physical_memory_set_dirty_tracking(0);
+ memory_global_dirty_log_stop();
}
qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
diff --git a/cpu-all.h b/cpu-all.h
index 4acaa8b..2fdb856 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -566,10 +566,6 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end,
int dirty_flags);
void cpu_tlb_update_dirty(CPUState *env);
-int cpu_physical_memory_set_dirty_tracking(int enable);
-
-int cpu_physical_memory_get_dirty_tracking(void);
-
void dump_exec_info(FILE *f, fprintf_function cpu_fprintf);
#endif /* !CONFIG_USER_ONLY */
diff --git a/exec-obsolete.h b/exec-obsolete.h
index 3a2faae..880105e 100644
--- a/exec-obsolete.h
+++ b/exec-obsolete.h
@@ -61,6 +61,8 @@ static inline void cpu_register_physical_memory(target_phys_addr_t start_addr,
void qemu_register_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size);
void qemu_unregister_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size);
+int cpu_physical_memory_set_dirty_tracking(int enable);
+
#endif
#endif
diff --git a/exec.c b/exec.c
index a4116d9..28c057c 100644
--- a/exec.c
+++ b/exec.c
@@ -2008,19 +2008,9 @@ int cpu_physical_memory_set_dirty_tracking(int enable)
{
int ret = 0;
in_migration = enable;
- if (enable) {
- memory_global_dirty_log_start();
- } else {
- memory_global_dirty_log_stop();
- }
return ret;
}
-int cpu_physical_memory_get_dirty_tracking(void)
-{
- return in_migration;
-}
-
static inline void tlb_update_dirty(CPUTLBEntry *tlb_entry)
{
ram_addr_t ram_addr;
diff --git a/memory.c b/memory.c
index f7b3d50..868ffd0 100644
--- a/memory.c
+++ b/memory.c
@@ -1493,6 +1493,7 @@ void memory_global_dirty_log_start(void)
{
MemoryListener *listener;
+ cpu_physical_memory_set_dirty_tracking(1);
global_dirty_log = true;
QLIST_FOREACH(listener, &memory_listeners, link) {
listener->log_global_start(listener);
@@ -1507,6 +1508,7 @@ void memory_global_dirty_log_stop(void)
QLIST_FOREACH(listener, &memory_listeners, link) {
listener->log_global_stop(listener);
}
+ cpu_physical_memory_set_dirty_tracking(0);
}
static void listener_add_address_space(MemoryListener *listener,
--
1.7.7.1
next prev parent reply other threads:[~2011-12-21 13:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 13:34 [Qemu-devel] [PATCH 0/8] Convert live migration to memory API Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 1/8] Store MemoryRegion in RAMBlock Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 2/8] Switch ram_save to the memory API Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 3/8] Sort RAMBlocks by ID for migration, not by ram_addr Avi Kivity
2011-12-21 13:55 ` Anthony Liguori
2011-12-21 15:15 ` Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 4/8] Remove support for version 3 ram_load Avi Kivity
2011-12-21 13:57 ` Anthony Liguori
2011-12-21 15:18 ` Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 5/8] Convert ram_load() to the memory API Avi Kivity
2011-12-21 13:34 ` Avi Kivity [this message]
2011-12-21 13:34 ` [Qemu-devel] [PATCH 7/8] xen: convert framebuffer dirty tracking to " Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 8/8] memory: obsolete more dirty memory related functions Avi Kivity
2011-12-21 13:59 ` [Qemu-devel] [PATCH 0/8] Convert live migration to memory API Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324474477-22267-7-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).