From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUNUC-0003mK-FX for qemu-devel@nongnu.org; Mon, 22 Apr 2013 16:37:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUNU8-0003zz-8u for qemu-devel@nongnu.org; Mon, 22 Apr 2013 16:37:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUNU8-0003zv-05 for qemu-devel@nongnu.org; Mon, 22 Apr 2013 16:37:12 -0400 Message-ID: <51759F72.1010009@redhat.com> Date: Mon, 22 Apr 2013 14:37:06 -0600 From: Eric Blake MIME-Version: 1.0 References: <1366657220-776-1-git-send-email-ehabkost@redhat.com> <1366657220-776-7-git-send-email-ehabkost@redhat.com> In-Reply-To: <1366657220-776-7-git-send-email-ehabkost@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2EOBCMXNRWSNKSIKOTDRV" Subject: Re: [Qemu-devel] [libvirt] [PATCH qom-cpu 6/9] target-i386: Add "feature-words" property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: libvir-list@redhat.com, Igor Mammedov , Jiri Denemark , qemu-devel@nongnu.org, =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2EOBCMXNRWSNKSIKOTDRV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/22/2013 01:00 PM, Eduardo Habkost wrote: > This property will be useful for libvirt, as libvirt already has logic > based on low-level feature bits (not feature names), so it will be > really easy to convert the current libvirt logic to something using the= > "feature-words" property. >=20 > The property will have two main use cases: > - Checking host capabilities, by checking the features of the "host" > CPU model > - Checking which features are enabled on each CPU model >=20 > Example output: >=20 > $ ./QMP/qmp --path=3D/tmp/m qom-get --path=3D/machine/unattached/devi= ce[1] --property=3Dfeature-words If I'm not mistaken, the QMP counterpart that libvirt will use is: { "execute":"qom-get", "arguments": { "path":"/machine/unattached/device[1]", "property":"feature-words" } } > item[0].cpuid-register: EDX > item[0].cpuid-input-eax: 2147483658 > item[0].features: 0 > item[1].cpuid-register: EAX > item[1].cpuid-input-eax: 1073741825 > item[1].features: 0 > item[2].cpuid-register: EDX > item[2].cpuid-input-eax: 3221225473 > item[2].features: 0 > item[3].cpuid-register: ECX > item[3].cpuid-input-eax: 2147483649 > item[3].features: 101 > item[4].cpuid-register: EDX > item[4].cpuid-input-eax: 2147483649 > item[4].features: 563346425 > item[5].cpuid-register: EBX > item[5].cpuid-input-eax: 7 > item[5].features: 0 > item[5].cpuid-input-ecx: 0 > item[6].cpuid-register: ECX > item[6].cpuid-input-eax: 1 > item[6].features: 2155880449 > item[7].cpuid-register: EDX > item[7].cpuid-input-eax: 1 > item[7].features: 126614521 And this would then be returned as a JSON array containing struct members looking like this: > +{ 'type': 'X86CPUFeatureWordInfo', > + 'data': { 'cpuid-input-eax': 'int', > + '*cpuid-input-ecx': 'int', > + 'cpuid-register': 'X86CPURegister32', > + 'features': 'int' } } Looks reasonable (and better than what we've had in the past!), although I'll let Jiri Denemark give final say on whether it meets libvirt's needs= =2E --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2EOBCMXNRWSNKSIKOTDRV 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/ iQEcBAEBCAAGBQJRdZ9yAAoJEKeha0olJ0NqhCYIAIWQ1u9aP2I9hHyM/O2nHwAB Uep1vevVCJ1clQKCofeMjqFhXF1YIMfOl8W2II6TCWexqqSDaCbFowcJM3Iwj4xm zvmR1lrBPOGEVbzpSuahsmxyF3v0AFYxNetMx86jugfvXYAMFaGpLxAP1kAzGMr0 ONKuQfeJ9qn76GSecuGzYxykjvR8o8wxM+2bpcTrvshV7eKUDH8iYWjjnzlxrVGo 3dwij2Zaf+WP0RmOMpa51o77VXd47owUXUBibHZwgUYi2w4kekBJ7WbBjm//FXgF pcoY9B9jniVcDf+r4bR15Y1ANN6+pLchLyi4f6y8JLxEN7CxV1eQLHR6bD3M9Ig= =d+XD -----END PGP SIGNATURE----- ------enig2EOBCMXNRWSNKSIKOTDRV--