From nobody Thu Sep 18 20:25:28 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1670010488; cv=pass; d=zohomail.com; s=zohoarc; b=gZLBQSCmpiZ3b8W+jQyWECEQgB0WDvvywKr/81W+8b9UdF4HZm3aQ9DMMRlrlhGpEBQWHaIiIyZ9s+6fLhPnMbf6l1+9+jqtpO/v7KEHF5/2PZV+prP6cGgflUZ46/T5SPHlPKCGIwbkkUq5z6Oj/jirzO7Y/WZZ2v7mvdvBL7E= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670010488; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=O31LoqzLfvFT2tyv7MtdI8A4EHqOcGXJc8f7sSCGyxw=; b=Y8lX8SFAKs6vOTborC8nFPGif4nXpXyIViScGL6h7kQXkExWyjoosqVAAoKVpJavf4q9SKeOL4eUL8QWsg16CJjBI2fKWjARAxsN/44tTCkFr0jFz6vozS5vqh1GftohsPOO+YHaDL1wHz+/Iby/jXCXfBqE+oVeYHQf24MD7oc= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1670010488611391.0995609262461; Fri, 2 Dec 2022 11:48:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1C0O-0002XL-VD; Fri, 02 Dec 2022 14:47:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1C0M-0002Wx-GM for qemu-devel@nongnu.org; Fri, 02 Dec 2022 14:47:26 -0500 Received: from mail-bn8nam12on2062e.outbound.protection.outlook.com ([2a01:111:f400:fe5b::62e] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1C0K-0004dR-E1 for qemu-devel@nongnu.org; Fri, 02 Dec 2022 14:47:26 -0500 Received: from DS7PR05CA0013.namprd05.prod.outlook.com (2603:10b6:5:3b9::18) by DM4PR12MB6349.namprd12.prod.outlook.com (2603:10b6:8:a4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Fri, 2 Dec 2022 19:47:20 +0000 Received: from CY4PEPF0000B8EF.namprd05.prod.outlook.com (2603:10b6:5:3b9:cafe::4d) by DS7PR05CA0013.outlook.office365.com (2603:10b6:5:3b9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5901.8 via Frontend Transport; Fri, 2 Dec 2022 19:47:20 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000B8EF.mail.protection.outlook.com (10.167.241.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5813.11 via Frontend Transport; Fri, 2 Dec 2022 19:47:20 +0000 Received: from [127.0.1.1] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 2 Dec 2022 13:47:18 -0600 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VDvk6hnO37ctA5Zb6/PqjdREASoxKtecQ4iDqESsmKhrZC92bykaqLrpFlsfuV6VPJWvRJtD3VDprLPHKFF5C4r99Kr+RMk12QujJlQ04j8Q2C2adJoeEnQ4/t1X9i57jng7jJDbgb0wmuoQT727UzxI9mtB3+m8uQeLVhgZ6BETkpGX6s7zUT7qx3a7xgSURmnjhTqYM28xhkmBrg1QZvfqi0QYv42hwW1D/YJU0Y8Fp3dJUpbaufVfspyRCM7X904Oqbakiyq4T2R810znfxTYh9+CwLjx7vCodLGNWjKKH9SnIaKAYKiMsjkeAG/pzbzjE1m9clFf4UcpaZxhmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O31LoqzLfvFT2tyv7MtdI8A4EHqOcGXJc8f7sSCGyxw=; b=CXoIrpIv0mYLFEM2Oh75aHiLpOqaZKYwYVXi3lTA8MQhFXWArZ3Rj91lAYqH/OGgT5k6xzJI8s+bVV+qISdryfDwWltM7l48JuIOWLG+X6LGj5uxEHT3+lpT38WdYrshoHAyQvp8nFU10V3xAeBzSiqetxxDERwqk5ZouOTgKiVKvRD3i/keDjW0nRgOUOMzQgN30gzWTOal1g8zNK4Le/mIMMduMh9/E1TNya+2zbzHB78C4aDuHuskRTWW8elPX/tv/np6suop6IIpcnJyKUjBXrntOoB23c7OhKPxZqE9HHUcs5aT6nvOYwSRj3+eZou/015UuD3ERfReacereg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O31LoqzLfvFT2tyv7MtdI8A4EHqOcGXJc8f7sSCGyxw=; b=OUC9w7hEywSMGe6zZDp6xCnriihouiZJ/Kz6vJJjJv5n3h1Y3s5k7VPC9ew0yDgARkm4+CUJlNOw8zebeU1GN/xBiJHJMZ7PB+ChQYUAZqDtDbofXCkh3+ONyuzSv73yzwy29TH1+jGF/j9Fy7n5UpZqHI6ECc9PuZxDpqPn9vQ= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Subject: [PATCH 2/5] target/i386: Add new EPYC CPU versions with updated cache_info From: Babu Moger To: CC: , , , , , , , , , , BCC: , Date: Fri, 2 Dec 2022 13:47:18 -0600 Message-ID: <167001043837.62456.11154289019185424380.stgit@bmoger-ubuntu> In-Reply-To: <167001034454.62456.7111414518087569436.stgit@bmoger-ubuntu> References: <167001034454.62456.7111414518087569436.stgit@bmoger-ubuntu> User-Agent: StGit/1.1.dev103+g5369f4c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000B8EF:EE_|DM4PR12MB6349:EE_ X-MS-Office365-Filtering-Correlation-Id: c40f2448-bc2a-48b8-70c1-08dad49e067f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4G+8PJGKLlRrdWDK2B8N/zYTS6XOz2N8k3A+HyT9yZKkW4AHIYZpY05St+d+E9NprP5mKe1SM+/OQ6yJ2u1rvDy0gOD6rj6J+jQ+FkRb/IHjMCG+lzA2leupnRcCdJJvBJMbw3kEo1um3m4+1X4CloTtwklOylb6ZX84SFQIoNcTeGNTdi+DaKOr15O6nSowFdBARyRkbfZHPXZG4gOZPNotiCguoR0WTiAp6v+KAza+kuLoRVV5fmGU4EUnM+6OQMKUhlAOSP3/9q0P9iZapT4+BN8LgRoarMfLK8fLJKj6CQ0GaIdNDkUJevuaAimu8VGg+/OyQBKhai6rF/nwymKQ63Y6PHQRLhbrebFx+Q8pNECfANLA1/5/0ORmEZ36gjE18QEAs13X9hoKj4lPwKI6uYAaRH2Kg35+g6n09CyY9fiUm1xf+buoWkDQF/6sIKOKitNlk3YyNQ1nMWt1Dlpjp7cktbBaP7GZMxxXDQ2pypDxYC8pIVC4RkJZzbadZRCfacdSdG9F3Rr1VvKixBpCvIF4HAAlfO3qX19JW8FsaMOAbcYy/EuMgstilamhl27wBLfOC/xZJi312WjOa+zIxogK+vPreBN5vEweDG884ZKwepq9sSdimAgYhCaHosqNZVPhVGaZozU4FMPFNyEaDrixmU06kMCQwnMaHJnqIqyoh269MIZV1w++VLeeM2r0fq+o3zNdakYa/IZSKOcq6tX4IQEvD33EZrblO36LdgbAD9PXXypcu67SG4vQ X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(7916004)(346002)(39860400002)(136003)(376002)(396003)(451199015)(40470700004)(46966006)(36840700001)(8936002)(4326008)(8676002)(86362001)(40460700003)(15650500001)(2906002)(70206006)(82740400003)(7416002)(5660300002)(82310400005)(103116003)(186003)(47076005)(36860700001)(336012)(16526019)(70586007)(426003)(33716001)(356005)(16576012)(83380400001)(6916009)(316002)(81166007)(54906003)(26005)(478600001)(40480700001)(41300700001)(9686003)(44832011)(71626007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2022 19:47:20.4189 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c40f2448-bc2a-48b8-70c1-08dad49e067f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000B8EF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6349 Received-SPF: softfail client-ip=2a01:111:f400:fe5b::62e; envelope-from=Babu.Moger@amd.com; helo=NAM12-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1670010489343100001 From: Michael Roth Introduce new EPYC cpu versions: EPYC-v4 and EPYC-Rome-v3. The only difference vs. older models is an updated cache_info with the 'complex_indexing' bit unset, since this bit is not currently defined for AMD and may cause problems should it be used for something else in the future. Setting this bit will also cause CPUID validation failures when running SEV-SNP guests. Signed-off-by: Michael Roth Signed-off-by: Babu Moger --- target/i386/cpu.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 118 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index b0f1d4618e..81918e10ba 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1705,6 +1705,56 @@ static const CPUCaches epyc_cache_info =3D { }, }; =20 +static CPUCaches epyc_v4_cache_info =3D { + .l1d_cache =3D &(CPUCacheInfo) { + .type =3D DATA_CACHE, + .level =3D 1, + .size =3D 32 * KiB, + .line_size =3D 64, + .associativity =3D 8, + .partitions =3D 1, + .sets =3D 64, + .lines_per_tag =3D 1, + .self_init =3D 1, + .no_invd_sharing =3D true, + }, + .l1i_cache =3D &(CPUCacheInfo) { + .type =3D INSTRUCTION_CACHE, + .level =3D 1, + .size =3D 64 * KiB, + .line_size =3D 64, + .associativity =3D 4, + .partitions =3D 1, + .sets =3D 256, + .lines_per_tag =3D 1, + .self_init =3D 1, + .no_invd_sharing =3D true, + }, + .l2_cache =3D &(CPUCacheInfo) { + .type =3D UNIFIED_CACHE, + .level =3D 2, + .size =3D 512 * KiB, + .line_size =3D 64, + .associativity =3D 8, + .partitions =3D 1, + .sets =3D 1024, + .lines_per_tag =3D 1, + }, + .l3_cache =3D &(CPUCacheInfo) { + .type =3D UNIFIED_CACHE, + .level =3D 3, + .size =3D 8 * MiB, + .line_size =3D 64, + .associativity =3D 16, + .partitions =3D 1, + .sets =3D 8192, + .lines_per_tag =3D 1, + .self_init =3D true, + .inclusive =3D true, + .complex_indexing =3D false, + }, +}; + static const CPUCaches epyc_rome_cache_info =3D { .l1d_cache =3D &(CPUCacheInfo) { .type =3D DATA_CACHE, @@ -1755,6 +1805,56 @@ static const CPUCaches epyc_rome_cache_info =3D { }, }; =20 +static const CPUCaches epyc_rome_v3_cache_info =3D { + .l1d_cache =3D &(CPUCacheInfo) { + .type =3D DATA_CACHE, + .level =3D 1, + .size =3D 32 * KiB, + .line_size =3D 64, + .associativity =3D 8, + .partitions =3D 1, + .sets =3D 64, + .lines_per_tag =3D 1, + .self_init =3D 1, + .no_invd_sharing =3D true, + }, + .l1i_cache =3D &(CPUCacheInfo) { + .type =3D INSTRUCTION_CACHE, + .level =3D 1, + .size =3D 32 * KiB, + .line_size =3D 64, + .associativity =3D 8, + .partitions =3D 1, + .sets =3D 64, + .lines_per_tag =3D 1, + .self_init =3D 1, + .no_invd_sharing =3D true, + }, + .l2_cache =3D &(CPUCacheInfo) { + .type =3D UNIFIED_CACHE, + .level =3D 2, + .size =3D 512 * KiB, + .line_size =3D 64, + .associativity =3D 8, + .partitions =3D 1, + .sets =3D 1024, + .lines_per_tag =3D 1, + }, + .l3_cache =3D &(CPUCacheInfo) { + .type =3D UNIFIED_CACHE, + .level =3D 3, + .size =3D 16 * MiB, + .line_size =3D 64, + .associativity =3D 16, + .partitions =3D 1, + .sets =3D 16384, + .lines_per_tag =3D 1, + .self_init =3D true, + .inclusive =3D true, + .complex_indexing =3D false, + }, +}; + static const CPUCaches epyc_milan_cache_info =3D { .l1d_cache =3D &(CPUCacheInfo) { .type =3D DATA_CACHE, @@ -3960,6 +4060,15 @@ static const X86CPUDefinition builtin_x86_defs[] =3D= { { /* end of list */ } } }, + { + .version =3D 4, + .props =3D (PropValue[]) { + { "model-id", + "AMD EPYC-v4 Processor" }, + { /* end of list */ } + }, + .cache_info =3D &epyc_v4_cache_info + }, { /* end of list */ } } }, @@ -4079,6 +4188,15 @@ static const X86CPUDefinition builtin_x86_defs[] =3D= { { /* end of list */ } } }, + { + .version =3D 3, + .props =3D (PropValue[]) { + { "model-id", + "AMD EPYC-Rome-v3 Processor" }, + { /* end of list */ } + }, + .cache_info =3D &epyc_rome_v3_cache_info + }, { /* end of list */ } } },