From patchwork Fri May 20 21:39:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 9130165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3B53B60762 for ; Fri, 20 May 2016 23:04:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 251E427CAF for ; Fri, 20 May 2016 23:04:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1985927E3D; Fri, 20 May 2016 23:04:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8070527CAF for ; Fri, 20 May 2016 23:04:42 +0000 (UTC) Received: from localhost ([::1]:37798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3tTE-0006tN-Dy for patchwork-qemu-devel@patchwork.kernel.org; Fri, 20 May 2016 19:04:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3t6n-0002Rn-AV for qemu-devel@nongnu.org; Fri, 20 May 2016 18:41:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3s8s-00033M-2u for qemu-devel@nongnu.org; Fri, 20 May 2016 17:39:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3s8r-000338-Qo for qemu-devel@nongnu.org; Fri, 20 May 2016 17:39:34 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F234063165; Fri, 20 May 2016 21:39:32 +0000 (UTC) Received: from localhost (vpn1-7-50.gru2.redhat.com [10.97.7.50]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4KLdVnl010609; Fri, 20 May 2016 17:39:32 -0400 Date: Fri, 20 May 2016 18:39:30 -0300 From: Eduardo Habkost To: qemu-devel@nongnu.org Message-ID: <20160520213930.GA24914@thinpad.lan.raisama.net> References: <1461744786-47643-1-git-send-email-guangrong.xiao@linux.intel.com> <20160428173443.GA24153@thinpad.lan.raisama.net> <57284774.7010401@linux.intel.com> <20160503161131.GN4457@thinpad.lan.raisama.net> <5728E374.4020809@linux.intel.com> <5728E5A7.9020709@intel.com> <57309459.8080501@redhat.com> <20160512120331.GM4457@thinpad.lan.raisama.net> <573471D6.8050102@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <573471D6.8050102@redhat.com> X-Fnord: you can see the fnord User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 20 May 2016 21:39:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [QEMU PATCH v2] target-i386: Add Skylake-Client CPU model X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yu, Fenghua" , "Yu, Yu-cheng" , Xiao Guangrong , "Xiao, Guangrong" , kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, "Lai, Paul C" , mtosatti@redhat.com, qemu-devel@nongnu.org, "Wang, Yong Y" , Dave Hansen , "Shankar, Ravi V" , imammedo@redhat.com, Paolo Bonzini , dan.j.williams@intel.com, rth@twiddle.net, "ruwang@redhat.com" , "Kasten, Robert A" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Introduce Skylake-Client CPU model, which inherits the features from Broadwell and supports some additional features that are: MPX, XSAVEC, and XGETBV1. Signed-off-by: Eduardo Habkost Signed-off-by: Xiao Guangrong Signed-off-by: Eduardo Habkost Reviewed-by: Paolo Bonzini Reviewed-by: Xiao Guangrong --- Changes v1 -> v2: * Remove XSAVES, edited commit message --- target-i386/cpu.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 895a386..9c5aabc 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1239,6 +1239,51 @@ static X86CPUDefinition builtin_x86_defs[] = { .model_id = "Intel Core Processor (Broadwell)", }, { + .name = "Skylake-Client", + .level = 0xd, + .vendor = CPUID_VENDOR_INTEL, + .family = 6, + .model = 94, + .stepping = 3, + .features[FEAT_1_EDX] = + CPUID_VME | CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX | + CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | CPUID_MCA | + CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC | CPUID_CX8 | + CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC | CPUID_PSE | + CPUID_DE | CPUID_FP87, + .features[FEAT_1_ECX] = + CPUID_EXT_AVX | CPUID_EXT_XSAVE | CPUID_EXT_AES | + CPUID_EXT_POPCNT | CPUID_EXT_X2APIC | CPUID_EXT_SSE42 | + CPUID_EXT_SSE41 | CPUID_EXT_CX16 | CPUID_EXT_SSSE3 | + CPUID_EXT_PCLMULQDQ | CPUID_EXT_SSE3 | + CPUID_EXT_TSC_DEADLINE_TIMER | CPUID_EXT_FMA | CPUID_EXT_MOVBE | + CPUID_EXT_PCID | CPUID_EXT_F16C | CPUID_EXT_RDRAND, + .features[FEAT_8000_0001_EDX] = + CPUID_EXT2_LM | CPUID_EXT2_RDTSCP | CPUID_EXT2_NX | + CPUID_EXT2_SYSCALL, + .features[FEAT_8000_0001_ECX] = + CPUID_EXT3_ABM | CPUID_EXT3_LAHF_LM | CPUID_EXT3_3DNOWPREFETCH, + .features[FEAT_7_0_EBX] = + CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 | + CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP | + CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID | + CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX | + CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_MPX, + /* Missing: XSAVES (not supported by some Linux versions, + * including v4.1 to v4.6). + * KVM doesn't yet expose any XSAVES state save component, + * and the only one defined in Skylake (processor tracing) + * probably will block migration anyway. + */ + .features[FEAT_XSAVE] = + CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XSAVEC | + CPUID_XSAVE_XGETBV1, + .features[FEAT_6_EAX] = + CPUID_6_EAX_ARAT, + .xlevel = 0x80000008, + .model_id = "Intel Core Processor (Skylake)", + }, + { .name = "Opteron_G1", .level = 5, .vendor = CPUID_VENDOR_AMD,