From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNTft-00017X-PE for qemu-devel@nongnu.org; Mon, 16 Feb 2015 16:57:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNTfp-0005I8-PU for qemu-devel@nongnu.org; Mon, 16 Feb 2015 16:57:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNTfp-0005I4-JD for qemu-devel@nongnu.org; Mon, 16 Feb 2015 16:57:49 -0500 Message-ID: <54E267D0.1010203@redhat.com> Date: Mon, 16 Feb 2015 14:57:36 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423711034-5340-1-git-send-email-zhang.zhanghailiang@huawei.com> <1423711034-5340-3-git-send-email-zhang.zhanghailiang@huawei.com> In-Reply-To: <1423711034-5340-3-git-send-email-zhang.zhanghailiang@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hshTJpsxPUCpMek511sef0F0gNgP5T4e3" Subject: Re: [Qemu-devel] [PATCH RFC v3 02/27] migration: Introduce capability 'colo' to migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zhanghailiang , qemu-devel@nongnu.org Cc: Lai Jiangshan , yunhong.jiang@intel.com, eddie.dong@intel.com, dgilbert@redhat.com, peter.huangpeng@huawei.com, Gonglei , stefanha@redhat.com, pbonzini@redhat.com, Yang Hongyang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hshTJpsxPUCpMek511sef0F0gNgP5T4e3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/11/2015 08:16 PM, zhanghailiang wrote: > This capability allows Primary VM (PVM) to be continuously checkpointed= > to secondary VM. >=20 > Signed-off-by: zhanghailiang > Signed-off-by: Yang Hongyang > Signed-off-by: Gonglei > Signed-off-by: Lai Jiangshan > --- > include/migration/migration.h | 1 + > migration/migration.c | 15 +++++++++++++++ > qapi-schema.json | 5 ++++- > 3 files changed, 20 insertions(+), 1 deletion(-) >=20 > +++ b/migration/migration.c > @@ -276,6 +276,15 @@ void qmp_migrate_set_capabilities(MigrationCapabil= ityStatusList *params, > } > =20 > for (cap =3D params; cap; cap =3D cap->next) { > +#ifndef CONFIG_COLO > + if (cap->value->capability =3D=3D MIGRATION_CAPABILITY_COLO &&= > + cap->value->state) { > + error_setg(errp, "COLO is not currently supported, please"= > + " configure with --enable-colo option in = order to" > + " support COLO feature"); > + continue; > + } > +#endif > s->enabled_capabilities[cap->value->capability] =3D cap->value= ->state; > } Yuck. This means that probing whether colo is supported requires a usage test (try setting the capability with migrate-set-capabilities and see if it fails) instead of a query test (list the current capabilities; if colo is in the set then it is supported). Can you figure out a way to avoid exposing the colo capability if !CONFIG_COLO, so that query-migate-capabilities is sufficient to learn if colo is supported? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --hshTJpsxPUCpMek511sef0F0gNgP5T4e3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU4mfQAAoJEKeha0olJ0Nq2HUH/irWW/Zi/OtwE28CVyfwfe8s A6IlOyItowwBpVChtSokdg0A98ushHCoThSAR4wodt2/vaxZoL7PvKGYpDEU3bLP bKTaO1kUOlS8qsq5m2nOS9xSr00BiUNGDtZdDGmwWj2Vla2i4HCD2ISXaparZLOP vsOsu/6OZuWEqPW3PMD/3/aLUPDpcT8GJkG72uefofF/W7J1v1H/uBdQ7HYrUvmc gq6oKFMxZK2T/jjjVaaNZ0A0j3amZLK4DgUvseYEtYQX4rNsyEPv3C4RLyKKG2N4 kcJRRgCGuBlbrIG8x4fztlBJaTLdVuvk0Ot2AjDPlrkAMpwgtJCI1u/RWxqKpWs= =qfUH -----END PGP SIGNATURE----- --hshTJpsxPUCpMek511sef0F0gNgP5T4e3--