From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9iJi-0001m8-LK for qemu-devel@nongnu.org; Thu, 06 Sep 2012 16:04:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9iJg-0000ku-4B for qemu-devel@nongnu.org; Thu, 06 Sep 2012 16:04:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9iJf-0000kR-RI for qemu-devel@nongnu.org; Thu, 06 Sep 2012 16:04:44 -0400 From: Eduardo Habkost Date: Thu, 6 Sep 2012 17:05:34 -0300 Message-Id: <1346961939-32338-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 0/5] i386: cpu: remove duplicate feature names List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori The problem: - Some features are report at the same time on both CPUID[1].EDX and CPUID[8000_0001].EDX on AMD CPUs (e.g. fpu, tsc, msr, pae, mmx). - "-cpu ,+feature" should enable the bit only on CPUID[1] if it's not an AMD CPU, but it should enable the bit on both CPUID[1] and CPUID[8000_0001] if it's an AMD CPU. - The same should happen when implementing CPU properties: setting the property that enables a feature should set the duplicate CPUID[8000_0001].EDX bit only if CPU vendor is AMD. Reference: http://article.gmane.org/gmane.comp.emulators.qemu/166024 The solution implemented by this series is: - On the CPU model table and while parsing CPU options/properties, set the bit only on CPUID[1] (the x86_def_t.features field). - When finishing initialization of the CPU cpuid fields, duplicate those feature bits on cpuid_ext2_features if and only if the CPU vendor is AMD. This series depends on the "x86 CPU patches that didn't get into 1.2" series: http://article.gmane.org/gmane.comp.emulators.qemu/168633 Message-Id: <1346877673-9136-1-git-send-email-ehabkost@redhat.com> Eduardo Habkost (5): i386: kvm: bit 10 of CPUID[8000_0001].EDX is reserved i386: kvm: use a #define for the set of alias feature bits i386: cpu: replace EXT2_FEATURE_MASK with CPUID_EXT2_AMD_ALIASES i386: cpu: eliminate duplicate feature names i386: -cpu help: remove reference to specific CPUID leaves/registers target-i386/cpu.c | 59 +++++++++++++++++++++++++++++++++++-------------------- target-i386/cpu.h | 12 +++++++++++ target-i386/kvm.c | 2 +- 3 files changed, 51 insertions(+), 22 deletions(-) -- 1.7.11.4