From patchwork Mon Aug 14 16:40:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9899727 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 16C78602CA for ; Mon, 14 Aug 2017 16:42:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0930E28420 for ; Mon, 14 Aug 2017 16:42:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1E1928429; Mon, 14 Aug 2017 16:42:19 +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 0C23228429 for ; Mon, 14 Aug 2017 16:42:18 +0000 (UTC) Received: from localhost ([::1]:33400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhIRK-0002zB-Al for patchwork-qemu-devel@patchwork.kernel.org; Mon, 14 Aug 2017 12:42:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhIPk-0002db-B2 for qemu-devel@nongnu.org; Mon, 14 Aug 2017 12:40:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhIPf-0001TR-GN for qemu-devel@nongnu.org; Mon, 14 Aug 2017 12:40:28 -0400 Received: from mail-co1nam03on0062.outbound.protection.outlook.com ([104.47.40.62]:34951 helo=NAM03-CO1-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 1dhIPf-0001S7-40 for qemu-devel@nongnu.org; Mon, 14 Aug 2017 12:40:23 -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=/+uHUCiDraWHT/gs0F4tNVSF8G+xyj+tl5kLDU7bPM0=; b=0/A/dpObyYume4uOR7udZwAJ3E7r2PPjtOrDzI+oyCBp7gnO/HMY6Sw9k5QA7giPNTWD7/ixmg3y0U0ozSiNhUZxvmQ8/1Fv+0B77jF5qX/Vj8o6TXc4KGvU5di7ghs46u3CAPKl2PoZzq4LOe6vqPQ7297gYz+nibU2H9Nyoio= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from ubuntu-010236106000.amd.com (165.204.78.1) by SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) 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 16:40:19 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Mon, 14 Aug 2017 11:40:02 -0500 Message-Id: <20170814164002.23982-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: BN6PR17CA0004.namprd17.prod.outlook.com (10.173.147.14) To SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4230a75-7083-44a9-bcf0-08d4e33326d3 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:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 3:TxATUpnuR3EbJxRHA2fjH+ef5BRxRO6/FHZOjpGtN3bDnXXjs9iFF2PqlO6GCOiJMaSjgdMcG+2TFoDqOQK/Xy0zhiJrco6Wq27W0jNSBQ/87LEkl/YleqxHFYLDWxHEU76+j8//+W6syWNYYY1rxKh+gHIL7vMZY81dN9sWTcwWL8XPU8uwyuqltihklYt+IOxdfUhrlKOmHHNqGO7ZkUOnly5meDczHWkrg/abJTlXpauU6EC958W+oWUqs0ze; 25:yWoeMbQ/1XbettxXCeYQM/nPgREpA1KrYbYM1AsWsZurRYlg1dk2GGqmPaGy8TI4sKwganvO+5XJSryhjZa6MfsEvAMgX/VWXGXDhlFjk5tCZ1PcLEyvEd0MbeTP1dRrqsINIeWo1jCbgRmg8PsINW6YAGKQshgCuZz64g+ET5fhIssWi1VSY351W3jhClckBUDmIifgdjstpX+9CM/Xzaoo3Dm7P5HyoWWCBv8AHyWToRYyON99xIha1hGt8M8dVs6bn+PjEtiOyckfdyi66ABmc8uJ4uR24yKAMk4SbVJhljmEbqVtO3aN84RjXqfLqkQcMZGaNHcM698ULileiQ==; 31:1GRs8AZN+10GZ09TSKpOs2oZ9DQrkwdTHDkDXqa4yI2ojcKCQem0NuJ0EDH8L6qLV32/DcjcxBWc/c5tR0naAyqX3UpeEZPymuKry//hLPmTPom2KYWVaCL2Q3mqH7nW1Bw84Cn1XqoiAEwNTXM+4b4sEsO2MOBbsoaLWTN91gfMUJ6cQiJ8bMz1MEa8X6IyT7mVNTjBtBK5SFHSjuAkcb21D7gz/een0kVrs4AImPM= X-MS-TrafficTypeDiagnostic: SN1PR12MB0158: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:jsCYLaGwDtQx7MgIDQZ89HjSHpQCn6UJc5embf53TPhfOOns5Lz9FYWS9TTVM1odXsNA2DAOhBmzgmk6fWRdJPGIzjNTncQ26FEiQ2gL53VLT8oXUd0AgN6ng/8Jaj3Ri1HBx0KIcePn45SgL6WV2zfnjB9aJPr9fS8sKjdjur9uO72Wa0OYDycn6WPZaTNs9DthNk2csFIuDGG9XRzcrWbaN0+IM8Ryqn4UZhq0v5BpLJiFC3utiREay4a5cto8iRL2gOrVuqVofK24rLPzF/YTGx+fd6IXcqm1W3YfFDBhPIHqS4hg03aG5J2yCAAtjyiadXGdkoLZqSmULiMV9wTJbgPY7FE6nar+mdXgWvaFyVQOnlLZHrHSfQqVGylk2IH3OhkWoLtQoZeoeQ3nTYlzTnhfUy/5Gem0ZRgO2wltodZGfSjSx2qScdL9KOwzm3x6ZLTnN6zF9tDBtYhOZfI/v8ogkjfmcYp4FYeFY/vFTJyij869qY9w3tmVjzbY; 4:sm91Qng2DVh7dfCrAv+Ur4aEOzb47sisAkJUy2gJByyDHzJUfcog6L2G7quOfFiPkXlHJXFQpkJyzZ17Xal58tvG3qM8UKC3X+ADuFQpvdj8aKADyJ2bgWUS25xr8KTdJ/Mt2n37j2Mqe0rd0qJERk6AKOnXLXizhgMqyJNucCRY/IwC4JQHn7ohr/WK29UGN2wG0mvx8LopQ93rcjPtg6JLwVmOWITyE/ktgN58DfFGAgVACZNNN0QQQvZ314Y5s+py+1OYgxC4ee8JZvuP/+6AVdNE54MMTSpgaD+HEmg= 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:SN1PR12MB0158; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR12MB0158; X-Forefront-PRVS: 039975700A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39860400002)(199003)(189002)(81166006)(81156014)(4326008)(6916009)(2351001)(6116002)(5003940100001)(48376002)(33646002)(8676002)(2361001)(50226002)(3846002)(50466002)(25786009)(97736004)(6486002)(68736007)(6666003)(36756003)(86362001)(189998001)(478600001)(2906002)(50986999)(7350300001)(53416004)(106356001)(1076002)(305945005)(105586002)(101416001)(5660300001)(47776003)(110136004)(7736002)(54906002)(53936002)(66066001)(42186005)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0158; H:ubuntu-010236106000.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; SN1PR12MB0158; 23:rJi5eN0ye+mrsDm5R1/57cOIK59ekEWf3Ft3F3i6A?= =?us-ascii?Q?yzOsImAYesU8Tq9Q+HyBeBS4B5lKqWWGLOmAUhfRKcshc9dUTbCfU6fxxVHq?= =?us-ascii?Q?SzVzxEeOqn9xTCThaGgh44tUPPgJ/QUPCr5itOLcqAnqHXNufqR2yRo3M+w8?= =?us-ascii?Q?iAAHgi8DcURLjVYEuukK51isXUUcgelGndoTH01Sr//zp/ES+gZPeXuAL/V7?= =?us-ascii?Q?cngv9fBd33f7oQ6IDCxYonftTD+ulyM5PhFLQjRtwl14cGk39CG71q8coZKV?= =?us-ascii?Q?zmD7PPbBiQ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ft-Exchange-Diagnostics: 1; SN1PR12MB0158; 6:RjUkXto0pSALu36bbO3NJYdeqdZu2PQ//W0TA8oRNT5zZQpko87QiwklghkOUM+oCnBlVB630AMFLfIgkIAeBvWUPtdEAB4OKl83XCusFpI4vJoF8sSlejHSok3JBHUjrlsGFan9m+cKkZBK9+txg7+A402Eaws0sQHsHm+yzuzOHNRSyHDPrI6QpSnz33xbqenhMhvVirR3/0i4zSJtIrrgbcrYCcLTnORZlqSRgDFBHb/R26CveEoihepgCBUqW9rXBmS/5CGDJt9yUGz7UwTs4Tj85tydE/Y7S2TZ5NEZVkAkND2NboRJSEWmf5AFdtkYNDoDuoLwumXFUz9bNQ==; 5:Cx7dh0DYAoz95PJ37RdC9vASvmi+y+BuuRkG3inG3qUrws1cmqzhXOl8eDGTqVzWbq8UcJ4hHLYQvozjgVXYSo+VCdycMLy4DAVf9dn53Cknm5ECbO24hb5QjXfID48BzxnEM7ASTFPj6of/UusXFw==; 24:dtP9Qi+Ox511hXRSi715twuZ3lHFfgFo3Lr4bDunR0IWyORjmYT/nHXI6gHunlCCBSL8H2wkZ9YFAve90ld1dKFqQLu0lpAV8/PpwZxuFW8=; 7:jgMwMKarulpXkfJnDlNkRUP3LMcEpHlDBViPZddngXDTNJ3kcSNVEgu7EHh5NkY91A/DOl1QhOpKveUAvkqIdpL9xugUOf4v60TQ2E+Wa1Qb+aUd3f4uudTB5mnR1UVEGQsaOE7QivPHwrBZggyqwmENVwrqEheforMP1IBBpKTdRfoNM6iMOQFtV18xJ/TS1ysI8BeaZgrSXTXnTS295ySq3l6N+bXZRj0kTwqpqy8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:LD5fleFhIWOxA/XCWZXbeKMTw6eWUbzjk5KBTi1rhZ3QsrEN1qKZY31/bffuSM5Lwj6DBiqI3z/gbZ+7MOYFCTCIIOxnKCVt1k1rexQ5wY2HVRZLjaVB2GjbOEb16eBZ/vh7V2AAuFZM5PVALqJPODiWjOqdz03QvJsbOVEEgPz8KUBclIJ6fm0iB51V/KJoayi6z44T0BSttR/fVOIefQuXNNW9bfW3cuAp8+S6vw6FwlzMSSBLZckFNbmuG7+E X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2017 16:40:19.4549 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0158 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.40.62 Subject: [Qemu-devel] [PATCH v2] target-i386/cpu: Add new EPYC 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 --- Changes since v1: * fix typo EYPC -> EPYC to reflect the correct branding name target/i386/cpu.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index ddc45ab..20de5fd 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 EPYC Processor", + }, }; typedef struct PropValue {