From patchwork Thu Oct 24 22:18:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 13849786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6FE4ED10388 for ; Thu, 24 Oct 2024 22:19:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t46AN-0006cF-QF; Thu, 24 Oct 2024 18:18:51 -0400 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 1t46AK-0006c3-Ue for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:18:49 -0400 Received: from mail-bn1nam02on2060b.outbound.protection.outlook.com ([2a01:111:f403:2407::60b] helo=NAM02-BN1-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 1t46AI-0002S2-Mw for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:18:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dJ++OFrgydUXfAOX/oNCgsae2YKGF9+uNfutk8V6CGW/Lh3Mx2GC0IJ5vVdR00iZlKVjeNLvnggRmV8aah2rS5QWOeLKcBc5MS9VeHau72Zl0HMdrXYC6WAYp07z/6q/F34nmF1R48lLQbxEvRJFqGiamhA18Xim7TQ/jNgfyTrt1Jj0tgGmO7Zr39m3lBcQTOMoNB34AIx3gF513TFXi+ZdAr0ZW511LVXb98V4NKNhnt2OB4KZ4T5duOko73dRyekAjavWj2MZ3WjEEx5VZ+mRB8/cf3MkryX3k2t4F/X2XFt/xA3YWQyEvEa3wbF6xscobmPD/pUisqHrxVERSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=rmiIcjcjIW4/tzY0k7YnP/2MehBjhH7SA3zxM77lgwk=; b=YAR0yCMJUn1DMIK6hsth0KnIwVVHE8gv02HqCE4hiYwcphiLmo6DLfwrR3e3FfDQWLBSpbBoUhJIucUZjAsvfCS4q+YUDbzuhWs5PbsIoyw3TEzy1jBXcsutHSstlghwidScVnYcVR9cC2Rjnol/e6R8dcwg0AQe8eEemxuhljGzHfK160c7uwp3NIj9CuEMKsQZiRJGuD7pbmsCWXBcSnfQOlaUaPaCtDh1oW4atjIRx5gvyXFjN4+3BRW/714UMGoBngeKg0ZXtMZZed/924m/XQlAjW3AuTpG6KXm81bTiUfx7LudYniaNLUZsFQ/W7eOo+P4v/W1mrdjERRkQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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 (0) 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=rmiIcjcjIW4/tzY0k7YnP/2MehBjhH7SA3zxM77lgwk=; b=itIlbqewLrC56idmEfpVlDFGPH1mwWIf3JhlwmEbzOUFTU7dV4om5PSTzilXgVqIFmGrj3yFrXWP+nh7utc2t+VsUaURYhEaDfYJWXlkBFJ9hUW4+2lNwfHh9c7zcsLo1oGNJ6q9FxqYV5bXXmYBGOA4O02vYMQKBm8dbBJoMwk= Received: from BN9PR03CA0792.namprd03.prod.outlook.com (2603:10b6:408:13f::17) by DS7PR12MB5888.namprd12.prod.outlook.com (2603:10b6:8:7b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.27; Thu, 24 Oct 2024 22:18:38 +0000 Received: from BN2PEPF000055E1.namprd21.prod.outlook.com (2603:10b6:408:13f:cafe::48) by BN9PR03CA0792.outlook.office365.com (2603:10b6:408:13f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.18 via Frontend Transport; Thu, 24 Oct 2024 22:18:38 +0000 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 (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 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055E1.mail.protection.outlook.com (10.167.245.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8114.2 via Frontend Transport; Thu, 24 Oct 2024 22:18:38 +0000 Received: from bmoger-ubuntu.amd.com (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.2507.39; Thu, 24 Oct 2024 17:18:38 -0500 From: Babu Moger To: CC: , Subject: [PATCH v3 1/7] target/i386: Fix minor typo in NO_NESTED_DATA_BP feature bit Date: Thu, 24 Oct 2024 17:18:19 -0500 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055E1:EE_|DS7PR12MB5888:EE_ X-MS-Office365-Filtering-Correlation-Id: 308b0fd6-8453-4733-b1e0-08dcf479cf71 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: yBfvPWMGYaVRxmPGU2d+AReor1D8HwgKCJt9InWgg6y0Os7nKlL5u9XcQO2CtHDxCSRCvcoaPoLD/49y6ql+IDC3lF3p048UoOGrqJXK9URJ8WQZSZ2OZ+HAB865cuowMftLRzPrTLscCyU6mmEuzQnkr5KmlJdG4Wz43g5JVQlxm8XGoj2cLKXTsP5kBwQg36o34vssoXyWU4lA+ncWL5nsMgOU1F2mqG2GpUCaqk6pgebkgk33BqIu8roilc5WowGMYCsrVHQLgUyyJhcOkES/kiiJKt4kH9WXMr7BK/eEB4SX6zcDbEoikqQ4a10sAbZpZFU258/D2EtM+Zosp1TUNCvfs7XV7KIp8TFW5JX5TpAOTM1mJcT8adbaqxcPMYr/vUCCcw3IPU4ZjNYC90+IOYsu4xxF6bZq3/jHKrEOfXI0NcQVb5hFkn2RSeaDPKdoDFPn7NVWUGUd2yhni0UfbulSfclwzSKs2TFRloaauQOU1AuDcXLbqxkxd87jf2ZofP93mAO4ukRNHUMGN8tn5/T6xlC4SklbbRG6S2zsUd4Psy9hVCKM/3lH29phK/EhJ0xrMfArZ/H5PMeCzKV3wuC9kcB/ZRTx5bpqSt0tp+kNHR6Kr1ruFaSkTIMMcZfpW4Sdq62BttXr4rh7E8/qROwH1FpQzkv+jJtrbYtF6/M9KXLs9xTCd32UgLTZbVEvPPdmvQCYknjQ8bFDTxjKuxOmC6jNlLivA3UDs+lJUUpd4UtriyfRrwiPu+ZRKBfC3byReGNsjZxxkTP5ccHBmDzUoEoAYSc9MMXqERBekZ5rkrDvO1Fis1mOTBRF6ExGXiSXn1xqsn8w1aXgy/6LwqpNnCxJZF2nMaqp2DzJwVnyVxh54WEZYGctbdQhOT2TMasJJAdTgeNNoT/eyI1t2urvPmu+JCzZxCQKORv/E9K74wQlJy6rFzjOHVlHai9FGyqUw8JQ6ywoTqdZARjIG3TAx47H9L82iCE40kYwz7h280paB8Hc2qbmDmDIAf8yN/A4XkR28G5PkWi/0PTfrYCF6I6+/olrU2dR6vei7BfLcILiAIVTgLJ3q7dOgzWdIa0xccFBdXkbrSCp4v5tmgfMROtr090VFuTnJ9kK2cU+yZ+tctqJf7/9p7AceGaosHPbtvhSMj2KeBKOMU7yhIB5mTzbJumwN4jKiXfZK71aXXD3QEQwx8T0mHO18VdLwA1a2Z68toSkvSNOLBn3VWmQKl8hAZlwlW6xDhTgYJ+lidD1Sv0I7UEsvPzEUqV5LlYS2x2mf/XxvQ4q0fpJeJIJKPD0Fjxnf5146mTHBejDyhNrmaSv1DWXzAXC0t3kWxDqLDJNO8bJ9Gro6+dvqSeRVBxLjri+rUarPwPmE3KLox+v17YB9z/ZIwdW3COhIANGsDp8muHgqRK4TQ== 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:(13230040)(36860700013)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 22:18:38.7697 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 308b0fd6-8453-4733-b1e0-08dcf479cf71 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: BN2PEPF000055E1.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5888 Received-SPF: permerror client-ip=2a01:111:f403:2407::60b; envelope-from=Babu.Moger@amd.com; helo=NAM02-BN1-obe.outbound.protection.outlook.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.263, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Rename CPUID_8000_0021_EAX_No_NESTED_DATA_BP to CPUID_8000_0021_EAX_NO_NESTED_DATA_BP. No functional change intended. Signed-off-by: Babu Moger Reviewed-by: Zhao Liu --- v3: New patch. --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 1ff1af032e..94faff83cd 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5226,7 +5226,7 @@ static const X86CPUDefinition builtin_x86_defs[] = { CPUID_8000_0008_EBX_STIBP_ALWAYS_ON | CPUID_8000_0008_EBX_AMD_SSBD | CPUID_8000_0008_EBX_AMD_PSFD, .features[FEAT_8000_0021_EAX] = - CPUID_8000_0021_EAX_No_NESTED_DATA_BP | + CPUID_8000_0021_EAX_NO_NESTED_DATA_BP | CPUID_8000_0021_EAX_LFENCE_ALWAYS_SERIALIZING | CPUID_8000_0021_EAX_NULL_SEL_CLR_BASE | CPUID_8000_0021_EAX_AUTO_IBRS, diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 74886d1580..9eb45faa65 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1014,7 +1014,7 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w); #define CPUID_8000_0008_EBX_AMD_PSFD (1U << 28) /* Processor ignores nested data breakpoints */ -#define CPUID_8000_0021_EAX_No_NESTED_DATA_BP (1U << 0) +#define CPUID_8000_0021_EAX_NO_NESTED_DATA_BP (1U << 0) /* LFENCE is always serializing */ #define CPUID_8000_0021_EAX_LFENCE_ALWAYS_SERIALIZING (1U << 2) /* Null Selector Clears Base */ From patchwork Thu Oct 24 22:18:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 13849789 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4AD2D1038E for ; Thu, 24 Oct 2024 22:19:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t46AZ-0006e2-D9; Thu, 24 Oct 2024 18:19:03 -0400 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 1t46AT-0006de-GS for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:18:57 -0400 Received: from mail-bn1nam02on20609.outbound.protection.outlook.com ([2a01:111:f403:2407::609] helo=NAM02-BN1-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 1t46AP-0002SS-4Q for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:18:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PyXYGVgLSIMtvDDaTkXkkYab6AKPVEkFcAAtuDGbMu2nBuPpwEjq9pyA90SeNvxxljgUA+PKb+spkIMFCIzeKt7nrql1nwY3FyISJWnSjgY83hV2Ijchi7r+FixF96u4ITHiHGqY0nMgnd3PvtXdAco38msF0bsiYF5uduRPJiiKIxRfXNeS943J+tmmEL36Rac6Q9LZdfTehXj/XpyXCM2HdsMsKTdBm0kW/dZEx5tZW8mJjpP4yltCVxo91intAKZ4biD3V0HdlnIpLrfUMN71GtmRTLSsZkv/vXJ5FxLb4Hz92tFgFuUCmNHY8rcoG5FCrHCKMvAGK6B4NyxnlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=EJxL3D/CIS42ofcUAq4sOG7znmn3Ca0nIeSCEzAQcR8=; b=Lg+fnF30Kf4bIQO5O6M3fu8CH8ChRDit39yldSvwuQyugszuFqjVEeYxQBW9CMtVWGrA0ljxeusHBCybBU6ggyzr6xsLtdDd5f0sIzUfvCxbyWj0dru6TQH528KBo4YdoatFag1hJSsUXnfMetOSGtgaxjYpxaYPW8byGBqRM85hUU4/rP5/o2K8+TbSmcei/puZiIOznwQzh8laH/VtxizPdBiddK+5bE82YCoTC3b1n2ujF5QGhXz/oq390OAcudQ++dUevwTZ1Jd8U3VrSybuZjgyVyLmeg7+rrsnGQo3XbWnS/+0YUmFvnSy9gu8PDzwj96YBiWbpHF9UfVNgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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 (0) 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=EJxL3D/CIS42ofcUAq4sOG7znmn3Ca0nIeSCEzAQcR8=; b=ScWtA/WYZWFxlglA6c1fJsmBJJa2BNsqsWgzofjJhkJzkW/unZrvxVfkuFMbAoFA1wMscj/QzmEIqVHIm3pd253ENEzCxflWLeq3I96jt74plx/QROPn4wEJJ5KMeOX3qnbwl2iAmYaeuPuimqr2ZN5bmWdIQD2InEjM54/SJUc= Received: from BN9PR03CA0906.namprd03.prod.outlook.com (2603:10b6:408:107::11) by MN0PR12MB6152.namprd12.prod.outlook.com (2603:10b6:208:3c4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 22:18:46 +0000 Received: from BN2PEPF000055DC.namprd21.prod.outlook.com (2603:10b6:408:107:cafe::6e) by BN9PR03CA0906.outlook.office365.com (2603:10b6:408:107::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.18 via Frontend Transport; Thu, 24 Oct 2024 22:18:45 +0000 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 (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 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DC.mail.protection.outlook.com (10.167.245.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8114.2 via Frontend Transport; Thu, 24 Oct 2024 22:18:45 +0000 Received: from bmoger-ubuntu.amd.com (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.2507.39; Thu, 24 Oct 2024 17:18:45 -0500 From: Babu Moger To: CC: , Subject: [PATCH v3 2/7] target/i386: Add RAS feature bits on EPYC CPU models Date: Thu, 24 Oct 2024 17:18:20 -0500 Message-ID: <63d01f172cabd5a7741434fb923ed7e1447776ee.1729807947.git.babu.moger@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DC:EE_|MN0PR12MB6152:EE_ X-MS-Office365-Filtering-Correlation-Id: fb4b7468-c2a0-419e-89f1-08dcf479d392 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: UsBrU5YkdhYury1W3E465AD8PcG1I9G6hOQNx0hWK5On/hdpcpuFGNlHhP5h7wBG+jdoLVZj3hTpFgrYgrrk9lD1h/5Qkh0FOc8I9ZWqwcTvg3NcTQdY1EJ9aAFPAMnB8wLCmysH87KbXqHduFW1+DQzQiUhE1OGUfp3W1PcU1ugpyOeVOq8Wr/AT2MaD96RO323ZmqDTtj0i1rOvYRIqMua6O5OS7gjP/2aQzpbj/FQ19pY7E1MAA4IHmxVfMuD6yFmiLLx7EGgAZxC/V1l9Wnhc8+4+85/uRPCX1EJA0NTFUAjNtfbbZAoEeC24E8Y4NC8lNFYc57Od+yt1MqkcGyrjjqRtiKkIYls5zmJvm3m96EMOh4aAIgmjVVZgTypv5cTM5Bp6aVict1mckjaeww3vTIPCJDUdwGgy6OnBDySj3VhhCvepqtGZQHExoVPUvyg7SLO8nKMKem1hrs/qeQWNmbapv4KgOD9rR0Tl+Jg4InHXumKJ8aExJuXbPRIKB7a8WILPug9UKkvFvjLx2XXgjEvSTcYHUS9ZS3Y9Vv4RUNS1qMBH+3nE8TOcUFMjL6VyhqvfMjgK/kfArfZ9bEcHVA2/f2uAhVHPjZTbqaZOjH1TmmrNzLVOLo+iotE7Bs+bsGEoJ1xwpUfe6Ei2tTADWfFkCWPtnu95BT7d3+KZfSOajtK5eUGbcL7rezMy4F+jzatRdXyK1luPPY0mA73e97ITwWERAF4+q8fH2qi7ScnZYr+gGSJFdEV/HEsBvyAheA/oSxU+DoyN6p8gJzisLN3bnA2g06ZPqEjONi5jsYcB3DLB+AuN4o6NEWlmrIX6hRf8mlUqrp/ZqlCQ1q6NlZsPxlSpFPujalBeDJh3JBkirg4HAWOwUaHf6hFPVZJ98+UlsLEVni5Svez6JvRQkdhmQ8XpkzrdPaN+9emAfj//648dGT5TSkEf0Iikb9wXWS0XFqd7BvQMiiPm9NLK2xBK1nyVvyU+q9yJvz5npCFvrFdRKLEPMd0IIoBhEf5DO2WpK+6vSmFT0FViHiM+qxGfv7vS2/VAO68+fe/OmmQRv89/4nK/uEDZCdf/VNgKJTx5ebPsOMyu2gUxe8aeh1TBpPXPM1S5p+GbYhROamoJAJKp2/G14VPaXtjAQ1oLrnLsdZtvD6kgqg4B7obLYWl0G+u63LvfWMRot4NlWvm1Yqw4aYzsu6mJhTSwx1+/epgragfcUEvX1uOZU+ARjjLI8VkKTh6UIrlC4YO5fyJ856GlEqM65tOFI715i+Z2bLr79n76686V7rCw2ssC+V/VBvbBLYbCd4fgp2Am+L22UTL3m+czx/qrSzgr9/Y8pPhzPVfowkBkCLfHpsrvBarLOOnnAmTCgKiI9iJ+W+XoztQ2i49u7DHJ6IsNLXldgdqT8LDiq0N8yrOBw== 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:(13230040)(82310400026)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 22:18:45.6959 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb4b7468-c2a0-419e-89f1-08dcf479d392 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: BN2PEPF000055DC.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6152 Received-SPF: permerror client-ip=2a01:111:f403:2407::609; envelope-from=Babu.Moger@amd.com; helo=NAM02-BN1-obe.outbound.protection.outlook.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.263, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Add the support for following RAS features bits on AMD guests. SUCCOR: Software uncorrectable error containment and recovery capability. The processor supports software containment of uncorrectable errors through context synchronizing data poisoning and deferred error interrupts. McaOverflowRecov: MCA overflow recovery support. Reviewed-by: Zhao Liu Signed-off-by: Babu Moger --- v3: No changes v2: Added reviewed by from Zhao. --- target/i386/cpu.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 94faff83cd..e88859056a 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4974,6 +4974,16 @@ static const X86CPUDefinition builtin_x86_defs[] = { }, .cache_info = &epyc_v4_cache_info }, + { + .version = 5, + .props = (PropValue[]) { + { "overflow-recov", "on" }, + { "succor", "on" }, + { "model-id", + "AMD EPYC-v5 Processor" }, + { /* end of list */ } + }, + }, { /* end of list */ } } }, @@ -5112,6 +5122,16 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ } }, }, + { + .version = 5, + .props = (PropValue[]) { + { "overflow-recov", "on" }, + { "succor", "on" }, + { "model-id", + "AMD EPYC-Rome-v5 Processor" }, + { /* end of list */ } + }, + }, { /* end of list */ } } }, @@ -5187,6 +5207,16 @@ static const X86CPUDefinition builtin_x86_defs[] = { }, .cache_info = &epyc_milan_v2_cache_info }, + { + .version = 3, + .props = (PropValue[]) { + { "overflow-recov", "on" }, + { "succor", "on" }, + { "model-id", + "AMD EPYC-Milan-v3 Processor" }, + { /* end of list */ } + }, + }, { /* end of list */ } } }, From patchwork Thu Oct 24 22:18:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 13849787 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9FFCAD1038D for ; Thu, 24 Oct 2024 22:19:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t46Ah-0006ew-HL; Thu, 24 Oct 2024 18:19:11 -0400 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 1t46Ac-0006eM-90 for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:06 -0400 Received: from mail-dm3nam02on20600.outbound.protection.outlook.com ([2a01:111:f403:2405::600] helo=NAM02-DM3-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 1t46AZ-0002TG-UO for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tr1Um7USf7e0kuv2xkD9aMfh4WUjn4zzJ7A05PZfd9nXvIPnqYIpsnqRXzk+21qs+6OkQAgDAq4bCL+wwYIi7TuS/BR9pQx/7MkrOKpNhlynxGAhQxch4rg+ZKpVvjJrG+UGPjozga6SrFjYi55YstoGBhFTOX7Ua/MxNl6TwgxA0D2U1z/cDMims2RFW/KwkrvoU+noESY70fujMQeWQbAr8bWr35wPo15AdpIFfswcJqE15se7qAuq/EWPXW7NkwVb54VCIENcWNZyYuZkb2o98LOWKWCSLqKQRfPoanzMnUqn7GLlaXjmujVKI4jlPWanPSMLBnsnp7FtvHGW2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=lC/nWSHfr2KubAxQ1G96BsinYFLfMdavq+HNjo7NNy0=; b=SVyPtsw0tAvgFU7sJvESGuqLsKsbGLP7iE7yGqu5i69Eh5O1Ohcs66JdlqzwVcveoa+RyIt61oM8gVqGiKanR7x2QpCDuSr/MQNDTOtTgyBP1ob2dyro/unOySSRYKaLRKhnMElavgIoEoXAejZeW3FdNBUz2UVcEKVg6Qt160Y5NU9XLnckFd092AMvX2W94sm+sF8lcrbanRMhC1nzpnQJ075HFBRjFKQBYH17ShwRH58qOQIQTYe8hTHtC7f7i7Hs7aNxEKelwYnmHu4c0PRUbUrrKIbq8JRsc7w/kFFgE2b+xxtKxq/BdDMDNgzfws6ziO5LpuKCJAuhvsa8Sg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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 (0) 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=lC/nWSHfr2KubAxQ1G96BsinYFLfMdavq+HNjo7NNy0=; b=LxxK5firww6THxNnwl+up7wP386Yy2teJs4lmdlrnSm6Q024V+6DcK5YOS9cX90F9b2me6TzGyNw1qPVDRboLWejBwAC6CJI9bhnluTILosvs4q1ZOUk/EqICTb6wjgy4ySzoTLH7l43snloHHCHfDPxOTCQGpxxuvX/HioxHtg= Received: from SJ0PR03CA0342.namprd03.prod.outlook.com (2603:10b6:a03:39c::17) by CH3PR12MB9145.namprd12.prod.outlook.com (2603:10b6:610:19b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 22:18:56 +0000 Received: from SJ1PEPF00002322.namprd03.prod.outlook.com (2603:10b6:a03:39c:cafe::a3) by SJ0PR03CA0342.outlook.office365.com (2603:10b6:a03:39c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.18 via Frontend Transport; Thu, 24 Oct 2024 22:18:56 +0000 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 (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 Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF00002322.mail.protection.outlook.com (10.167.242.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Thu, 24 Oct 2024 22:18:56 +0000 Received: from bmoger-ubuntu.amd.com (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.2507.39; Thu, 24 Oct 2024 17:18:51 -0500 From: Babu Moger To: CC: , Subject: [PATCH v3 3/7] target/i386: Add PerfMonV2 feature bit Date: Thu, 24 Oct 2024 17:18:21 -0500 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002322:EE_|CH3PR12MB9145:EE_ X-MS-Office365-Filtering-Correlation-Id: b532df2d-f0f4-450a-4224-08dcf479d9f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: UiRHepItkd1moQg8MqryX3vTQGuOnepRiRlijYks4yl8090xV8WYmVXUo3BIImpzK65Gg5Dtdc93QgqnfrkgBKiS/obV69mYzdZRmD2EecFpGpC4yOSz1/21xaGAi3qiv9rAcADELc+l1RL6U8X2xkGVk5Nm7hTa4rcJU4PM1z0FmWRTXGARrIqPzziFl8Dg6ySBhOGx/ffgyL0bgJZlm+rY1UrWN3qIHiFxN4kIJu+jwNkEfitWBdk8v58GRDAstrbpCJU12hcyA9c7/zy6z+KNiSMRsYKOvEvPYdb8rzDvV8pLVmknurhB5gD8S+UIIukbRpfqgfg9O4sTkUKGHv/MTDuUJDrGScMoBQL3Vz1GAMaZOyIpWkefyGKJyVIl60BRZBXC9WFM5LABywmGtGzWrQuimHWbeym86eKpxqUNakxLClWqk6WdwEBPMNCY4J8fkTVsZJhIT0Ij9VBrqyBRIK4m8RqAgRHCfnTf9aEZn/PB2XhsiVSBIaPQ3st6Pl04m9DpZG3070+5ZeruO/+d91K7v3FVxaDRYmLGqfyNjONaQB9eyoe+BQtN/XvpOMJVmnaQhEuJCpOnh4qoKqB0QWnz1c77x5fiqKuu5Uu36HXgCiY1+sDglMTun6GXNYvPg4I0q3LGYJKCRf2S9sDwSF+g08ieErRm3YHTTfNGSza4IQUU8TfSlnPAQWCF6idlqXt8Xp9PJFenHEPb3i4JWIFmv8EB09qE8Yi6hmli5+Xw9uetEGBcRcUHHpVbCudBhpX5WaJMWo5bweM8EnhTAsHUoPda2usG8KOhIjJnfZHs15meGEupUWdZURizrygPLT3yvejWUhK/w7A4+8KMa2trbB1Myc9S9AL1uLBFv+kseNPfgq21ydStNeW+RykprD1MAYtQb+BP0bZxcC0JwvKSZGsdDBhENm5hDcSQbwicz7I/xWAjN/sZW9koId/hCW5fW5Tu0Jdq8cniXJod9hUXzzMYuSM9F1XSP4FZJ6r8cNq9djTtn8Rq5q5ixX5Z+qvALqIMa5Mq9B0lBZykty5A5OeAfPoEHi1WTwb2zppfpThrKuvMUqmFwtWYtDfdQSojMGGYVAXuo/4KLHpJ7RHNtMy9OQcFbmilJGPygijmLrbUayeUds4rM4RESHV9DvRJdMrUYh3b2+urpDOlfqYxEWLZmc7Q69QGQKlPQXIvo5j3HWUcuDm1YX1JBMDIVyzQw2vteLEKmd0FGWoUyxdDTk6QQLAvRKfNJrUZ3BKk66LK1o8hiv1HupYGDLOtAscIiqeI+Hmnp0Fx7eBpyaV551NI7kNHYsvoG3UjFEMtfHzoqr5m1rSTDknInatBYOCOZY0e47AWMRb06l5YVj+/8ObC9yjs2YzYwx3j+/0mnCSvEHULYOABjm+D5kfSQhV1pd/qXjR35FoKaA== 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:(13230040)(376014)(1800799024)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 22:18:56.3245 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b532df2d-f0f4-450a-4224-08dcf479d9f4 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: SJ1PEPF00002322.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9145 Received-SPF: permerror client-ip=2a01:111:f403:2405::600; envelope-from=Babu.Moger@amd.com; helo=NAM02-DM3-obe.outbound.protection.outlook.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.263, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Sandipan Das CPUID leaf 0x80000022, i.e. ExtPerfMonAndDbg, advertises new performance monitoring features for AMD processors. Bit 0 of EAX indicates support for Performance Monitoring Version 2 (PerfMonV2) features. If found to be set during PMU initialization, the EBX bits can be used to determine the number of available counters for different PMUs. It also denotes the availability of global control and status registers. Add the required CPUID feature word and feature bit to allow guests to make use of the PerfMonV2 features. Signed-off-by: Sandipan Das Signed-off-by: Babu Moger Reviewed-by: Zhao Liu --- v3: No changes v2: Used OR instead of overwrite for eax and ebx. Added Zhao's Reviewed-by. --- target/i386/cpu.c | 26 ++++++++++++++++++++++++++ target/i386/cpu.h | 4 ++++ 2 files changed, 30 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index e88859056a..d697c8ea6e 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1227,6 +1227,22 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = { .tcg_features = 0, .unmigratable_flags = 0, }, + [FEAT_8000_0022_EAX] = { + .type = CPUID_FEATURE_WORD, + .feat_names = { + "perfmon-v2", NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + }, + .cpuid = { .eax = 0x80000022, .reg = R_EAX, }, + .tcg_features = 0, + .unmigratable_flags = 0, + }, [FEAT_XSAVE] = { .type = CPUID_FEATURE_WORD, .feat_names = { @@ -7040,6 +7056,16 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, *edx = 0; } break; + case 0x80000022: + *eax = *ebx = *ecx = *edx = 0; + /* AMD Extended Performance Monitoring and Debug */ + if (kvm_enabled() && cpu->enable_pmu && + (env->features[FEAT_8000_0022_EAX] & CPUID_8000_0022_EAX_PERFMON_V2)) { + *eax |= CPUID_8000_0022_EAX_PERFMON_V2; + *ebx |= kvm_arch_get_supported_cpuid(cs->kvm_state, index, count, + R_EBX) & 0xf; + } + break; case 0xC0000000: *eax = env->cpuid_xlevel2; *ebx = 0; diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 9eb45faa65..e0dea1ba54 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -634,6 +634,7 @@ typedef enum FeatureWord { FEAT_8000_0007_EDX, /* CPUID[8000_0007].EDX */ FEAT_8000_0008_EBX, /* CPUID[8000_0008].EBX */ FEAT_8000_0021_EAX, /* CPUID[8000_0021].EAX */ + FEAT_8000_0022_EAX, /* CPUID[8000_0022].EAX */ FEAT_C000_0001_EDX, /* CPUID[C000_0001].EDX */ FEAT_KVM, /* CPUID[4000_0001].EAX (KVM_CPUID_FEATURES) */ FEAT_KVM_HINTS, /* CPUID[4000_0001].EDX */ @@ -1022,6 +1023,9 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w); /* Automatic IBRS */ #define CPUID_8000_0021_EAX_AUTO_IBRS (1U << 8) +/* Performance Monitoring Version 2 */ +#define CPUID_8000_0022_EAX_PERFMON_V2 (1U << 0) + #define CPUID_XSAVE_XSAVEOPT (1U << 0) #define CPUID_XSAVE_XSAVEC (1U << 1) #define CPUID_XSAVE_XGETBV1 (1U << 2) From patchwork Thu Oct 24 22:18:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 13849788 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 645FFD10388 for ; Thu, 24 Oct 2024 22:19:54 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t46Ai-0006fV-Av; Thu, 24 Oct 2024 18:19:12 -0400 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 1t46Ae-0006eu-Hb for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:08 -0400 Received: from mail-bn8nam11on20622.outbound.protection.outlook.com ([2a01:111:f403:2414::622] helo=NAM11-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 1t46Ac-0002TW-27 for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l8sDL0PL8I8j9NvYqUM1lPmf6NHSeESsEsfeJitDrK/NC+sQU2aO5o/3ufLyxMPJS9MIyMTFcvx0Niv+M8s+oF2zJpl3X2Z4/+JacpwpKp4MvuwVsBicXV2zs6WNuqwCxUPAYYP8dDkLYDQExXiSBMwlsgYfccc7wF5qRSSEIYhvk1V8MdfVil3toCGKENQa0lvp8sT48GRnNWrUMWFCyDzLGdOXJARMf/Sqqni2/g8OC8zYg+V0rL+kg5NCwrI7DTabyWSd0ZOQHSS+LJr/1KG/bhVZ1JPXxh3d6VeHUBC4oJxYUzIC1Hm8aDUE85IKiLqSY4/NBCXyIWslhdvkjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=B79pSLGe/ZHk/W54Zrr6u2PxKpGyTcndw1UnwIu1ZKM=; b=pay4FPuEDnh+vRsUf5b4eEyVN8s1dC9OOVco101lbg0TK64IMjbiYf15gyiyezLraW+nsiQrnWTy5qK3UHbmJiMzEe9Bn0OP44CzlB7fe/9+gOBux2Wp6x4tS9qKZRYqCIGrnpltsrf5y307iIH85OiekQtH9Foh26nxEa7DpzRQ93DFP2lUVgwAkL1u5kHThjHAveQFVF2jEgYBCKByybOhOHGr9rWtuRh0GKWxjFRlA3XgguCDdee9rOCbUQBbHevQqC7KZjcn7PkAF1VGZoA6TOFOEcz6QBsJXMH8lBAfL07Fm9kKRrOCESsu8ubPOrzO5yBTEp+hvEdnSghQIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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 (0) 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=B79pSLGe/ZHk/W54Zrr6u2PxKpGyTcndw1UnwIu1ZKM=; b=B1VVvlaqG1J0PMjSfAZp20dsOd8fpbLn8fFpYo7tH+KtqtxCFFqDMVe618GExVNv+8L8hjiTLx9vtFksRTAviyaQeRT7nih+k7tOBHr78n4emH1N8SmDF7xF3+W34+9jHEWZezjsJ0GoIG9YKKyIfliPFueNBkbumjL2eZetftg= Received: from BN9PR03CA0786.namprd03.prod.outlook.com (2603:10b6:408:13f::11) by DM4PR12MB5772.namprd12.prod.outlook.com (2603:10b6:8:63::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.20; Thu, 24 Oct 2024 22:18:59 +0000 Received: from BN2PEPF000055E1.namprd21.prod.outlook.com (2603:10b6:408:13f:cafe::e3) by BN9PR03CA0786.outlook.office365.com (2603:10b6:408:13f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.20 via Frontend Transport; Thu, 24 Oct 2024 22:18:59 +0000 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 (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 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055E1.mail.protection.outlook.com (10.167.245.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8114.2 via Frontend Transport; Thu, 24 Oct 2024 22:18:59 +0000 Received: from bmoger-ubuntu.amd.com (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.2507.39; Thu, 24 Oct 2024 17:18:58 -0500 From: Babu Moger To: CC: , Subject: [PATCH v3 4/7] target/i386: Enable perfmon-v2 and RAS feature bits on EPYC-Genoa Date: Thu, 24 Oct 2024 17:18:22 -0500 Message-ID: <71d46b307975cd036ed04737aeb2a779823b1781.1729807947.git.babu.moger@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055E1:EE_|DM4PR12MB5772:EE_ X-MS-Office365-Filtering-Correlation-Id: f6adcfda-aa31-45a8-4622-08dcf479dbb3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: hx/F/VvnUXKgl/L2X0klcXPcJlRB6F9IdOBWZTyBl4btfhqJqVEwl3qmm3XGFKhZKvmt7X09fmszh39KiLMeE9KKK14bQEsi4A8NFCE4p4p/LcRz2qTx014PUzlRYS/iTgmH5uuZIh69N6Oy97xlORTuMwUmKAZh3kmsPdns0WaR3A2KhKbaZUIdeccUQhKCQJWtOHRPGtcDdEeHiYC+YuMUAn8uLYo3DC6LKQvfnaX9vAxM1Q7C90PkCZGn1XKxOEqqCw5dunORrHM/zfCpmEd0yDIU8rcTCzV02tPPjFYQqrnCeV0J4+o4/nZNbYmbPH5MVIy0cVF/cvhKYteC9jHiUxnJ0k91uOqf3uUGvrfrVlDJymJixb2nPRWyRnPUftvLV7XeBcuVoLQqLoF2YnVU+aXaS6AEI4ndov8O+RF4j603S2su2dOEz/xyN2DdOZp94U2bLAx62EVJCn7BO6J6MdfyWRO2PKzdXXzxJQQXnfjJy+nOmcnEANGBJaF8avEbUEH0Qu9vZMciA9bHUEYXyphtwZ3Q+Flkis/hBmeBh97UagyhcDmpKs5Rujlyr9xqqydSnVgNcoGsHfzOJs421R3H8ARhB6KFERX8oNX30BVLmFIvB5WXhKMchmV2lbdkl3ZtQziXLmu/nej4M6NJzJvlBANyvXTzc9Up3EBuC+MB6iGbEP1TFR0frPpHc1PSGRIHaQPI5EvfZwIs4cXBERAGrqa4tCNiM2qUH43VeQvg/ndLkZsdg5sPe3LAHG4UcyPY3Lo57Gike5TkLO1424GtcR5XxYz15ygw7nG50l6uWxrn4goOezd1LVelAQ3Ml6B6uhXLFnmZp5UrRN8h2HI8S71aR1v1DP1dJtYXjlCSr/ZWZUsnXI/wPJdj+rFeLMOEk+nLsR2anYbuFYKG+kh03xMYrihyYyOfME4cXnIaE3FHTz1NzbXcsTQ5htT2DTgWtgK3Yq8ILOfu97RCMwuXJ3KuKG2/MhLQ3bEM3kQx2A+GLtTT6gs+gz7sZQnD/0oRKgHOLob/PsoNA1CyYPYtOLxGrhZfZAk/4pcx5ffJITvEH3mpJEir3XimaibCRhPP4YEaObfBU6HFFzTL2gdHqlG0yxrbqPfk7hTBu6G1YHmJx3p1eBcz4PXE0YQVW32Ih58UkbLTwtvFekKNSuDFfbkGvz+moin/uIEhSAAI9GtDwF0tsFwLnw74lZ3vFWhjHo7osrloXu9PqFy38mR2D0R/I0UkjPJQiU9Yp/2cQ2DOiKV5Ww8m5Mwsd2A+Yj9FZkOnfL36HvxtKuBw0Bq/0eEaUdebT0xK6MU8gOVTTjhhwcHZoujdIOxYl2HFkdgFfYLggDXpFgrGpLxTtce43J9LRab3awHUWoa9tDDLGkEp6yHBeV7CENGDpGksYru3pycvcOviIDBPyw== 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:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 22:18:59.3322 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f6adcfda-aa31-45a8-4622-08dcf479dbb3 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: BN2PEPF000055E1.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5772 Received-SPF: permerror client-ip=2a01:111:f403:2414::622; envelope-from=Babu.Moger@amd.com; helo=NAM11-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.263, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Following feature bits are added on EPYC-Genoa-v2 model. perfmon-v2: Allow guests to make use of the PerfMonV2 features. SUCCOR : Software uncorrectable error containment and recovery capability. The processor supports software containment of uncorrectable errors through context synchronizing data poisoning and deferred error interrupts. McaOverflowRecov: MCA overflow recovery support. The feature details are available in APM listed below [1]. [1] AMD64 Architecture Programmer's Manual Volume 2: System Programming Publication # 24593 Revision 3.41. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Reviewed-by: Zhao Liu Signed-off-by: Babu Moger --- v3: No changes v2: Minor typo. Added Reviewed-by from Zhao. --- target/i386/cpu.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index d697c8ea6e..690efd4085 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5307,6 +5307,21 @@ static const X86CPUDefinition builtin_x86_defs[] = { .xlevel = 0x80000022, .model_id = "AMD EPYC-Genoa Processor", .cache_info = &epyc_genoa_cache_info, + .versions = (X86CPUVersionDefinition[]) { + { .version = 1 }, + { + .version = 2, + .props = (PropValue[]) { + { "overflow-recov", "on" }, + { "succor", "on" }, + { "perfmon-v2", "on" }, + { "model-id", + "AMD EPYC-Genoa-v2 Processor" }, + { /* end of list */ } + }, + }, + { /* end of list */ } + } }, }; From patchwork Thu Oct 24 22:18:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 13849792 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C50BFD1038D for ; Thu, 24 Oct 2024 22:21:00 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t46As-0006gg-4j; Thu, 24 Oct 2024 18:19:22 -0400 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 1t46Ap-0006gK-CS for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:19 -0400 Received: from mail-mw2nam12on2062d.outbound.protection.outlook.com ([2a01:111:f403:200a::62d] helo=NAM12-MW2-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 1t46Aj-0002U2-PX for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SPs/U86DJJql0fzI1d+INPp2SfBTncscBqcM3KjPE+4/f4KWsCFXChtwISFEM8TsXNFEuBqCO0+WUsvmLN5PQJsYHY+lsxDKU49Vvv8WtJ4e3kuJIM1mgaCk4fTGBkWSPhPLu1vCe9zvfAm8pDy7+I1AVN8aUGb0CETK//XprObvtcDCM/ac+1WTrWp72eyFO8n8gVoSDQBhqpqat6HAefHohUNcjpO3imvNW+d/FAAXTffXr6y87gwBY3OOgPZFyTP5dmmNkFUb0VbxMy88ZxEbQqbeEYCcT16FF8tUnE+AQYea6fbEveujFESkRgsO8z3nmHB5F221eI1VnnTDFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=b1SjjznzIat6MsEagbZ6ZzslzfwCBDSQfWxfUc2bkhg=; b=Dif2LFb3eYwkRbR3rIXV73yo/KCDdnLaowwU8wuiDDvIMFheETEh762doHCL3BfcDsmjYY8o5zXsDg5NxZ9BZPQWh2Ftpqh1GWEtNAje7xNxIfvNRGRd8nd9Nn4t/VMCOmViDNp8uTKYqLgAKzvGm+nn8XY02xmriZXZzWXTyKh1qwzSsv1UsC2iVG1Alc6pk99EaAjItDoqRwrkihfgmb65NUB6o/6eqY9QK8IbpCse5qnhf3BpxqZGh0JnyaUEAb+M4oWzF2oaJk3QW9cXlayc+7xolpexMlmIp1Xl9uzOG5o6mJQ0GIyOqfWqTxHaSIqtIeKPFLSOdQ5ATFTElA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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 (0) 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=b1SjjznzIat6MsEagbZ6ZzslzfwCBDSQfWxfUc2bkhg=; b=zwwBxaa0j/eZw+0gMQK0bTRaQU7cZwZnWDhUt/TTBaVykAoKhVdJFF8ZryIqOiECh6MklTBEcs4u2Z6MdGWfEifFf0spvsZW+OaWDC/hANYy7JbL61lEnSSdiQpU+izOxmNL5MBtnJ4NcuC5HCh5di+9TKJAOwUoMD0FVIuwufo= Received: from MN2PR04CA0013.namprd04.prod.outlook.com (2603:10b6:208:d4::26) by PH7PR12MB7871.namprd12.prod.outlook.com (2603:10b6:510:27d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.17; Thu, 24 Oct 2024 22:19:07 +0000 Received: from BN2PEPF000055DB.namprd21.prod.outlook.com (2603:10b6:208:d4:cafe::5d) by MN2PR04CA0013.outlook.office365.com (2603:10b6:208:d4::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Thu, 24 Oct 2024 22:19:06 +0000 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 (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 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DB.mail.protection.outlook.com (10.167.245.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8114.2 via Frontend Transport; Thu, 24 Oct 2024 22:19:06 +0000 Received: from bmoger-ubuntu.amd.com (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.2507.39; Thu, 24 Oct 2024 17:19:05 -0500 From: Babu Moger To: CC: , Subject: [PATCH v3 5/7] target/i386: Expose bits related to SRSO vulnerability Date: Thu, 24 Oct 2024 17:18:23 -0500 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DB:EE_|PH7PR12MB7871:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c4f50f4-14d0-4e87-5055-08dcf479dfd7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: w9GxWcIsC+vWa7C+ulzX6hILDsGAMqKBqzUSW02W56x8DRLmqx7gzkVKrxLCe0p3WvhufY9XbNLsTZHlyw64U1Cnkip/wchMMcRf0eaWyivvHYuzeknlsWaQ/KeV8WOesVJg4i/Axu0b1Cwb9dn5uEInRLBxaDWPhcrlyGLmn2dAXCo9ibKTTRA9s/9q9yVWzABd0IYkqf6l/xPXvSyMV6Svd0tIhPnLjzpSMAoDGQMz/H5U6oh773zexh/i12TDhLMoT0RXpaDoZemzP7mBVEQA2Q0gYLc6OIqyKXQc8TVEyYfbUT+TWx5aMA0wyePekz+WaifyqNeZAsy7sIGQPV7YOMaF2SnSelGCqgn6FUoiVLmTZYJzRGjkoXJJVDUsvElLd5CLfZQuIdQmVB27LoGIElj7oJrEAuMbT7sLrv8hOKT/3eOrY8ppfjzwNl8LIaBhe/5ruKhSSxpQcpFhwTg1KuyeRiEMjKszuxLfDjqJ5q4LDwCRyegqbU7n6iaTAPv0mhwxBdPARUaoxkc7Ofv09jeJhK1pDl095IlgP9K7o83d6mKXdd9x9QJeiHfHU+9sEKhPv49nLVG/IM6pDYPXKb7qkQcjdFzBDTNLGvnLSCfhlMK2fOdFay3iAPs/yyeAuV8gTjYrlFATxMCcbzhmZ7yYrLbENfiWLfK9L7uRfO6ZCYFGX8UdxCGP0uE4HSonfmMlIQ4iafWZR8jyK60hLCoLW/0Etr+0dPJ1TGjtEOJqR9aE1YDyaToIErOq3iQ6DRm1dFwGQxgNbCiUamIIPq9q4DVw2vV9E2GrbP+kt4cpOYpljE7fwiQ2F4H5KJY7e7tb6SnimH4zEtmDVD05HtP4y+6w+0FVfq/rehB9iLLKKgC3XxDS6U44UlIz6CCbpzebM5lSvlN3z7SXdJBbZNSLRa8plxgT0hPA83TYuuxJAtFlLuP2MhLzRg4x0eAJE8Wyx/TV4A7LSiRk3vkrtsM1ihwR1YqugxL7jyJEG8ZakObOs8SURKu9l7jHheAuA1PMj5Rs6+d63VIJoSvkYSTZYonfTGlv0ngJ9rPX+QddtZs+rFfHiE+Yfx5TSViGjaw0vmqpkBTYu4VPFB35a4Mz/4QmX1Ogzt53UvOQf2eF4w8D7e64sTr3yrW5XhybKyKkV8rDYwe+1sHJbfazVObbYDULnlKq++ksNoisMdVYiHjSC7iwqmfRoPkhssperz7UF7BfUuBI3QsGGCNP/r8R22r5gWzLyNxRhCNZvvW/LV7L70xUDZwLffg+IOjPJDXffxDjZbJwBt/yPqh7c7v7Q8cURBvhaKgGWIpp8sLZlZc5dx9x//KwzpkGEFP3jneolYlhMfkUgODBj9xacbSS+083mXK2KH+rZFVBvWqEMbHhQ5aCoSsl4035YKLd8QQP1B3j72yMttmScjEAofndxDbbvNXE+i0n1f8= 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:(13230040)(376014)(36860700013)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 22:19:06.2636 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7c4f50f4-14d0-4e87-5055-08dcf479dfd7 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: BN2PEPF000055DB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7871 Received-SPF: permerror client-ip=2a01:111:f403:200a::62d; envelope-from=Babu.Moger@amd.com; helo=NAM12-MW2-obe.outbound.protection.outlook.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.263, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Add following bits related Speculative Return Stack Overflow (SRSO). Guests can make use of these bits if supported. These bits are reported via CPUID Fn8000_0021_EAX. =================================================================== Bit Feature Description =================================================================== 27 SBPB Indicates support for the Selective Branch Predictor Barrier. 28 IBPB_BRTYPE MSR_PRED_CMD[IBPB] flushes all branch type predictions. 29 SRSO_NO Not vulnerable to SRSO. 30 SRSO_USER_KERNEL_NO Not vulnerable to SRSO at the user-kernel boundary. =================================================================== Link: https://www.amd.com/content/dam/amd/en/documents/corporate/cr/speculative-return-stack-overflow-whitepaper.pdf Link: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/57238.zip Signed-off-by: Babu Moger --- v3: New patch --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 690efd4085..642e71b636 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1221,7 +1221,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "sbpb", - "ibpb-brtype", NULL, NULL, NULL, + "ibpb-brtype", "srso-no", "srso-user-kernel-no", NULL, }, .cpuid = { .eax = 0x80000021, .reg = R_EAX, }, .tcg_features = 0, diff --git a/target/i386/cpu.h b/target/i386/cpu.h index e0dea1ba54..792518b62d 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1015,13 +1015,21 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w); #define CPUID_8000_0008_EBX_AMD_PSFD (1U << 28) /* Processor ignores nested data breakpoints */ -#define CPUID_8000_0021_EAX_NO_NESTED_DATA_BP (1U << 0) +#define CPUID_8000_0021_EAX_NO_NESTED_DATA_BP (1U << 0) /* LFENCE is always serializing */ #define CPUID_8000_0021_EAX_LFENCE_ALWAYS_SERIALIZING (1U << 2) /* Null Selector Clears Base */ -#define CPUID_8000_0021_EAX_NULL_SEL_CLR_BASE (1U << 6) +#define CPUID_8000_0021_EAX_NULL_SEL_CLR_BASE (1U << 6) /* Automatic IBRS */ -#define CPUID_8000_0021_EAX_AUTO_IBRS (1U << 8) +#define CPUID_8000_0021_EAX_AUTO_IBRS (1U << 8) +/* Selective Branch Predictor Barrier */ +#define CPUID_8000_0021_EAX_SBPB (1U << 27) +/* IBPB includes branch type prediction flushing */ +#define CPUID_8000_0021_EAX_IBPB_BRTYPE (1U << 28) +/* Not vulnerable to Speculative Return Stack Overflow */ +#define CPUID_8000_0021_EAX_SRSO_NO (1U << 29) +/* Not vulnerable to SRSO at the user-kernel boundary */ +#define CPUID_8000_0021_EAX_SRSO_USER_KERNEL_NO (1U << 30) /* Performance Monitoring Version 2 */ #define CPUID_8000_0022_EAX_PERFMON_V2 (1U << 0) From patchwork Thu Oct 24 22:18:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 13849791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C85D7D1038D for ; Thu, 24 Oct 2024 22:20:09 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t46As-0006gh-Mi; Thu, 24 Oct 2024 18:19:22 -0400 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 1t46Ar-0006gY-Ha for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:21 -0400 Received: from mail-bn7nam10on2060c.outbound.protection.outlook.com ([2a01:111:f403:2009::60c] helo=NAM10-BN7-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 1t46Ap-0002UR-DH for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JzOatl492V4XkD8iGuZ92KB8WeVsee+2QIBFQNR1k5nyRc6xBgvnLqQcQ7MsDVBnWP+Kv0EETjG71QPWDDDVlfaraOILuE+PXgJJ8dNKfKsETpJYLVRyOsun0ahlh3Uk2Nf/vN+gDcWtVg/Gt3upNe5taAn9uG9HEeT2UiJbeoTHYg4fH+zluvqAX41SHRqukWSW/tsvWelT+rJbBsG/HeUnNMnKGp/Ug7/NrpirRvtyNed66qiwVxicMmdXgtVomsz0TG76DFdmZPsESEt8cD86TPp4es6XMtGSwQjEY2j2vSzfT+CY/4cCyJrG+pf5YPElDT3aw9Bs71Zl8fRvJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=fCtaudonhvnjj+ZqomWaSi6u2gOh67ZRtPud0h26T8s=; b=CIX6er+MvnnsWhWRzr9SQ6/SdJCAHtXgQ1U+c193Qvr4JgQpJlBeZFzy8cc4c2LTjoUHfNHvn1tYhj55kOJ8A0eOrHOOjwA7xv1JKuKC6dE6RghfTIyNDZs/og939dS40o1BTHmieqxDpH/St/mJXUMGI9PyBESvyp3/ocIIAFfH0MggI01t0v9JhxaRugdiwj5xUcQXkWF4x/Ympm+Bt7wJWddliQQ9zvFHFXap2crMpmSxK1dnI4XGJAhVH4wWMe8dYSxHJ5pH3G4jq3twpcJfC6PTQ7h5YYqpE3kVbPx0tw4A627nGb3zByPkHA8IrH4u9SPaRoiqKaxXEi0N8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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 (0) 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=fCtaudonhvnjj+ZqomWaSi6u2gOh67ZRtPud0h26T8s=; b=PIPQRrbynTLSNz9VpCpOozDAKWcoXNnuNJb+3e5PXcU4EwV3+N0sYOIxFNeE0mTTRTR3O2HXTCEFjIX0PKpSZSGf0tDSX4fsNEf9J5jOwWKKn/8sGiePJy8d2t4xBEwnE24sZPNtir+lYK108PvnVe0DYHsVTQxVa+9OKLkcr3M= Received: from BN7PR06CA0068.namprd06.prod.outlook.com (2603:10b6:408:34::45) by MW3PR12MB4395.namprd12.prod.outlook.com (2603:10b6:303:5c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.21; Thu, 24 Oct 2024 22:19:13 +0000 Received: from BN2PEPF000055DE.namprd21.prod.outlook.com (2603:10b6:408:34:cafe::e5) by BN7PR06CA0068.outlook.office365.com (2603:10b6:408:34::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.18 via Frontend Transport; Thu, 24 Oct 2024 22:19:13 +0000 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 (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 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DE.mail.protection.outlook.com (10.167.245.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8114.2 via Frontend Transport; Thu, 24 Oct 2024 22:19:13 +0000 Received: from bmoger-ubuntu.amd.com (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.2507.39; Thu, 24 Oct 2024 17:19:12 -0500 From: Babu Moger To: CC: , Subject: [PATCH v3 6/7] target/i386: Expose new feature bits in CPUID 8000_0021_EAX/EBX Date: Thu, 24 Oct 2024 17:18:24 -0500 Message-ID: <7c62371fe60af1e9bbd853f5f8e949bf2d908bd0.1729807947.git.babu.moger@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DE:EE_|MW3PR12MB4395:EE_ X-MS-Office365-Filtering-Correlation-Id: 37a62675-9755-4cea-de49-08dcf479e3ea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: h3LRgkSr7zD5STx9801KLjjms8N9LPytD9WRYn4RR5NnOvdd8vOeUXqrFRBPZHE1XDj7/h96LtsLXI/O0WPuBDdRttoBP5zkU5pnxijjDR7qtMDm0Qk7jYC0GcSXMgzF0PmgxwEctI0k+b1Pur0MU1YgJyIiP0JR6tRwGg1Xi+E0UYdD6POVg3pHNoeP+EUv0sR8I98huJ8Ppyw4trZjcmnPi+n4zJXNY2W508bGBGmkhuS/sbWGw/5sw02yJ/yv61xE/K0EH9vuL7JhCgNYSYRFmKNRDKddfhNNUyXYLRMi6iywC7IBfxDT7PW1ZWI0U1QPaV8MRPL+KHZYrvWI67hcLRs79+NDdxNmYA75HF4XVV6yKQooU6A3o+JkcMZGFfqkA3sIyaqUXMXsE1mDgncNGC8iDrzNfZr6vtH2td47xbuU8FxtAr/cBaOhBQjNfqTGiwoF6UKVl2uEnhR06mM+U4WM6qaH7Xq4HUshRpzQPYWnOheHIYwUeGYQn03K9yxHVhv4kqj+OF3qL2IEo6nMNw+44qfaDpJtGdCDUhwkOeblCjSAJOeHCXTfQ12gZ/tsYzo0jwIecm0x0jxuHbtFAtPxFF/vQLwwY5uDR4R2znDAddLWIv7C4ZwWuSN/lmytK0Ee1RsWOC7TJV7CgokcIUHPuQlDN1KRLHebRIuTlIDdln0fYQd7zWXZ78VhbwXBeyw9qgnjJFst8xqplNuBDswUzxr256jr2GcrpiDL09RrIjkkaySgWIPtvE2XSr4ZunxeqZ9/Nx82gnjrDEpcEcIQB4SF2WJC9/V8nkUDQ0FaJ2k7/Ryqc2gAo8yeW80Zg69om2t3sXVCVAn4XIeBs1QO0ipnUmUAj8Hre9PCXdACxydVNRYabOCLbvzDIWnpjLgDfXT/v1fTUjHVF6WFBrZsZ9KQep5RmHM+WvOdBzAyQc7M+sohDdyLEFlxpJQh75lzZGCsTQAwU6U7IZex6pENznGw7dxJS2nhxiTA+XmHuEhljNcEcayyiU3D7iND4ioZWGE1oE7GhqbfH5DtaEmtuwGDeVLGTPMMG2T353GK26SxdWYU2Sx5DJpTfEC9L6k8hzKQnZUv29mx8ARvspJ5+cyZp245b3VwhDV4j0MNYmsDlVA5rmNtSj787U2darYzBbWSKl4TgBPt6qIoqUfEn4tun5Byl1e0UkzvA36lM+2j3irD9kTcSigq0yArZzytJS/QXvUi7jY2z5j5pnEY1BR32hPtIETUJygkEGLeS7St7eIXqxfaJoXqL3tlNlrn+4EItRt6Hu2+I9RkfqHr/nRu4/ONWLo+As8VBoKki3njd4e4u8v9qDDaIj0lB68pOYOCcLGEJGqh/D//nuwkG1uVx2jkl4pEsu7JejS9RmiNMZWdTjZ/LIBDVvK/vEPvyBW5OIC4n9faPw== 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:(13230040)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 22:19:13.1183 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37a62675-9755-4cea-de49-08dcf479e3ea 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: BN2PEPF000055DE.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4395 Received-SPF: permerror client-ip=2a01:111:f403:2009::60c; envelope-from=Babu.Moger@amd.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.263, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Newer AMD CPUs support ERAPS (Enhanced Return Address Prediction Security) feature that enables the auto-clear of RSB entries on a TLB flush, context switches and VMEXITs. The number of default RSP entries is reflected in RapSize. Add the feature bit and feature word to support these features. CPUID_Fn80000021_EAX Bits Feature Description 24 ERAPS: Indicates support for enhanced return address predictor security. CPUID_Fn80000021_EBX Bits Feature Description 31-24 Reserved 23:16 RapSize: Return Address Predictor size. RapSize x 8 is the minimum number of CALL instructions software needs to execute to flush the RAP. 15-00 MicrocodePatchSize. Read-only. Reports the size of the Microcode patch in 16-byte multiples. If 0, the size of the patch is at most 5568 (15C0h) bytes. Link: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/57238.zip Signed-off-by: Babu Moger --- v3: New patch --- target/i386/cpu.c | 11 +++++++++-- target/i386/cpu.h | 9 +++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 642e71b636..5bfa07adbf 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1220,13 +1220,19 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, "sbpb", + "eraps", NULL, NULL, "sbpb", "ibpb-brtype", "srso-no", "srso-user-kernel-no", NULL, }, .cpuid = { .eax = 0x80000021, .reg = R_EAX, }, .tcg_features = 0, .unmigratable_flags = 0, }, + [FEAT_8000_0021_EBX] = { + .type = CPUID_FEATURE_WORD, + .cpuid = { .eax = 0x80000021, .reg = R_EBX, }, + .tcg_features = 0, + .unmigratable_flags = 0, + }, [FEAT_8000_0022_EAX] = { .type = CPUID_FEATURE_WORD, .feat_names = { @@ -7114,8 +7120,9 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, } break; case 0x80000021: + *eax = *ebx = *ecx = *edx = 0; *eax = env->features[FEAT_8000_0021_EAX]; - *ebx = *ecx = *edx = 0; + *ebx = env->features[FEAT_8000_0021_EBX]; break; default: /* reserved values: zero */ diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 792518b62d..e2e10f55b2 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -634,6 +634,7 @@ typedef enum FeatureWord { FEAT_8000_0007_EDX, /* CPUID[8000_0007].EDX */ FEAT_8000_0008_EBX, /* CPUID[8000_0008].EBX */ FEAT_8000_0021_EAX, /* CPUID[8000_0021].EAX */ + FEAT_8000_0021_EBX, /* CPUID[8000_0021].EBX */ FEAT_8000_0022_EAX, /* CPUID[8000_0022].EAX */ FEAT_C000_0001_EDX, /* CPUID[C000_0001].EDX */ FEAT_KVM, /* CPUID[4000_0001].EAX (KVM_CPUID_FEATURES) */ @@ -1022,6 +1023,8 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w); #define CPUID_8000_0021_EAX_NULL_SEL_CLR_BASE (1U << 6) /* Automatic IBRS */ #define CPUID_8000_0021_EAX_AUTO_IBRS (1U << 8) +/* Enhanced Return Address Predictor Scurity */ +#define CPUID_8000_0021_EAX_ERAPS (1U << 24) /* Selective Branch Predictor Barrier */ #define CPUID_8000_0021_EAX_SBPB (1U << 27) /* IBPB includes branch type prediction flushing */ @@ -1031,6 +1034,12 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w); /* Not vulnerable to SRSO at the user-kernel boundary */ #define CPUID_8000_0021_EAX_SRSO_USER_KERNEL_NO (1U << 30) +/* + * Return Address Predictor size. RapSize x 8 is the minimum number of + * CALL instructions software needs to execute to flush the RAP. + */ +#define CPUID_8000_0021_EBX_RAPSIZE (8U << 16) + /* Performance Monitoring Version 2 */ #define CPUID_8000_0022_EAX_PERFMON_V2 (1U << 0) From patchwork Thu Oct 24 22:18:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 13849790 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C43A5D10388 for ; Thu, 24 Oct 2024 22:20:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t46B2-0006i2-Sl; Thu, 24 Oct 2024 18:19:32 -0400 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 1t46B1-0006hu-Ca for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:31 -0400 Received: from mail-dm6nam11on2062b.outbound.protection.outlook.com ([2a01:111:f403:2415::62b] helo=NAM11-DM6-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 1t46Ax-0002V1-Uq for qemu-devel@nongnu.org; Thu, 24 Oct 2024 18:19:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PXwVInD2J0Y5AuVQcSjFeQqQZ2Hzh/6SstzmUOC1nWapk7g1YjXqz2gh+FsGvC6zgOZtym5FiX1NxmMXdW1Oy3wqDZ+Lf+dratV1SdNMum38KhxfA2ZYgi5Ri8ZIOiA2XHJMwKI1i3MpSg05or8OEJJY7Lq00YGsk0UHgGOxXbt7EQyZHMZpZKtHf8KhFkqUQPaMnUEBk7kvxHrBbu5CUBRpskUtMXg7fvUNKjiWuLH/FyF1qJKfteAFD7J97x0e4zkkDJYTBBPdHiRup2iD1rKubgE4foHqBJwU78HqAbSp8bytuUDwVlyhjTkFRjbLWl6xmEcJzd9MotLa535M1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=/SC5ieKJRPIibYIsk8+PDlwLCXhwPUcg4QmSo0r2BD0=; b=J0wBin5XtgZjCRzBzt3ku9JTcs19Br+av81Nfz0xSRTYnZJEcjyiataiIjXORj86S6rw7VzszzRY3Q8LcAkc1UScXJWHY7+wQsR2MSrktpdDOi2euyzAXl3J/K1HEtWgYwJRvDl/roVBhQ/a7e/1g9jsw+c16qJssSzMUTllFICcL/RuFMI9JjVGRAJdEYNNN0lxlD8/I7qHvZbvNXXdfb4lTmbe7aIBvreuoR+LAz0EEkHV2kqBSG6n26rzBSQpYtBrgmDaIOze+7DRbR84d1uZDsu+Vs3DzwOpIoYIdT9ntkcCfwm0KbEI6LVNkt5uONL1ykUrPohXsD8tNacoYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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 (0) 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=/SC5ieKJRPIibYIsk8+PDlwLCXhwPUcg4QmSo0r2BD0=; b=mnOiTk4fWbE5g1ZgoM4yv/QJwyjxFqlMYke3UYDLrp2LtnuEZ0qeEbjWWfLHfj3RVaEoHd6h0G/YXK5RtS30mnVTgnlCUnUYNvLaPohQ4Am1dFI04qxyRu27SnPX7bbGqs1XRPugZz0bRaP7mvMQB2Fs6AUZoZIHxPAYx47N3qs= Received: from MN2PR13CA0036.namprd13.prod.outlook.com (2603:10b6:208:160::49) by MW3PR12MB4475.namprd12.prod.outlook.com (2603:10b6:303:55::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29; Thu, 24 Oct 2024 22:19:20 +0000 Received: from BN2PEPF000055DD.namprd21.prod.outlook.com (2603:10b6:208:160:cafe::77) by MN2PR13CA0036.outlook.office365.com (2603:10b6:208:160::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.8 via Frontend Transport; Thu, 24 Oct 2024 22:19:20 +0000 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 (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 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DD.mail.protection.outlook.com (10.167.245.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8114.2 via Frontend Transport; Thu, 24 Oct 2024 22:19:19 +0000 Received: from bmoger-ubuntu.amd.com (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.2507.39; Thu, 24 Oct 2024 17:19:19 -0500 From: Babu Moger To: CC: , Subject: [PATCH v3 7/7] target/i386: Add support for EPYC-Turin model Date: Thu, 24 Oct 2024 17:18:25 -0500 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DD:EE_|MW3PR12MB4475:EE_ X-MS-Office365-Filtering-Correlation-Id: 259b5d2e-c705-46a4-1314-08dcf479e7fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: 2Ocxaoa/Yc3oecUgSbN324OrxawjtB52CYd9iTbimOu3XIu/Z7zAGwGFnMSARn9xJ48C0xUtBe9EWHIxLVGVlsPFokZT6+Het5bt0sTvvp0YiRD2nB5zEitTbf6Z2fG7BijsOYRy/iHjVwYOllQG2BDhQIUaLAuhby7wCZyupgMT642pEKCVBDGHnB4sBgoPmYl5sIs1qMSXphFZ5pc6JfkYT2tCnA0RbVDl8Ji0KiCOJ/grxhyqcjEUULo4lg/vLrhztANmGRZPGPmiEF+bVtKPVzBIIV5adSDhZrJxSh/qfTsidpyrN0PMZ89NS3qqFMacRyFguKIZm7Pvx01CucLlXhXVHbn/d69tqwBNFwNLvJb0zwqcDkBYsSTn3qRSr3pn9o7mZaaKMEB3PWsgxaMarUBfltRuJDrxMTKKcAyYhuPcdleZAzXzu+pA57J8VsfxBPwIuB/hr5jPCa1A45MdkSmh+TyAbOHtKq/CqjHHd8wCqabS6zcB8I8j49x19V9QWks2qfg+uSrbRVYZgEDBKOPdtbz4bx+SsOGdXNXV3rvBjVFVX9gdr7aVZfb1HI2KoP/VY0GK/qbVD3Bm/YlUK9QVVdxx20z48eDqzjNjLOY0slTlhwDudmET3qxDHwqaXjhCL2AslPiplTm642W8rDFL19z0QCxOinaQVa8RxU8fFKhQTV0A/Gnx/4ozjYeW8RGi9ftNLpdwga+4aXNU2vht05K7G++aT13txwGdlMBIPPbByu2H0Z/LwOrJizr3ISNCEvgnLiSaeV1xjRgLDb/BbnVVJLDc8sZc7KQyG4BjFNhZ75N4fzHcU7nFaLMlFV63+25X2TeixeIbRXdrOtlxBFKWwduE5NFtkNgM415Fk8/bP1zznR78aFaBDYK+9AW7dP/31l9wX3Nd/nJpAesGF6ryR/17Dtpq4eW48BEoV6d0SHiKlE0pXcG2a80lIZmuDkWyKmYq9uLxtnGK5doAfZK/b++5SxPuEXpOpnJAmXFXEHujZr4M4w/l8cuUDlqMq0Cyja68OuWkVlTOPSan8ZCKwsd33sTH294cXOfbfOTftRcEIj+YL5odzJ+CE7qi1UrqQL2i0zfsOe1YXJrKPMwNiuiQqDxBxWfoBlIPiiGL0n9udCO7CGzkGUr2ZhvPNnkSmxL5KaUEBsl6KO2mnT2uLyvY2qF5WCyab8f7mqoJ9GkaJCUum/nlV5kn2qN9eV13JVvIIupW14ok1vCmXexBJTKtuJ5TuevPjnBb5t0WPRstsAyvsrEhDME1YCERqJkJ2Yb954NsYxQB3RgSHs6S14TKEA3tmSk6rE+jEm6IupMlUlTEfKXSTMJH/BuyKx0Bz8u4dzXRIwv1LIbUN5WG6OQRzJfqPANN/FIp23GgJE0GUXr0efBe+WTG8QI1AuR/xCa2zwDjEyZnKLgxENROB5/ELbbvVkU= 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:(13230040)(82310400026)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 22:19:19.9354 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 259b5d2e-c705-46a4-1314-08dcf479e7fb 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: BN2PEPF000055DD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4475 Received-SPF: permerror client-ip=2a01:111:f403:2415::62b; envelope-from=Babu.Moger@amd.com; helo=NAM11-DM6-obe.outbound.protection.outlook.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.263, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Add the support for AMD EPYC zen 5 processors (EPYC-Turin). Add the following new feature bits on top of the feature bits from the previous generation EPYC models. movdiri : Move Doubleword as Direct Store Instruction movdir64b : Move 64 Bytes as Direct Store Instruction avx512-vp2intersect : AVX512 Vector Pair Intersection to a Pair of Mask Register avx-vnni : AVX VNNI Instruction sbpb : Selective Branch Predictor Barrier ibpb-brtype : IBPB includes branch type prediction flushing srso-user-kernel-no : Not vulnerable to SRSO at the user-kernel boundary eraps : Enhanced Return Address Predictor Security rapsize : Return Address Predictor size. RapSize x 8 is the minimum number of CALL instructions software needs to execute to flush the RAP Link: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/57238.zip Link: https://www.amd.com/content/dam/amd/en/documents/corporate/cr/speculative-return-stack-overflow-whitepaper.pdf Signed-off-by: Babu Moger --- v3: Removed Zhao's Reviewed-by as the patch has changed, Added sbpb, ibpb-brtype, srso-user-kernel-no, eraps, rapsize v2: Fixed minor typo. Added Zhao's Reviewed-by. --- target/i386/cpu.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5bfa07adbf..eb49650450 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -2411,6 +2411,60 @@ static const CPUCaches epyc_genoa_cache_info = { }, }; +static const CPUCaches epyc_turin_cache_info = { + .l1d_cache = &(CPUCacheInfo) { + .type = DATA_CACHE, + .level = 1, + .size = 48 * KiB, + .line_size = 64, + .associativity = 12, + .partitions = 1, + .sets = 64, + .lines_per_tag = 1, + .self_init = 1, + .no_invd_sharing = true, + .share_level = CPU_TOPO_LEVEL_CORE, + }, + .l1i_cache = &(CPUCacheInfo) { + .type = INSTRUCTION_CACHE, + .level = 1, + .size = 32 * KiB, + .line_size = 64, + .associativity = 8, + .partitions = 1, + .sets = 64, + .lines_per_tag = 1, + .self_init = 1, + .no_invd_sharing = true, + .share_level = CPU_TOPO_LEVEL_CORE, + }, + .l2_cache = &(CPUCacheInfo) { + .type = UNIFIED_CACHE, + .level = 2, + .size = 1 * MiB, + .line_size = 64, + .associativity = 16, + .partitions = 1, + .sets = 1024, + .lines_per_tag = 1, + .share_level = CPU_TOPO_LEVEL_CORE, + }, + .l3_cache = &(CPUCacheInfo) { + .type = UNIFIED_CACHE, + .level = 3, + .size = 32 * MiB, + .line_size = 64, + .associativity = 16, + .partitions = 1, + .sets = 32768, + .lines_per_tag = 1, + .self_init = true, + .inclusive = true, + .complex_indexing = false, + .share_level = CPU_TOPO_LEVEL_DIE, + }, +}; + /* The following VMX features are not supported by KVM and are left out in the * CPU definitions: * @@ -5329,6 +5383,88 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ } } }, + { + .name = "EPYC-Turin", + .level = 0xd, + .vendor = CPUID_VENDOR_AMD, + .family = 26, + .model = 0, + .stepping = 0, + .features[FEAT_1_ECX] = + CPUID_EXT_RDRAND | CPUID_EXT_F16C | CPUID_EXT_AVX | + CPUID_EXT_XSAVE | CPUID_EXT_AES | CPUID_EXT_POPCNT | + CPUID_EXT_MOVBE | CPUID_EXT_SSE42 | CPUID_EXT_SSE41 | + CPUID_EXT_PCID | CPUID_EXT_CX16 | CPUID_EXT_FMA | + CPUID_EXT_SSSE3 | CPUID_EXT_MONITOR | CPUID_EXT_PCLMULQDQ | + CPUID_EXT_SSE3, + .features[FEAT_1_EDX] = + 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_VME | CPUID_FP87, + .features[FEAT_6_EAX] = + CPUID_6_EAX_ARAT, + .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_ERMS | + CPUID_7_0_EBX_INVPCID | CPUID_7_0_EBX_AVX512F | + CPUID_7_0_EBX_AVX512DQ | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX | + CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_AVX512IFMA | + CPUID_7_0_EBX_CLFLUSHOPT | CPUID_7_0_EBX_CLWB | + CPUID_7_0_EBX_AVX512CD | CPUID_7_0_EBX_SHA_NI | + CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512VL, + .features[FEAT_7_0_ECX] = + CPUID_7_0_ECX_AVX512_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU | + CPUID_7_0_ECX_AVX512_VBMI2 | CPUID_7_0_ECX_GFNI | + CPUID_7_0_ECX_VAES | CPUID_7_0_ECX_VPCLMULQDQ | + CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG | + CPUID_7_0_ECX_AVX512_VPOPCNTDQ | CPUID_7_0_ECX_LA57 | + CPUID_7_0_ECX_RDPID | CPUID_7_0_ECX_MOVDIRI | + CPUID_7_0_ECX_MOVDIR64B, + .features[FEAT_7_0_EDX] = + CPUID_7_0_EDX_FSRM | CPUID_7_0_EDX_AVX512_VP2INTERSECT, + .features[FEAT_7_1_EAX] = + CPUID_7_1_EAX_AVX_VNNI | CPUID_7_1_EAX_AVX512_BF16, + .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 | + CPUID_EXT3_TOPOEXT | CPUID_EXT3_PERFCORE, + .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_0007_EBX] = + CPUID_8000_0007_EBX_OVERFLOW_RECOV | CPUID_8000_0007_EBX_SUCCOR, + .features[FEAT_8000_0008_EBX] = + CPUID_8000_0008_EBX_CLZERO | CPUID_8000_0008_EBX_XSAVEERPTR | + CPUID_8000_0008_EBX_WBNOINVD | CPUID_8000_0008_EBX_IBPB | + CPUID_8000_0008_EBX_IBRS | CPUID_8000_0008_EBX_STIBP | + CPUID_8000_0008_EBX_STIBP_ALWAYS_ON | + CPUID_8000_0008_EBX_AMD_SSBD | CPUID_8000_0008_EBX_AMD_PSFD, + .features[FEAT_8000_0021_EAX] = + CPUID_8000_0021_EAX_NO_NESTED_DATA_BP | + CPUID_8000_0021_EAX_LFENCE_ALWAYS_SERIALIZING | + CPUID_8000_0021_EAX_NULL_SEL_CLR_BASE | + CPUID_8000_0021_EAX_AUTO_IBRS | + CPUID_8000_0021_EAX_ERAPS | CPUID_8000_0021_EAX_SBPB | + CPUID_8000_0021_EAX_IBPB_BRTYPE | + CPUID_8000_0021_EAX_SRSO_USER_KERNEL_NO, + .features[FEAT_8000_0021_EBX] = + CPUID_8000_0021_EBX_RAPSIZE, + .features[FEAT_8000_0022_EAX] = + CPUID_8000_0022_EAX_PERFMON_V2, + .features[FEAT_XSAVE] = + CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XSAVEC | + CPUID_XSAVE_XGETBV1 | CPUID_XSAVE_XSAVES, + .features[FEAT_SVM] = + CPUID_SVM_NPT | CPUID_SVM_NRIPSAVE | CPUID_SVM_VNMI | + CPUID_SVM_SVME_ADDR_CHK, + .xlevel = 0x80000022, + .model_id = "AMD EPYC-Turin Processor", + .cache_info = &epyc_turin_cache_info, + }, }; /*