From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDMtT-00010r-JL for qemu-devel@nongnu.org; Wed, 06 Mar 2013 17:33:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDMtR-0006HV-Pv for qemu-devel@nongnu.org; Wed, 06 Mar 2013 17:33:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDMtR-0006HP-IX for qemu-devel@nongnu.org; Wed, 06 Mar 2013 17:33:01 -0500 Message-ID: <5137C3E0.3060600@redhat.com> Date: Wed, 06 Mar 2013 15:32:00 -0700 From: Eric Blake MIME-Version: 1.0 References: <1362607171-24668-1-git-send-email-lersek@redhat.com> <1362607171-24668-2-git-send-email-lersek@redhat.com> In-Reply-To: <1362607171-24668-2-git-send-email-lersek@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2KJVLAKCAKLOUFXDEDDMS" Subject: Re: [Qemu-devel] [PATCH v2 1/3] qga: introduce guest-get-vcpus / guest-set-vcpus with stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2KJVLAKCAKLOUFXDEDDMS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/06/2013 02:59 PM, Laszlo Ersek wrote: > Signed-off-by: Laszlo Ersek > --- > qga/qapi-schema.json | 72 ++++++++++++++++++++++++++++++++++++++++++= ++++++++ > qga/commands-posix.c | 12 ++++++++ > qga/commands-win32.c | 12 ++++++++ > 3 files changed, 96 insertions(+), 0 deletions(-) >=20 > diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json > index d91d903..cba881c 100644 > --- a/qga/qapi-schema.json > +++ b/qga/qapi-schema.json > @@ -515,3 +515,75 @@ > ## > { 'command': 'guest-network-get-interfaces', > 'returns': ['GuestNetworkInterface'] } > + > +## > +# @GuestLogicalProcessor: > +# > +# @logical-id: Arbitrary guest-specific unique identifier of the VCPU.= > +# > +# @online: Whether the VCPU is enabled. > +# > +# @can-offline: Whether offlining the VCPU is possible. This member is= always > +# filled in by the guest agent when the structure is ret= urned, > +# and always ignored on input (hence it can be omitted t= hen). Other places have used the notation '#optional' when documenting a parameter that need not be present on input; although we don't have anything that strictly requires/enforces that notation. > +# > +# Since: 1.5 > +## > +{ 'type': 'GuestLogicalProcessor', > + 'data': {'logical-id': 'int', Should logical-id be 'str' instead of 'int', since we said it is arbitrary what the guest names its vcpus? Then again, integers can be made to work (even if the guest OS prefers to name cpus via strings, the agent can track a 1:1 lookup table between OS string and integer number handed over qga, perhaps even by returning an invariant pointer address of the OS string as the integer identifier), so I won't insist. > +# Returns: The length of the initial sublist that has been successfull= y > +# processed. The guest agent maximizes this value. Possible c= ases: > +# > +# 0: if the @vcpus list was empty on input. Gu= est state > +# has not been changed. Otherwise, > +# > +# Error: processing the first node of @vcpus faile= d for the > +# reason returned. Guest state has not been= changed. > +# Otherwise, > +# > + > +int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **= errp) > +{ > + error_set(errp, QERR_UNSUPPORTED); > + return -1; This returns an error even on an empty input @vcpus, while the docs said that returning 0 takes priority. But it's so much of a corner case that I don't care; always returning an error seems fine. Thus, although there are things you might change if you have to respin the series for later review comments, I'm perfectly fine leaving this as-is and you can use: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2KJVLAKCAKLOUFXDEDDMS 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.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRN8PgAAoJEKeha0olJ0NqaIIH/Rku5P7GWWsNpTDaMJnSpvu0 r9MRnUYvLITtpPjosE0+bsCSaO4WsieHkQ3bmhErYUplEChvGNdo4H8jv5/iq35b ZqaKXPBoQJnmNxJVmNjcHBuOgOJ90e6mJla0NlFerDBG6Bv4kNjI+ct+eBiokCfX 1Y0BE//o5yzlhbF7jVth4nHeJTrjYwGdjTv5mW8CUGLSvT1SqX+Gnaslm0QzdoOf j8m5WXjA2zyefs7SCRgHmKQ+49Qbkci5BU9R8olslZWHfUYoPbViqQkgGjfUgyEy hvfwJlKVIYzkPXi2hFEN7o3OBRRthU+neMrN8etv9LFNINJXSe9QpmLinUgVaHc= =4J6Z -----END PGP SIGNATURE----- ------enig2KJVLAKCAKLOUFXDEDDMS--