From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1aeA-0005Fq-9q for qemu-devel@nongnu.org; Wed, 25 Nov 2015 09:02:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1ae7-0000eB-1o for qemu-devel@nongnu.org; Wed, 25 Nov 2015 09:02:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1ae6-0000e7-Q1 for qemu-devel@nongnu.org; Wed, 25 Nov 2015 09:02:06 -0500 References: <1448357149-17572-1-git-send-email-zhang.zhanghailiang@huawei.com> <1448357149-17572-11-git-send-email-zhang.zhanghailiang@huawei.com> <20151124190048.GK2490@work-vm> From: Eric Blake Message-ID: <5655BF57.2070003@redhat.com> Date: Wed, 25 Nov 2015 07:01:59 -0700 MIME-Version: 1.0 In-Reply-To: <20151124190048.GK2490@work-vm> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8nXkvVtSh1G7P9s950SPFQtggdxNdqCwq" Subject: Re: [Qemu-devel] [PATCH COLO-Frame v11 10/39] COLO: Implement colo checkpoint protocol List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" , zhanghailiang Cc: lizhijian@cn.fujitsu.com, quintela@redhat.com, yunhong.jiang@intel.com, eddie.dong@intel.com, peter.huangpeng@huawei.com, qemu-devel@nongnu.org, arei.gonglei@huawei.com, stefanha@redhat.com, amit.shah@redhat.com, hongyang.yang@easystack.cn This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8nXkvVtSh1G7P9s950SPFQtggdxNdqCwq Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/24/2015 12:00 PM, Dr. David Alan Gilbert wrote: > * zhanghailiang (zhang.zhanghailiang@huawei.com) wrote: >> We need communications protocol of user-defined to control the checkpo= int >> process. >> >> +static int colo_ctl_get(QEMUFile *f, uint32_t require, uint64_t *valu= e) >> +{ >> + int ret; >> + uint32_t cmd; >> + >> + ret =3D colo_ctl_get_cmd(f, &cmd); >> + if (ret < 0) { >> + return ret; >> + } >> + if (cmd !=3D require) { >> + error_report("Unexpect colo command, expect:%d, but got cmd:%= d", >> + require, cmd); >=20 > I think you need to use PRIu32 rather than %d since they are uint32_t > (I doubt it will break on anything, but it's correct). 32-bit cygwin uses 'long' for uint32_t, so there ARE platforms where it is absolutely necessary to use PRIu32 for printing (even if qemu isn't ported to cygwin). >> +++ b/qapi-schema.json >> @@ -722,6 +722,33 @@ >> { 'command': 'migrate-start-postcopy' } >> =20 >> ## >> +# @COLOCommand >> +# >> +# The commands for COLO fault tolerance >> +# >> +# @invalid: unknown command >> +# >> +# @checkpoint-ready: SVM is ready for checkpointing >> +# >> +# @checkpoint-request: PVM tells SVM to prepare for new checkpointing= >> +# >> +# @checkpoint-reply: SVM gets PVM's checkpoint request >> +# >> +# @vmstate-send: VM's state will be sent by PVM. >> +# >> +# @vmstate-size: The total size of VMstate. >> +# >> +# @vmstate-received: VM's state has been received by SVM >> +# >> +# @vmstate-loaded: VM's state has been loaded by SVM Inconsistent use of trailing '.' Also, do we really need 'invalid'? >> +# >> +# Since: 2.6 >> +## >> +{ 'enum': 'COLOCommand', >> + 'data': [ 'invalid', 'checkpoint-ready', 'checkpoint-request', >> + 'checkpoint-reply', 'vmstate-send', 'vmstate-size', >> + 'vmstate-received', 'vmstate-loaded' ] } >> + --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --8nXkvVtSh1G7P9s950SPFQtggdxNdqCwq 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWVb9XAAoJEKeha0olJ0NqkuwH/RTx3fdheMm6tTq5dhyGrmLR UBqO7PsQMtdVKP1NDsUniAywU4DqjtFAflguegmX8GGHScUkdcbct51/1K/7v4Uj OixUb4ToxYCBJNAewqWJBoHo7SgKqpkWy5a6pbZ8cZ8sa/LAaqWrTlgPtZDH42f9 3Lf/hGDmRjC8LrveaIlJln1p3S+nUHbITOvaUMRuCPt8HA5erSg+H5yCA5rd3wy+ UdvMZx4YVaVZc6XjGCfUJLOaxGpp5FzvmgWhQc9A4NZsA01mo/BFT0zZnaitP8Co f9+8Iz1dD7BSdxXOKDSE1a2hLJec8bHejQ6AOuwbnlHSuULUgbaB6p/PulG+uKA= =gnA4 -----END PGP SIGNATURE----- --8nXkvVtSh1G7P9s950SPFQtggdxNdqCwq--