From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M7cg3-0004UL-Dy for qemu-devel@nongnu.org; Fri, 22 May 2009 17:53:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M7cfy-0004Tt-Ts for qemu-devel@nongnu.org; Fri, 22 May 2009 17:53:18 -0400 Received: from [199.232.76.173] (port=51914 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M7cfy-0004Tq-N5 for qemu-devel@nongnu.org; Fri, 22 May 2009 17:53:14 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:35860) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M7cfy-0003Wn-2V for qemu-devel@nongnu.org; Fri, 22 May 2009 17:53:14 -0400 Message-ID: <4A171E71.1000701@web.de> Date: Fri, 22 May 2009 23:51:45 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD7FD9CA03D01DA0BF169F675" Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH] kvm: Mark full address range dirty on live migration start List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD7FD9CA03D01DA0BF169F675 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable As Avi correctly noted, last_ram_offset does not mark the last physical RAM address the guest may see (due to non-continuous memory regions). Ensure that we catch them all by marking the full possible address range dirty. Signed-off-by: Jan Kiszka --- targphys.h | 2 ++ vl.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/targphys.h b/targphys.h index 81a9c37..99ab23c 100644 --- a/targphys.h +++ b/targphys.h @@ -12,9 +12,11 @@ =20 #if TARGET_PHYS_ADDR_BITS =3D=3D 32 typedef uint32_t target_phys_addr_t; +#define TARGET_PHYS_ADDR_MAX UINT32_MAX #define TARGET_FMT_plx "%08x" #elif TARGET_PHYS_ADDR_BITS =3D=3D 64 typedef uint64_t target_phys_addr_t; +#define TARGET_PHYS_ADDR_MAX UINT64_MAX #define TARGET_FMT_plx "%016" PRIx64 #endif #endif diff --git a/vl.c b/vl.c index 2c1f0e0..090c83d 100644 --- a/vl.c +++ b/vl.c @@ -3232,7 +3232,7 @@ static int ram_save_live(QEMUFile *f, int stage, vo= id *opaque) { ram_addr_t addr; =20 - if (cpu_physical_sync_dirty_bitmap(0, last_ram_offset) !=3D 0) { + if (cpu_physical_sync_dirty_bitmap(0, TARGET_PHYS_ADDR_MAX) !=3D 0) = { qemu_file_set_error(f); return 0; } --------------enigD7FD9CA03D01DA0BF169F675 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkoXHnIACgkQniDOoMHTA+lqpwCfc5GoMEYTNxPKCNf7oVexCATM 4oMAn3HAxnFN4uCKqKM14ZA4PJ4QHIZF =s70t -----END PGP SIGNATURE----- --------------enigD7FD9CA03D01DA0BF169F675--