summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@amd.com>2011-03-31 16:58:49 +0200
committerAvi Kivity <avi@redhat.com>2011-04-06 13:15:56 +0300
commitbd22f5cfcfe8f68bf43b72daf4530cd7eedc9b7a (patch)
tree8f479fb862bd422e7cdbe8b240e1fdd4978f725b /virt
parent20800bc940af671257abc97ad362abe3c21ddd50 (diff)
downloadop-kernel-dev-bd22f5cfcfe8f68bf43b72daf4530cd7eedc9b7a.zip
op-kernel-dev-bd22f5cfcfe8f68bf43b72daf4530cd7eedc9b7a.tar.gz
KVM: move and fix substitue search for missing CPUID entries
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. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud