From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYHUp-0005Cp-Le for qemu-devel@nongnu.org; Fri, 03 May 2013 11:02:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYHUn-00042d-VN for qemu-devel@nongnu.org; Fri, 03 May 2013 11:02:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYHUn-00042V-NT for qemu-devel@nongnu.org; Fri, 03 May 2013 11:02:01 -0400 Message-ID: <5183D167.9010808@redhat.com> Date: Fri, 03 May 2013 09:01:59 -0600 From: Eric Blake MIME-Version: 1.0 References: <1366657220-776-1-git-send-email-ehabkost@redhat.com> <1366657220-776-8-git-send-email-ehabkost@redhat.com> In-Reply-To: <1366657220-776-8-git-send-email-ehabkost@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2OJJOMMKSEUETBGPBAXKL" Subject: Re: [Qemu-devel] [PATCH qom-cpu 7/9] target-i386: Use FeatureWord loop on filter_features_for_kvm() 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) ------enig2OJJOMMKSEUETBGPBAXKL Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/22/2013 01:00 PM, Eduardo Habkost wrote: > Instead of open-coding the filtering code for each feature word, change= > the existing code to use the feature_word_info array, that have exactly= > the same CPUID eax/ecx/register values for each feature word. >=20 > Signed-off-by: Eduardo Habkost > --- > target-i386/cpu.c | 24 +++++++----------------- > 1 file changed, 7 insertions(+), 17 deletions(-) >=20 > + for (w =3D 0; w < FEATURE_WORDS; w++) { > + FeatureWordInfo *wi =3D &feature_word_info[w]; > + env->features[w] &=3D kvm_arch_get_supported_cpuid(s, wi->cpui= d_eax, > + wi->cpuid_= ecx, > + wi->cpuid_= reg); Indentation is unusual, but the resulting alignment is nicer than having 'wi->' flush under 's'. I would have written the call in four lines instead of 3, but that's not essential. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2OJJOMMKSEUETBGPBAXKL 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/ iQEcBAEBCAAGBQJRg9FnAAoJEKeha0olJ0NqkOAH/i93mnzDDcNUbT/suShiyyS+ Rju2QpSrc8gtyKszfZRk068q2tK1GHP/p/MrxXZlq7DR1YRGm8q0egvpj9TGwQ9P vBF4iqVi/brBeO9M6VESF6XMzJteT2bRYukhUMV0awF9Mj/75Ti9mN12jktOnN2y ZyQC5Tk9hI8mZzh2C6RttoaBi8F30k6ve8CEEU/NxtYT+njRJ1Nb4ZwBj6R+j4uf E3rYMGh5OpGWfGNJ1F+oWrvdPC6TMs1LV4YTimfUIHR1cmvHB4wwzH6bs6lLIJfk rYUoLuNwnuvzg+DW8hbde0jQqsf3a28EC72UmNCqXDXAsJN1HpvodBp8gEpFUGY= =QU5q -----END PGP SIGNATURE----- ------enig2OJJOMMKSEUETBGPBAXKL--