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: Sat, 28 May 2011 12:28:02 +0200 Message-ID: <4DE0CE32.5030107@web.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB40E5E1D2028A0E05AFBC096" Cc: avi@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org, mst@redhat.com, karyjin@viatech.com.cn, kvm@vger.kernel.org, "BrillyWu@viatech.com.cn" To: BrillyWu Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:32959 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751358Ab1E1K2L (ORCPT ); Sat, 28 May 2011 06:28:11 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB40E5E1D2028A0E05AFBC096 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-05-10 10:02, BrillyWu wrote: > From: BrillyWu >=20 > When KVM is running on VIA CPU with host cpu's model, the > feautures of VIA CPU will be passed into kvm guest by calling > the CPUID instruction for Centaur. >=20 > Signed-off-by: BrillyWu > Signed-off-by: KaryJin > --- > target-i386/cpu.h | 3 +++ > target-i386/cpuid.c | 46 +++++++++++++++++++++++++++++++++++++++++++= ++- > target-i386/kvm.c | 15 +++++++++++++++ > 3 files changed, 63 insertions(+), 1 deletion(-) >=20 > --- a/target-i386/cpu.h 2011-05-09 09:55:48.624885001 +0800 > +++ b/target-i386/cpu.h 2011-05-09 09:48:53.704885019 +0800 > @@ -721,6 +721,9 @@ typedef struct CPUX86State { > uint32_t cpuid_ext3_features; > uint32_t cpuid_apic_id; > int cpuid_vendor_override; > + /* Store the results of Centaur's CPUID instructions */ > + uint32_t cpuid_xlevel2; > + uint32_t cpuid_ext4_features; >=20 > /* MTRRs */ > uint64_t mtrr_fixed[11]; > --- a/target-i386/cpuid.c 2011-05-09 09:31:11.754884991 +0800 > +++ b/target-i386/cpuid.c 2011-05-09 10:18:46.204885008 +0800 > @@ -230,6 +230,9 @@ typedef struct x86_def_t { > char model_id[48]; > int vendor_override; > uint32_t flags; > + /* Store the results of Centaur's CPUID instructions */ > + uint32_t ext4_features; > + uint32_t xlevel2; > } x86_def_t; >=20 > #define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE) > @@ -522,6 +525,18 @@ static int cpu_x86_fill_host(x86_def_t * > cpu_x86_fill_model_id(x86_cpu_def->model_id); > x86_cpu_def->vendor_override =3D 0; >=20 > + /* Call Centaur's CPUID instruction. */ > + if (x86_cpu_def->vendor1 =3D=3D CPUID_VENDOR_VIA_1 && > + x86_cpu_def->vendor2 =3D=3D CPUID_VENDOR_VIA_2 && > + x86_cpu_def->vendor3 =3D=3D CPUID_VENDOR_VIA_3) { CPUID_VENDOR_VIA_* definitions in target-i386/cpu.h are missing so that this patch breaks current uq/master build. Please fix. Thanks, Jan --------------enigB40E5E1D2028A0E05AFBC096 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/ iEYEARECAAYFAk3gzjgACgkQitSsb3rl5xRJlQCaA068GaDc2bbARwCbNuRkLfnT HYEAoNgmqvPcrYIUD197gsg5V/lL9eTw =EJ6E -----END PGP SIGNATURE----- --------------enigB40E5E1D2028A0E05AFBC096-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGke-0003th-R2 for qemu-devel@nongnu.org; Sat, 28 May 2011 06:28:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQGkd-0000SX-H3 for qemu-devel@nongnu.org; Sat, 28 May 2011 06:28:12 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:32954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGkd-0000SH-5J for qemu-devel@nongnu.org; Sat, 28 May 2011 06:28:11 -0400 Message-ID: <4DE0CE32.5030107@web.de> Date: Sat, 28 May 2011 12:28:02 +0200 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB40E5E1D2028A0E05AFBC096" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: BrillyWu Cc: karyjin@viatech.com.cn, kvm@vger.kernel.org, mst@redhat.com, mtosatti@redhat.com, "BrillyWu@viatech.com.cn" , qemu-devel@nongnu.org, avi@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB40E5E1D2028A0E05AFBC096 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-05-10 10:02, BrillyWu wrote: > From: BrillyWu >=20 > When KVM is running on VIA CPU with host cpu's model, the > feautures of VIA CPU will be passed into kvm guest by calling > the CPUID instruction for Centaur. >=20 > Signed-off-by: BrillyWu > Signed-off-by: KaryJin > --- > target-i386/cpu.h | 3 +++ > target-i386/cpuid.c | 46 +++++++++++++++++++++++++++++++++++++++++++= ++- > target-i386/kvm.c | 15 +++++++++++++++ > 3 files changed, 63 insertions(+), 1 deletion(-) >=20 > --- a/target-i386/cpu.h 2011-05-09 09:55:48.624885001 +0800 > +++ b/target-i386/cpu.h 2011-05-09 09:48:53.704885019 +0800 > @@ -721,6 +721,9 @@ typedef struct CPUX86State { > uint32_t cpuid_ext3_features; > uint32_t cpuid_apic_id; > int cpuid_vendor_override; > + /* Store the results of Centaur's CPUID instructions */ > + uint32_t cpuid_xlevel2; > + uint32_t cpuid_ext4_features; >=20 > /* MTRRs */ > uint64_t mtrr_fixed[11]; > --- a/target-i386/cpuid.c 2011-05-09 09:31:11.754884991 +0800 > +++ b/target-i386/cpuid.c 2011-05-09 10:18:46.204885008 +0800 > @@ -230,6 +230,9 @@ typedef struct x86_def_t { > char model_id[48]; > int vendor_override; > uint32_t flags; > + /* Store the results of Centaur's CPUID instructions */ > + uint32_t ext4_features; > + uint32_t xlevel2; > } x86_def_t; >=20 > #define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE) > @@ -522,6 +525,18 @@ static int cpu_x86_fill_host(x86_def_t * > cpu_x86_fill_model_id(x86_cpu_def->model_id); > x86_cpu_def->vendor_override =3D 0; >=20 > + /* Call Centaur's CPUID instruction. */ > + if (x86_cpu_def->vendor1 =3D=3D CPUID_VENDOR_VIA_1 && > + x86_cpu_def->vendor2 =3D=3D CPUID_VENDOR_VIA_2 && > + x86_cpu_def->vendor3 =3D=3D CPUID_VENDOR_VIA_3) { CPUID_VENDOR_VIA_* definitions in target-i386/cpu.h are missing so that this patch breaks current uq/master build. Please fix. Thanks, Jan --------------enigB40E5E1D2028A0E05AFBC096 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/ iEYEARECAAYFAk3gzjgACgkQitSsb3rl5xRJlQCaA068GaDc2bbARwCbNuRkLfnT HYEAoNgmqvPcrYIUD197gsg5V/lL9eTw =EJ6E -----END PGP SIGNATURE----- --------------enigB40E5E1D2028A0E05AFBC096--