qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: QEMU-devel <qemu-devel@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Avi Kivity <avi@redhat.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	Xen Devel <xen-devel@lists.xen.org>
Subject: [Qemu-devel] [PATCH V5 4/5] exec, memory: Call to xen_modified_memory.
Date: Tue, 2 Oct 2012 17:52:26 +0100	[thread overview]
Message-ID: <1349196747-30410-5-git-send-email-anthony.perard@citrix.com> (raw)
In-Reply-To: <1349196747-30410-1-git-send-email-anthony.perard@citrix.com>

This patch add some calls to xen_modified_memory to notify Xen about dirtybits
during migration.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 exec-obsolete.h | 2 ++
 exec.c          | 1 +
 2 files changed, 3 insertions(+)

diff --git a/exec-obsolete.h b/exec-obsolete.h
index c099256..286e2f7 100644
--- a/exec-obsolete.h
+++ b/exec-obsolete.h
@@ -24,6 +24,7 @@
 #endif
 
 #ifndef CONFIG_USER_ONLY
+#include "hw/xen.h"
 
 ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
                                    MemoryRegion *mr);
@@ -111,6 +112,7 @@ static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start,
     for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) {
         cpu_physical_memory_set_dirty_flags(addr, dirty_flags);
     }
+    xen_modified_memory(addr, length);
 }
 
 static inline void cpu_physical_memory_mask_dirty_range(ram_addr_t start,
diff --git a/exec.c b/exec.c
index 366684c..1114a09 100644
--- a/exec.c
+++ b/exec.c
@@ -3427,6 +3427,7 @@ static void invalidate_and_set_dirty(target_phys_addr_t addr,
         /* set dirty bit */
         cpu_physical_memory_set_dirty_flags(addr, (0xff & ~CODE_DIRTY_FLAG));
     }
+    xen_modified_memory(addr, length);
 }
 
 void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
-- 
Anthony PERARD

  parent reply	other threads:[~2012-10-02 16:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 16:52 [Qemu-devel] [PATCH V5 0/5] Xen, introducing dirty log for migration Anthony PERARD
2012-10-02 16:52 ` [Qemu-devel] [PATCH V5 1/5] QMP, Introduce xen-set-global-dirty-log command Anthony PERARD
2012-10-02 16:56   ` Eric Blake
2012-10-02 18:09     ` Anthony PERARD
2012-10-02 16:52 ` [Qemu-devel] [PATCH V5 2/5] xen: Introduce xen_modified_memory Anthony PERARD
2012-10-02 16:52 ` [Qemu-devel] [PATCH V5 3/5] exec: Introduce helper to set dirty flags Anthony PERARD
2012-10-02 16:52 ` Anthony PERARD [this message]
2012-10-02 16:53   ` [Qemu-devel] [PATCH V5 4/5] exec, memory: Call to xen_modified_memory Avi Kivity
2012-10-02 16:52 ` [Qemu-devel] [PATCH V5 5/5] xen: Set the vram dirty when an error occur Anthony PERARD
  -- strict thread matches above, loose matches on Subject: below --
2012-10-02 18:21 [Qemu-devel] [PATCH V5 0/5] Xen, introducing dirty log for migration Anthony PERARD
2012-10-02 18:21 ` [Qemu-devel] [PATCH V5 4/5] exec, memory: Call to xen_modified_memory Anthony PERARD

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=1349196747-30410-5-git-send-email-anthony.perard@citrix.com \
    --to=anthony.perard@citrix.com \
    --cc=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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).