From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU Date: Tue, 31 May 2011 08:11:21 +0200 Message-ID: <4DE48689.7070606@web.de> References: <4DE120BE.1010602@web.de> <4DE37551.6060502@siemens.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig26A9E19C1735CA58FCC33788" Cc: kvm@vger.kernel.org, KaryJin@viatech.com.cn, mst@redhat.com, mtosatti@redhat.com, BrillyWu@viatech.com.cn, qemu-devel@nongnu.org, avi@redhat.com To: BrillyWu , Blue Swirl Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig26A9E19C1735CA58FCC33788 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-05-31 03:25, BrillyWu wrote: > Hi, Jan >=20 >> patch which has >>> been checked. It can be compiled without any error and work >> normally. >>> The patch v3 is here now. >> >> The above text can't be used as a commit log, so this needs to be >> fixed. >> Moreover, your patch still contains at least on style issues >> scripts/checkpatch.pl should have caught. Are you sure you ran it? >> >=20 > I am sure I have checked it with the scripts/checkpatch.pl, and it > shows no error or warning. Maybe I should check whether my windows > editor and mail client can work well before sending it to you. I 'm > sorry. Sorry, you are right. Your patch revealed a bug in the checkpatch script.= Blue, this does not trigger the missing braces warning: @@ -1035,8 +1052,17 @@ void cpu_x86_cpuid(CPUX86State *env, uin { /* test if maximum index reached */ if (index & 0x80000000) { - if (index > env->cpuid_xlevel) - index =3D env->cpuid_level; + if (index > env->cpuid_xlevel) { + if (env->cpuid_xlevel2 > 0) { + /* Handle the Centaur's CPUID instruction. */ + if (index > env->cpuid_xlevel2) { + index =3D env->cpuid_xlevel2; + } else if (index < 0xC0000000) { + index =3D env->cpuid_xlevel; + } + } else + index =3D env->cpuid_xlevel; + } } else { if (index > env->cpuid_level) index =3D env->cpuid_level; > OK, I will use the previous commit log, and send it to you in the new t= hread. Thanks. I think it would be fair to fix up the braces on commit now. Jan --------------enig26A9E19C1735CA58FCC33788 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.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEUEARECAAYFAk3kho0ACgkQitSsb3rl5xRPuwCeJO96gLgohte0rcECjoiDMeQ7 4LYAl1C1B5ge9ASGi5LqLCR3ZQH5eME= =TKMx -----END PGP SIGNATURE----- --------------enig26A9E19C1735CA58FCC33788--