From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 5/6] qemu-x86: Set tsc_khz in kvm when supported Date: Fri, 05 Aug 2011 23:28:51 +0200 Message-ID: <4E3C6093.3010601@web.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0F1D8B8ECC7985F9538DC6B6" Cc: Anthony Liguori , qemu-devel@nongnu.org, kvm@vger.kernel.org, Joerg Roedel To: Marcelo Tosatti Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:54474 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751264Ab1HEV26 (ORCPT ); Fri, 5 Aug 2011 17:28:58 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0F1D8B8ECC7985F9538DC6B6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2011-08-05 22:55, Marcelo Tosatti wrote: > From: Joerg Roedel >=20 > Make use of the KVM_TSC_CONTROL feature if available. >=20 > Signed-off-by: Joerg Roedel > Signed-off-by: Marcelo Tosatti > --- > target-i386/kvm.c | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletions(-) >=20 > diff --git a/target-i386/kvm.c b/target-i386/kvm.c > index 10fb2c4..923d2d5 100644 > --- a/target-i386/kvm.c > +++ b/target-i386/kvm.c > @@ -354,6 +354,7 @@ int kvm_arch_init_vcpu(CPUState *env) > uint32_t unused; > struct kvm_cpuid_entry2 *c; > uint32_t signature[3]; > + int r; > =20 > env->cpuid_features &=3D kvm_arch_get_supported_cpuid(s, 1, 0, R_E= DX); > =20 > @@ -499,7 +500,22 @@ int kvm_arch_init_vcpu(CPUState *env) > =20 > qemu_add_vm_change_state_handler(cpu_update_state, env); > =20 > - return kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data); > + r =3D kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data); > + if (r) > + return r; Coding style... Jan --------------enig0F1D8B8ECC7985F9538DC6B6 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.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk48YJgACgkQitSsb3rl5xSTdwCfWRTo3oqDeBfCW5jhKA3SBzPj NXUAoPBlPhoqWddq2TPzEBJTnODIhAZB =0V5U -----END PGP SIGNATURE----- --------------enig0F1D8B8ECC7985F9538DC6B6-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpRwx-0002ph-No for qemu-devel@nongnu.org; Fri, 05 Aug 2011 17:29:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QpRww-0007GM-Do for qemu-devel@nongnu.org; Fri, 05 Aug 2011 17:28:59 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:54475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpRww-0007G4-2X for qemu-devel@nongnu.org; Fri, 05 Aug 2011 17:28:58 -0400 Message-ID: <4E3C6093.3010601@web.de> Date: Fri, 05 Aug 2011 23:28:51 +0200 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0F1D8B8ECC7985F9538DC6B6" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH 5/6] qemu-x86: Set tsc_khz in kvm when supported List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: Joerg Roedel , Anthony Liguori , qemu-devel@nongnu.org, kvm@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0F1D8B8ECC7985F9538DC6B6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2011-08-05 22:55, Marcelo Tosatti wrote: > From: Joerg Roedel >=20 > Make use of the KVM_TSC_CONTROL feature if available. >=20 > Signed-off-by: Joerg Roedel > Signed-off-by: Marcelo Tosatti > --- > target-i386/kvm.c | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletions(-) >=20 > diff --git a/target-i386/kvm.c b/target-i386/kvm.c > index 10fb2c4..923d2d5 100644 > --- a/target-i386/kvm.c > +++ b/target-i386/kvm.c > @@ -354,6 +354,7 @@ int kvm_arch_init_vcpu(CPUState *env) > uint32_t unused; > struct kvm_cpuid_entry2 *c; > uint32_t signature[3]; > + int r; > =20 > env->cpuid_features &=3D kvm_arch_get_supported_cpuid(s, 1, 0, R_E= DX); > =20 > @@ -499,7 +500,22 @@ int kvm_arch_init_vcpu(CPUState *env) > =20 > qemu_add_vm_change_state_handler(cpu_update_state, env); > =20 > - return kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data); > + r =3D kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data); > + if (r) > + return r; Coding style... Jan --------------enig0F1D8B8ECC7985F9538DC6B6 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.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk48YJgACgkQitSsb3rl5xSTdwCfWRTo3oqDeBfCW5jhKA3SBzPj NXUAoPBlPhoqWddq2TPzEBJTnODIhAZB =0V5U -----END PGP SIGNATURE----- --------------enig0F1D8B8ECC7985F9538DC6B6--