From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
dgilbert@redhat.com, Juan Quintela <quintela@redhat.com>
Subject: [Qemu-devel] [PULL 3/8] exec: cpu_physical_memory_set/clear_dirty_range
Date: Wed, 24 Dec 2014 13:51:37 +0200 [thread overview]
Message-ID: <1419421800-27505-4-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1419421800-27505-1-git-send-email-mst@redhat.com>
Make cpu_physical_memory_set/clear_dirty_range
behave symmetrically.
To clear range for a given client type only, add
cpu_physical_memory_clear_dirty_range_type.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/exec/ram_addr.h | 15 ++++++++-------
exec.c | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 18ec092..254931c 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -172,9 +172,9 @@ static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap,
}
#endif /* not _WIN32 */
-static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start,
- ram_addr_t length,
- unsigned client)
+static inline void cpu_physical_memory_clear_dirty_range_type(ram_addr_t start,
+ ram_addr_t length,
+ unsigned client)
{
unsigned long end, page;
@@ -184,11 +184,12 @@ static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start,
bitmap_clear(ram_list.dirty_memory[client], page, end - page);
}
-static inline void cpu_physical_memory_clear_dirty_range_nocode(ram_addr_t start,
- ram_addr_t length)
+static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start,
+ ram_addr_t length)
{
- cpu_physical_memory_clear_dirty_range(start, length, DIRTY_MEMORY_MIGRATION);
- cpu_physical_memory_clear_dirty_range(start, length, DIRTY_MEMORY_VGA);
+ cpu_physical_memory_clear_dirty_range_type(start, length, DIRTY_MEMORY_MIGRATION);
+ cpu_physical_memory_clear_dirty_range_type(start, length, DIRTY_MEMORY_VGA);
+ cpu_physical_memory_clear_dirty_range_type(start, length, DIRTY_MEMORY_CODE);
}
diff --git a/exec.c b/exec.c
index 963481a..a89aa6c 100644
--- a/exec.c
+++ b/exec.c
@@ -850,7 +850,7 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t length,
{
if (length == 0)
return;
- cpu_physical_memory_clear_dirty_range(start, length, client);
+ cpu_physical_memory_clear_dirty_range_type(start, length, client);
if (tcg_enabled()) {
tlb_reset_dirty_range_all(start, length);
--
MST
next prev parent reply other threads:[~2014-12-24 11:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 11:51 [Qemu-devel] [PULL 0/8] pc: resizeable ROM blocks Michael S. Tsirkin
2014-12-24 11:51 ` [Qemu-devel] [PULL 1/8] cpu: add cpu_physical_memory_clear_dirty_range_nocode Michael S. Tsirkin
2015-01-07 7:16 ` Paolo Bonzini
2014-12-24 11:51 ` [Qemu-devel] [PULL 2/8] memory: add memory_region_set_size Michael S. Tsirkin
2014-12-24 11:51 ` Michael S. Tsirkin [this message]
2014-12-24 11:51 ` [Qemu-devel] [PULL 4/8] exec: split length -> used_length/max_length Michael S. Tsirkin
2014-12-24 11:51 ` [Qemu-devel] [PULL 5/8] exec: qemu_ram_alloc_resizeable, qemu_ram_resize Michael S. Tsirkin
2015-01-07 7:18 ` Paolo Bonzini
2015-01-07 9:55 ` Michael S. Tsirkin
2014-12-24 11:51 ` [Qemu-devel] [PULL 6/8] arch_init: support resizing on incoming migration Michael S. Tsirkin
2014-12-24 11:51 ` [Qemu-devel] [PULL 7/8] memory: API to allocate resizeable RAM MR Michael S. Tsirkin
2014-12-24 11:51 ` [Qemu-devel] [PULL 8/8] acpi-build: make ROMs RAM blocks resizeable Michael S. Tsirkin
2014-12-30 13:47 ` Marcel Apfelbaum
2014-12-24 12:25 ` [Qemu-devel] [PULL 0/8] pc: resizeable ROM blocks Paolo Bonzini
2014-12-24 12:40 ` Peter Maydell
2014-12-24 12:41 ` Michael S. Tsirkin
2015-01-07 7:33 ` Paolo Bonzini
2015-01-07 10:03 ` Michael S. Tsirkin
2015-01-07 10:52 ` Paolo Bonzini
2015-01-07 12:37 ` Michael S. Tsirkin
2015-01-07 12:59 ` Paolo Bonzini
2015-01-19 14:04 ` Igor Mammedov
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=1419421800-27505-4-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=dgilbert@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).