From patchwork Fri Jul 3 12:23:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 33905 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n63COVsN002823 for ; Fri, 3 Jul 2009 12:24:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752601AbZGCMYZ (ORCPT ); Fri, 3 Jul 2009 08:24:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752484AbZGCMYZ (ORCPT ); Fri, 3 Jul 2009 08:24:25 -0400 Received: from sg2ehsobe005.messaging.microsoft.com ([207.46.51.79]:12850 "EHLO SG2EHSOBE005.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752095AbZGCMYZ (ORCPT ); Fri, 3 Jul 2009 08:24:25 -0400 Received: from mail222-sin-R.bigfish.com (10.210.100.245) by SG2EHSOBE005.bigfish.com (10.210.112.25) with Microsoft SMTP Server id 8.1.340.0; Fri, 3 Jul 2009 12:24:27 +0000 Received: from mail222-sin (localhost.localdomain [127.0.0.1]) by mail222-sin-R.bigfish.com (Postfix) with ESMTP id 5517B4583F1; Fri, 3 Jul 2009 12:24:25 +0000 (UTC) X-SpamScore: 4 X-BigFish: VPS4(zz19c2kzz1202hzzz32i62h) X-Spam-TCS-SCL: 1:0 Received: by mail222-sin (MessageSwitch) id 1246623864378431_16023; Fri, 3 Jul 2009 12:24:24 +0000 (UCT) Received: from ausb3extmailp02.amd.com (ausb3extmailp02.amd.com [163.181.251.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail222-sin.bigfish.com (Postfix) with ESMTP id C8781F98051; Fri, 3 Jul 2009 12:24:23 +0000 (UTC) Received: from ausb3twp01.amd.com (ausb3twp01.amd.com [163.181.250.37]) by ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n63COJcY020826; Fri, 3 Jul 2009 07:24:22 -0500 X-WSS-ID: 0KM7H4C-01-RZT-01 Received: from sausexbh1.amd.com (sausexbh1.amd.com [163.181.22.101]) by ausb3twp01.amd.com (Tumbleweed MailGate 3.5.1) with ESMTP id 2F0551943FD; Fri, 3 Jul 2009 07:24:11 -0500 (CDT) Received: from sausexmb1.amd.com ([163.181.3.156]) by sausexbh1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 3 Jul 2009 07:24:18 -0500 Received: from SDRSEXMB1.amd.com ([172.20.3.116]) by sausexmb1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 3 Jul 2009 07:24:00 -0500 Received: from localhost.localdomain ([165.204.15.42]) by SDRSEXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 3 Jul 2009 14:23:50 +0200 From: Andre Przywara To: avi@redhat.com CC: kvm@vger.kernel.org, Andre Przywara Subject: [PATCH] qemu-kvm: remove "KVM misreports CPUID" hack Date: Fri, 3 Jul 2009 14:23:59 +0200 Message-ID: <1246623839-24572-1-git-send-email-andre.przywara@amd.com> X-Mailer: git-send-email 1.6.1.3 X-OriginalArrivalTime: 03 Jul 2009 12:23:50.0484 (UTC) FILETIME=[1F16E940:01C9FBD9] MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This should be no longer necessary. Effectively reverts 143eb2bd043e82bcf353cf82d33c127f06411d82. Signed-off-by: Andre Przywara --- kvm/libkvm/libkvm-x86.c | 9 --------- qemu-kvm-x86.c | 9 --------- 2 files changed, 0 insertions(+), 18 deletions(-) Hi Avi, I am not sure what caused your problem back in May when you committed this, but it seems to work without this now. I booted Win7RC 64bit and WinXP 64bit and saw no problems. Regards, Andre. diff --git a/kvm/libkvm/libkvm-x86.c b/kvm/libkvm/libkvm-x86.c index 9ca77d5..67f41b4 100644 --- a/kvm/libkvm/libkvm-x86.c +++ b/kvm/libkvm/libkvm-x86.c @@ -639,15 +639,6 @@ uint32_t kvm_get_supported_cpuid(kvm_context_t kvm, uint32_t function, int reg) break; case R_EDX: ret = cpuid->entries[i].edx; - if (function == 1) { - /* kvm misreports the following features - */ - ret |= 1 << 12; /* MTRR */ - ret |= 1 << 16; /* PAT */ - ret |= 1 << 7; /* MCE */ - ret |= 1 << 14; /* MCA */ - } - /* On Intel, kvm returns cpuid according to * the Intel spec, so add missing bits * according to the AMD spec: diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 7505380..2811665 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -649,15 +649,6 @@ uint32_t kvm_get_supported_cpuid(kvm_context_t kvm, uint32_t function, int reg) break; case R_EDX: ret = cpuid->entries[i].edx; - if (function == 1) { - /* kvm misreports the following features - */ - ret |= 1 << 12; /* MTRR */ - ret |= 1 << 16; /* PAT */ - ret |= 1 << 7; /* MCE */ - ret |= 1 << 14; /* MCA */ - } - /* On Intel, kvm returns cpuid according to * the Intel spec, so add missing bits * according to the AMD spec: