From patchwork Mon Aug 14 15:52:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9899571 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 4DAA46038C for ; Mon, 14 Aug 2017 15:58:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E56728578 for ; Mon, 14 Aug 2017 15:58:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33584285F2; Mon, 14 Aug 2017 15:58:23 +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.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UPPERCASE_50_75 autolearn=ham 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 22BDF28635 for ; Mon, 14 Aug 2017 15:58:21 +0000 (UTC) Received: from localhost ([::1]:57953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhHks-0005R8-U1 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 14 Aug 2017 11:58:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhHfQ-0001VH-8P for qemu-devel@nongnu.org; Mon, 14 Aug 2017 11:52:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhHfL-0004Ei-Dz for qemu-devel@nongnu.org; Mon, 14 Aug 2017 11:52:36 -0400 Received: from mail-dm3nam03on0079.outbound.protection.outlook.com ([104.47.41.79]:29588 helo=NAM03-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dhHfL-0004EL-4F for qemu-devel@nongnu.org; Mon, 14 Aug 2017 11:52:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gSQ1m0RkWP/O5lWg6e5XDuBfJsbN1ER/W2HykommupE=; b=ZSgxAqfQtUlHfJC73XMAXpP203k808eZjZ4oU7peZb8mn77ZtSsTFdJTDKWr7Bvu0TbmZRFF09k12D3UOAcYfJTIjRSQbk8rG0aCNvl538jW4UaSYGhfgqFWJ11w1SI4IsERTgY9+s00qHyrw5Qaw3jicSHXs1rkUTmPK+s1Pl8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from ubuntu-010236106000.amd.com (165.204.78.1) by SN1PR12MB0159.namprd12.prod.outlook.com (10.162.3.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.17; Mon, 14 Aug 2017 15:52:27 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Mon, 14 Aug 2017 10:52:17 -0500 Message-Id: <20170814155217.4898-1-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: BN6PR03CA0062.namprd03.prod.outlook.com (10.173.137.24) To SN1PR12MB0159.namprd12.prod.outlook.com (10.162.3.146) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 228a29d2-ddf0-4fc3-a6e9-08d4e32c7707 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR12MB0159; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0159; 3:uMicoAa9tduPfyVfxr7//VrKHxZAmzxsvA9XNIfFrLvM4W1igN81Qs+/dPeIJpnzBjc1n6PaDLU+tNCwAiCB2Lsv22FzF1jJ9ZBzOQkyTd4AIIXBfhqMv67/dPbEi+iSWk7u69EgWFUFuOLfTr8pOflET2jkO6vxAm9pNch4eDDm7ynSyGDmcp3QlThOujMQj1lvRBtffYPO8BIuFvGI4QNiWm8BtBfSay9MvwAFZz930TW+ZzYXCoIIAyFSRoNB; 25:ZTqOrunJ/MB2lX46Vp+pZhEbIYRr7BXRbefx0ZHbTn9ldOoHKckxqH6wwmh6QPaQrT2SgX0soOpMRaijqQp9lfemfJqOFH2xzHvltEaK5N9f2fw/+yLLaXjF6CtcjsCsccAiOAxqi3CXlXgVyREUle5wFNGNvAtpN4sjNbA84HqvjO+BkBVkvOEmMBpaXYTLE1KQQWPouilfmGehOCpFvtR5UAp4kFfCh1hy7LelxWOvlZfdgQm24q6osRgW7cWAF1VUwiHetDEE7Rie8Eu576pT0MkVcyHTNHl2Z5ENPxTpJwtn/50d6/8H0O5Q6He0O6VE4fX1HmtSxZTSplz8/w==; 31:JWrVK3+Hgo2IIdSRZ3dLNr9QSbWSRa9Kut9BxHMf+s5eeeuSZbjPXOw9LC5INIeUTsz0xIL1rJZCRgTEcHb9rXC+KpYeqtGkfWeE7ygJAXqIkrMcc24+rUDM8MWsQ00mxHeaclSV5zlUL/PIhHULxsc13SmBsNg6HlKozPR0HS5SyA1FmwK7246JNkwhrDQFbghqoBUGkCRYURYdF92psB3r2+T0VyVoXD9gQdSNQjA= X-MS-TrafficTypeDiagnostic: SN1PR12MB0159: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0159; 20:2ok5tcrHYEJhLlDaJT9wssp+OWXh9fmYucs1B/4vgHnAd2m5P3ebEl1zo5ketNMRwfLaks6qo0ixWkq4tP/Cx0ehC+x14uOPxBwv06Y++PeNSS364kAkzWi6mCl9/t/qjC+c07ncolNCBvkg0Rx1pJPHMKOuI7pT2aRwts0xG+Zf5OEMVnxcu+EnBKLxTVwCXfrgdB540MCCq9jRvsF3ejGLixkb/6teM8iX1Y2TCPF3MNdjlxpEmnTK2rzp8UZnmqwUKJfV19V4211KQwoHooFY0dnzOl7RUq+NHJ3kacoOTYiU4OHB69oseCrNY0cuF1rBAYrPBbdlHMF/E8wLe0YNw9Dg0wysGGuO/CcDB1RJvIk7Sr54bfBGEcK9d+ZyQvPgjXMWM6RKZMPPQI0bPoJqMJrrl87LMfbHlwnx3fYZQeTfL1ayuaitUha5cyWfJZK+AGX+3R6BAJuQF6qRkPRc3wAutso9doIhG9VLqf8/PQKjPL5A296xiKWseKkT; 4:dBj2/AOPnPzwd9xA5y+3Q7kfv4Zizb+hgDuWABiuyFDfNIlMzif6bIc35PLEHNZfy+Bx6bEsqAtwFk3e8qj8yPg9pvWTIEGCnf5WlWhjeJvYIixAVuT/J0/9mFJWM5xHZ31cX04CTgzdl9iabJZmo18nkp0L0pTJbTil6/sQbLFJ8u6Pby+ZrbrMCDYLDNn2nW2GtDopQzpzxVG3NQoKKXvpq5snhyOyQtTQxY+dJw8Qo39e9yFw4lwRTBum8UM0opg/jE7sHVByYhWPZ1kvigvC0LfXSz2/Ow+CsaXTWT8= X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR12MB0159; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR12MB0159; X-Forefront-PRVS: 039975700A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39860400002)(189002)(199003)(36756003)(305945005)(3846002)(86362001)(7350300001)(6666003)(5003940100001)(6916009)(6486002)(110136004)(478600001)(50986999)(101416001)(6116002)(53936002)(54906002)(1076002)(81166006)(53416004)(66066001)(68736007)(81156014)(97736004)(47776003)(105586002)(33646002)(2906002)(50226002)(50466002)(48376002)(2351001)(5660300001)(2361001)(7736002)(189998001)(4326008)(8676002)(25786009)(106356001)(42186005)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0159; H:ubuntu-010236106000.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0159; 23:FMo+9vSCLq+vmMJ2JLGr+MkebYRCFIc4ZCvcFR2wg?= =?us-ascii?Q?vLmP3t1fTZToGdIAxkSTpcD4N/uJ6+uXjcsN3i+bcYS08NwMCMfmCmVxC8zt?= =?us-ascii?Q?pBh01Bx9LTzYKaJxx8kIj7a6WNRfsJ+a0IgRCKliaZ4s0SBVRhLr3UglY9eu?= =?us-ascii?Q?4icN98Rs7r7MIm9syrapQXSKuG1+35cvIo6/KTceXC9E+MoQsU7MVHOu/Oeb?= =?us-ascii?Q?rkXjY/ZWBrGujQokZijfq8JhzCLsOQbwKKt4BId4E02ww6vGRRylWTrKZ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xWf8i6ERD?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0159; 6:iRfHRWUbzEFmNzhXpfgnO+MgsgxVQr0cojqrZB2FDA+pBrrJ7CkZhk7CoC4YAEoeNG+sd2RtBUXym0Ri4tSy83duM1kz9yOuMgZvK4x5z67QGZgGB3K8EzvnfgIqX0yxLYB6mH8z1XPj4rNcFDn+4qoCrMYtoGFxc5mOzrN6EtN8SeSL0GtSBaUFh3GWCPTj5vxJTQKelKSjpf0pgx0RRIA/9Vz5B7/ACY660JgwivLBHStYVAWZTk8qzv2mX+MBuI+AVvFcA8H7eMP8a/hjdKricx7Adsml1fAUz197eqMq4zKVi7RME61fpuGseyoDoMYQKSlrS/H9Fxoowh+q5Q==; 5:jSYiBvfm17lUluCroj0hExVTymf6jNct2q7+wFL9s4Cv8MsnkBG20ZkDt41klVV9oYLecJ0Vki++N5A+k1u8hLsfAtRL50d1Q2MiiPgsCejfac7DsCQmbhYrT04asxU9At4Xt/ESFXJuXBaALnwAzw==; 24:pN8bJtrazk8Fk6I7FHCdm/y9Re8X+afXCN5FamuceeZqTPSV5zVuUFuDf5xgybI9aW9OXXTOrJYTfpdAuaWNwHmFQ0WJMeT4Ls+E0ic8fGw=; 7:FJ9fG1TlIxLuHeZmD7670hhDaH5lH+l+1QoxpPrd56+2eTatQ8z1HAGXnIjRK3q7r0DZhwH7LLFx+li0CqiRlHg88xBSbCWfO+pDkcc8odrL51FgkVT8VDcSZOgp87DNql2UJe8jgUwMeMklrfT7QTQaLtBTi43/uEk8ovSgN6I0GDhV2JcUpgJMlgojdICCpXig8A47kUnP4oWmd02q3HcKt6JH2l7LaTgxazgwA94= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0159; 20:sayF19o9QQ5wObAGuAP5j/Mp5laM4eJ9LIGG0J7VZddmzLnpUjQKBAJlGNY4mLphcUOCngG2JRx6aRQ3ZmHKOb4NrQJrPuGJZ/RQ49c3+60Z5TsT3vLZUpYajMi74XNZsSiec8I/gdSC8o3hevIQSYsKWoMLl/JSi2Qid198l97yGI0q5RJ/speouE/azz+B6EnJxQpUKXcOA1tSWvYqrHpFLSOl9s7HBiaCrftBqvtQv6vxXJtf36pxHu9mZzgy X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2017 15:52:27.5513 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0159 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.41.79 Subject: [Qemu-devel] [PATCH] target-i386/cpu: Add new EYPC 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: Paolo Bonzini , Tom Lendacky , Brijesh Singh , Eduardo Habkost , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add a new base CPU model called 'EPYC' to model processors from AMD EPYC family (which includes EPYC 76xx,75xx,74xx,73xx and 72xx). Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Tom Lendacky Signed-off-by: Brijesh Singh --- target/i386/cpu.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index ddc45ab..ed1708b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1522,6 +1522,50 @@ static X86CPUDefinition builtin_x86_defs[] = { .xlevel = 0x8000001A, .model_id = "AMD Opteron 63xx class CPU", }, + { + .name = "EPYC", + .level = 0xd, + .vendor = CPUID_VENDOR_AMD, + .family = 23, + .model = 1, + .stepping = 2, + .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_RDRAND | CPUID_EXT_F16C | CPUID_EXT_AVX | + CPUID_EXT_XSAVE | CPUID_EXT_MOVBE | CPUID_EXT_POPCNT | + CPUID_EXT_SSE42 | CPUID_EXT_SSE41 | CPUID_EXT_CX16 | + CPUID_EXT_FMA | CPUID_EXT_SSSE3 | CPUID_EXT_PCLMULQDQ | + CPUID_EXT_SSE3, + .features[FEAT_8000_0001_EDX] = + CPUID_EXT2_LM | CPUID_EXT2_RDTSCP | CPUID_EXT2_PDPE1GB | + CPUID_EXT2_FFXSR | CPUID_EXT2_MMXEXT | CPUID_EXT2_NX | + CPUID_EXT2_SYSCALL, + .features[FEAT_8000_0001_ECX] = + CPUID_EXT3_OSVW | CPUID_EXT3_3DNOWPREFETCH | + CPUID_EXT3_MISALIGNSSE | CPUID_EXT3_SSE4A | CPUID_EXT3_ABM | + CPUID_EXT3_CR8LEG | CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM, + .features[FEAT_7_0_EBX] = + CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 | CPUID_7_0_EBX_AVX2 | + CPUID_7_0_EBX_SMEP | CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_RDSEED | + CPUID_7_0_EBX_ADX | CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLFLUSHOPT | + CPUID_7_0_EBX_SHA_NI, + /* Missing: XSAVES (not supported by some Linux versions, + * including v4.1 to v4.12). + * KVM doesn't yet expose any XSAVES state save component. + */ + .features[FEAT_XSAVE] = + CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XSAVEC | + CPUID_XSAVE_XGETBV1, + .features[FEAT_6_EAX] = + CPUID_6_EAX_ARAT, + .xlevel = 0x8000001F, + .model_id = "AMD EYPC Processor", + }, }; typedef struct PropValue {