From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ae7FR-0006AO-Dd for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:31:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ae7FN-0001Xp-D6 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:31:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ae7FN-0001Xl-5O for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:31:49 -0500 References: <1457605407-679-1-git-send-email-xiecl.fnst@cn.fujitsu.com> From: Eric Blake Message-ID: <56E1D9B3.3070908@redhat.com> Date: Thu, 10 Mar 2016 13:31:47 -0700 MIME-Version: 1.0 In-Reply-To: <1457605407-679-1-git-send-email-xiecl.fnst@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hmgoKxCnU1UtFAmJaCmv2xjx5UlEtC94v" Subject: Re: [Qemu-devel] [PATCH] Introduce "xen-load-devices-state" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Changlong Xie , qemu devel , Juan Quintela , Amit Shah , Markus Armbruster Cc: "Dr. David Alan Gilbert" , zhanghailiang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hmgoKxCnU1UtFAmJaCmv2xjx5UlEtC94v Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/10/2016 03:23 AM, Changlong Xie wrote: > From: Wen Congyang >=20 > Introduce a "xen-load-devices-state" QAPI command that can be used to l= oad > the state of all devices, but not the RAM or the block devices of the > VM. >=20 > We only have hmp commands savevm/loadvm, and qmp commands > xen-save-devices-state. >=20 > We use this new command for COLO: > 1. suspend both primay vm and secondary vm s/primay/primary/ > 2. sync the state > 3. resume both primary vm and secondary vm >=20 > In such case, we need to update all devices's state in any time. s/devices's/devices/' >=20 > Signed-off-by: Wen Congyang > Signed-off-by: Changlong Xie > --- > +++ b/qapi-schema.json > @@ -4122,3 +4122,21 @@ > ## > { 'enum': 'ReplayMode', > 'data': [ 'none', 'record', 'play' ] } > + > +## > +# @xen-load-devices-state: > +# > +# Load the state of all devices from file. The RAM and the block devic= es > +# of the VM are not loaded by this command. > +# > +# @filename: the file to load the state of the devices from as binary > +# data. See xen-save-devices-state.txt for a description of the binary= > +# format. > +# > +# Returns: Nothing on success > +# If @filename cannot be opened, OpenFileFailed > +# If an I/O error occurs while reading the file, IOError Drop the whole Returns: paragraph. We have very few distinguished error categories, and you are not using anything other than a generic error category here (that is, OpenFileFailed and IOError are NOT valid QMP error categories). > +# > +# Since: 2.6 You missed soft freeze; is this still 2.6 material? > +++ b/qmp-commands.hx > @@ -587,6 +587,33 @@ Example: > EQMP > =20 > { > + .name =3D "xen-load-devices-state", > + .args_type =3D "filename:F", > + .mhandler.cmd_new =3D qmp_marshal_xen_load_devices_state, > + }, > + > +SQMP > +xen-load-devices-state > +------- Make the ---- separator line the same length as the text it is underlinin= g. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --hmgoKxCnU1UtFAmJaCmv2xjx5UlEtC94v 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/ iQEcBAEBCAAGBQJW4dmzAAoJEKeha0olJ0Nq5joH/i1ijtU2Sduy7BOWSSgdfHBJ 16AdQ84TAZXhLCibxaitAoBEIsX/3UYRzWB25TBnUTzax29noWiE4LFPMWtieqIA cwKhJsIlIWXbRnSG/BpxNcqI9RxIk4lqFzOnAaCpEmabzjonlErvml/L0yYkCM0w 2VkwEqyumjHct9WQSfuTaM5jk5wmchHYnmmfmmNsSEzfAwRzpSty/90FzJXY4QtT 2xIETNFS1VoEOgcy8HVOdUdbCnDMMr+2rMd6Pd6EsDxo1l7EHnfLjwvNyrdYn/Gz hwtPadoZPM5adtJvHDPse9IrPRJplSxCEKLiGdfRM3xWBGwIu6Jang15AhNvmUo= =syfl -----END PGP SIGNATURE----- --hmgoKxCnU1UtFAmJaCmv2xjx5UlEtC94v--