From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2 v3] kvm/x86: move and fix substitue search for missing CPUID entries Date: Sun, 03 Apr 2011 15:32:16 +0300 Message-ID: <4D9868D0.80300@redhat.com> References: <4D947ED4.50407@redhat.com> <1301583529-3130-1-git-send-email-andre.przywara@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, stable@kernel.org To: Andre Przywara Return-path: Received: from mx1.redhat.com ([209.132.183.28]:64688 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752218Ab1DCMcW (ORCPT ); Sun, 3 Apr 2011 08:32:22 -0400 In-Reply-To: <1301583529-3130-1-git-send-email-andre.przywara@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/31/2011 04:58 PM, Andre Przywara wrote: > If KVM cannot find an exact match for a requested CPUID leaf, the > code will try to find the closest match instead of simply confessing > it's failure. > The implementation was meant to satisfy the CPUID specification, but > did not properly check for extended and standard leaves and also > didn't account for the index subleaf. > Beside that this rule only applies to CPUID intercepts, which is not > the only user of the kvm_find_cpuid_entry() function. > > So fix this algorithm and call it from kvm_emulate_cpuid(). > This fixes a crash of newer Linux kernels as KVM guests on > AMD Bulldozer CPUs, where bogus values were returned in response to > a CPUID intercept. > Thanks, applied and queued both for 2.6.39. -- error compiling committee.c: too many arguments to function