From patchwork Thu Jun 2 19:13:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 98479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4E14CB6FAF for ; Fri, 3 Jun 2011 05:41:19 +1000 (EST) Received: from localhost ([::1]:50223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSDlb-0001iz-Cx for incoming@patchwork.ozlabs.org; Thu, 02 Jun 2011 15:41:15 -0400 Received: from eggs.gnu.org ([140.186.70.92]:59453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSDKf-0003iG-N6 for qemu-devel@nongnu.org; Thu, 02 Jun 2011 15:13:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSDKZ-0003ca-2o for qemu-devel@nongnu.org; Thu, 02 Jun 2011 15:13:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSDKY-0003bW-Dd for qemu-devel@nongnu.org; Thu, 02 Jun 2011 15:13:18 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p52JDG5c031760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 2 Jun 2011 15:13:16 -0400 Received: from blackpad.lan.raisama.net (ovpn-113-117.phx2.redhat.com [10.3.113.117]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p52JDFXf009907; Thu, 2 Jun 2011 15:13:16 -0400 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 01E9720A67E; Thu, 2 Jun 2011 16:13:11 -0300 (BRT) From: Eduardo Habkost To: Anthony Liguori Date: Thu, 2 Jun 2011 16:13:08 -0300 Message-Id: <1307041990-26194-10-git-send-email-ehabkost@redhat.com> In-Reply-To: <1307041990-26194-1-git-send-email-ehabkost@redhat.com> References: <1307041990-26194-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [RHEL6 qemu-kvm PATCH 09/11] cpu defs: add pse36, mca, mtrr to AMD CPU definitions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch adds some missing flags to extfeature_edx, that were missing according to AMD's latest CPUID document. This is based on a previous patch from John Cooper where this was introduced with many other changes at the same time. Original John's patch submission is at Message-ID: <4DDAD5E7.2020002@redhat.com>, . Original John's patch description was: cpu model bug fixes and definition corrections This patch was intended to address the replicated feature flags in cpuid 8000_0001:edx from cpuid 0000_0001:edx. This is due to AMD's definition where these flags are mostly cloned in the 8000_0001:edx cpuid function. qemu64 attempted to glue together the respective Intel and AMD nearly disjoint features and this propagated to the new Intel models as doing so was believed conservative at the time. However after further soak and test lugging around this cruft doesn't provide any value, could conceivably confuse a guest, and has confused users trying to maintain/add cpu definitions. This also caused issues for libvirt attempting to track this mis-encoding. So we've here tossed out the AMD replicated definitions from the Intel models, added a few replications into AMD definitions which were missing according to AMD's latest CPUID document, and reordered the config file flags to follow intuitive sequential bit ordering. Also two flag name aliases were added for clarity to Intel models. The end result being the models definitions now conform to their respective cpuid specifications sans x2apic which is emulated by kvm. This was tested with the following combinations: [Conroe, Penryn, Nehalem] x [F12-64, win64, win32] -- Intel host [Opteron_G1, Opteron_G2, Opteron_G3] x [F12-64, win64, win32] -- AMD host Yielding successful boots in all cases. Signed-off-by: john cooper Signed-off-by: Eduardo Habkost --- sysconfigs/target/target-x86_64.conf | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysconfigs/target/target-x86_64.conf b/sysconfigs/target/target-x86_64.conf index d368b6c..3874ff1 100644 --- a/sysconfigs/target/target-x86_64.conf +++ b/sysconfigs/target/target-x86_64.conf @@ -51,7 +51,7 @@ stepping = "1" feature_edx = "sse2 sse fxsr mmx clflush pse36 pat cmov mca pge mtrr sep apic cx8 mce pae msr tsc pse de fpu" feature_ecx = "x2apic sse3" # x2apic kvm emulated - extfeature_edx = "lm fxsr mmx nx pat cmov pge syscall apic cx8 mce pae msr tsc pse de fpu" + extfeature_edx = "lm fxsr mmx nx pse36 pat cmov mca pge mtrr syscall apic cx8 mce pae msr tsc pse de fpu" extfeature_ecx = " " xlevel = "0x80000008" model_id = "AMD Opteron 240 (Gen 1 Class Opteron)" @@ -65,7 +65,7 @@ stepping = "1" feature_edx = "sse2 sse fxsr mmx clflush pse36 pat cmov mca pge mtrr sep apic cx8 mce pae msr tsc pse de fpu" feature_ecx = "x2apic cx16 sse3" # x2apic kvm emulated - extfeature_edx = "lm rdtscp fxsr mmx nx pat cmov pge syscall apic cx8 mce pae msr tsc pse de fpu" + extfeature_edx = "lm rdtscp fxsr mmx nx pse36 pat cmov mca pge mtrr syscall apic cx8 mce pae msr tsc pse de fpu" extfeature_ecx = "svm lahf_lm" xlevel = "0x80000008" model_id = "AMD Opteron 22xx (Gen 2 Class Opteron)" @@ -79,7 +79,7 @@ stepping = "1" feature_edx = "sse2 sse fxsr mmx clflush pse36 pat cmov mca pge mtrr sep apic cx8 mce pae msr tsc pse de fpu" feature_ecx = "popcnt x2apic cx16 monitor sse3" # x2apic kvm emulated - extfeature_edx = "lm rdtscp fxsr mmx nx pat cmov pge syscall apic cx8 mce pae msr tsc pse de fpu" + extfeature_edx = "lm rdtscp fxsr mmx nx pse36 pat cmov mca pge mtrr syscall apic cx8 mce pae msr tsc pse de fpu" extfeature_ecx = "misalignsse sse4a abm svm lahf_lm" xlevel = "0x80000008" model_id = "AMD Opteron 23xx (Gen 3 Class Opteron)"