From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: svm: Fix erratum 383 check for 32-bit hosts Date: Wed, 26 May 2010 09:56:43 +0200 Message-ID: <4BFCD43B.7070702@web.de> References: <4BFCC995.5000303@web.de> <20100526074538.GB23190@amd.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5B7C57474B07B4BB04191B63" Cc: Avi Kivity , Marcelo Tosatti , kvm To: "Roedel, Joerg" Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:38976 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752789Ab0EZH4t (ORCPT ); Wed, 26 May 2010 03:56:49 -0400 In-Reply-To: <20100526074538.GB23190@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5B7C57474B07B4BB04191B63 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Roedel, Joerg wrote: > On Wed, May 26, 2010 at 03:11:17AM -0400, Jan Kiszka wrote: >> From: Jan Kiszka >> >> This overflow should have left the check broken behind for 32-bit host= s. >=20 > The check itself should work but it gives a compile warning for me (at > least in my small userspace test I did ;) Good catch, thanks. To my understanding, the test degraded to value !=3D 0x00010015. That may= not have the intended effect, no? Jan >=20 >> Signed-off-by: Jan Kiszka >=20 > Acked-by: Joerg Roedel >=20 >> --- >> arch/x86/kvm/svm.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c >> index 3c03c36..fd32791 100644 >> --- a/arch/x86/kvm/svm.c >> +++ b/arch/x86/kvm/svm.c >> @@ -1460,7 +1460,7 @@ static bool is_erratum_383(void) >> /* Bit 62 may or may not be set for this mce */ >> value &=3D ~(1ULL << 62); >> =20 >> - if (value !=3D 0xb600000000010015) >> + if (value !=3D 0xb600000000010015ULL) >> return false; >> =20 >> /* Clear MCi_STATUS registers */ >> --=20 >> 1.6.0.2 >> >=20 --------------enig5B7C57474B07B4BB04191B63 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.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkv81D8ACgkQitSsb3rl5xRvtQCfSL0qr8gGmg9l3j5cohl224MX rJkAoKMCz+YvmhHNbgehn0EPudwedlQ6 =ptNG -----END PGP SIGNATURE----- --------------enig5B7C57474B07B4BB04191B63--