From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVDAi-0001T1-Pa for qemu-devel@nongnu.org; Tue, 10 Mar 2015 01:57:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVDAe-0003ZX-0B for qemu-devel@nongnu.org; Tue, 10 Mar 2015 01:57:40 -0400 Received: from ozlabs.org ([103.22.144.67]:58498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVDAd-0003YU-M3 for qemu-devel@nongnu.org; Tue, 10 Mar 2015 01:57:35 -0400 Date: Tue, 10 Mar 2015 15:58:15 +1100 From: David Gibson Message-ID: <20150310045815.GA11973@voom.redhat.com> References: <1424883128-9841-1-git-send-email-dgilbert@redhat.com> <1424883128-9841-10-git-send-email-dgilbert@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline In-Reply-To: <1424883128-9841-10-git-send-email-dgilbert@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 09/45] Migration commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, quintela@redhat.com, qemu-devel@nongnu.org, amit.shah@redhat.com, pbonzini@redhat.com, yanghy@cn.fujitsu.com --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 25, 2015 at 04:51:32PM +0000, Dr. David Alan Gilbert (git) wrot= e: > From: "Dr. David Alan Gilbert" >=20 > Create QEMU_VM_COMMAND section type for sending commands from > source to destination. These commands are not intended to convey > guest state but to control the migration process. >=20 > For use in postcopy. >=20 > Signed-off-by: Dr. David Alan Gilbert [snip] > +/* Send a 'QEMU_VM_COMMAND' type element with the command > + * and associated data. > + */ > +void qemu_savevm_command_send(QEMUFile *f, > + enum qemu_vm_cmd command, > + uint16_t len, > + uint8_t *data) > +{ > + uint32_t tmp =3D (uint16_t)command; Erm.. cast to u16, assign to u32, then send as u16? What's up with that? > + qemu_put_byte(f, QEMU_VM_COMMAND); > + qemu_put_be16(f, tmp); > + qemu_put_be16(f, len); > + if (len) { > + qemu_put_buffer(f, data, len); > + } > + qemu_fflush(f); > +} > + --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --tThc/1wpZn/ma/RB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU/nnnAAoJEGw4ysog2bOSxS8QAKigLg3f8qd6eMQlyi3Bobni 4xVvrDXipwcSYd0HwzGSelYcfuraeXQQ1AHGxVYPwD3onwgXtVxsQKdZ9PGDLGpo Igy9pbQkYp264Wge6H3VqlKXxmHK/6VSnO2KIX3b24Zcbvi1+mw1sOKt6HTr+QiC 7BWpUfhYFsGXciw3tAK2/GmD7V1CpZM9D0ixWeu6WG6N9WNtSPt4xsrTt+0nz5ot 9aHVDmHpTeWWU7WCV14Cs2h6uDu7wl+r4LgEwIdVmpJQgOML90oY1eT4HhgvFypK b9q6lLR30c8bcfJAKUfqJ6Mry/ITXxEM668cm+VWpY18E59GcmyXhs8KYD2QdYys d6YAdaAcMaVm0TaKwnBcEARTZAf0mgUQtkcLVIrKR2z6F0EMT8o2o3T88ilApN9o XSEj/BAuv9hOvWO041OqMiO+ySuw8N+Jx0QiXNZiu1fqFMkPeRGKmRyfeM+vLQba FumtUC7ezM28mN2r7VeuhiZAII+3oYT4vxUCULk0yTWJmSFOrnfqougBBNOd4xJr 4+BiuYThBco8gbZsfGyR+mnJoNwMG+jDdeaXn7RlFoBGJI8DbukeS0frR+HphlSJ Un6PyG9XyTAUwWkQyzLIHgHk/wXI7VsMn6vVlZKqH3JZXVn0wzYEWRRorEAZUhgW uIqc148D02wxkglLFOEc =e6bp -----END PGP SIGNATURE----- --tThc/1wpZn/ma/RB--