Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp219208lqh; Thu, 30 May 2024 21:39:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXkFjtvGQi3A6pfUOs/sbiNJz9LGx+qY/MinFR4tf8VAfIW2G2ub+ZhK/5RpGoHum7b7LrYtnaIGVXAnE2ZDF1sozOPmlutmqulNiCY6g== X-Google-Smtp-Source: AGHT+IHIICx4LNF91dVCe9HGn/farzV7n4a5XFARQoSg/QmU2+Sws6On3VEc9YU2aY9Nb7ykBxMk X-Received: by 2002:a05:6102:1278:b0:47c:29e0:c12f with SMTP id ada2fe7eead31-48bc2310be2mr769548137.23.1717130386105; Thu, 30 May 2024 21:39:46 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff23abddcsi12533841cf.146.2024.05.30.21.39.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 21:39:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196273-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=jO4tOWzq; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-196273-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196273-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8895A1C236F2 for ; Fri, 31 May 2024 04:39:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51BA513D61B; Fri, 31 May 2024 04:35:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="jO4tOWzq" Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2043.outbound.protection.outlook.com [40.107.243.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC84778C8C; Fri, 31 May 2024 04:35:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.43 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717130130; cv=fail; b=iftrvCj8wfNGkM3b5JwGZrtsYKyeIJ4y74nLb6dDmVQyF8mdhmsSw7nFfSVJFU4lBUl262q4dbIlGHYqJqF4Fh3LiyV/VnKHlHw8SCT4a53V1BZUrm/OKUAV0d0W921Y6QrGDJGh4qfeT9fJAAnWJGW42THQfnlLy3LAK3zcLOA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717130130; c=relaxed/simple; bh=s9ZaVU6rUpEL0ipla3Jmedzbd+/UXlp0Tr4hvBroiX4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=t2VRILMHm0xo+YO3mDktROU3aAMymdWXV+y349TpWE/GdW9I0FzG1lXF1UyTXQcLROdgjILd3DUMet8ojRELcJVi5fiVzwEiBK+EJIfjrFEwYGxMVOQ9TvlQZ+umiNDgAeTc3S9X8To6KLHKodxeZOCfYVXfGp8PK+oxPacQpNw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=jO4tOWzq; arc=fail smtp.client-ip=40.107.243.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gZdg/POCod5sI0ko9gazNXaBz3108Qtsd2/VE5716jsD70nXZ14z69guuexJZ/YtIJTmep50kirKZmSv0Sy83eMOlYDvKTbGMLJJfO/BD9JJn4ofX+2y9MtCQq7kiTc5m6Ue1eGi4rxDb6sw0h9kLSTh1WJsSKa7NRrqkS79fR4P9eL6l/Jswj5oTsWRrBMaUL7arJfzDqKLAc3RgZZE8W2qOUfSesOFN8Cl3jd1YT/DQA8O56wI/E0tyoQj1UA6yq3APVtCv9/u5sCYC3aMuPiNOvngcIozXoc/6dFcZ1p89TFtEtIBcdbA7YRx62w3/I93UpPVDOF40Wj3jhwouw== 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=l1ysbsAln7bP/WKAos1tZO5uWElhxX1Y/5p1lLqlJ2s=; b=MZQSS0/kIvBKARJlXtQXrWrYci7AjrUMLXmXKoxj/5xNHAX9tYivyFGX/YMp7mpcqbYjdUm7hUMN9va8CpyASZqdBuSOyvVwSZBElNuvo/2uoQvjHhQ3vxtuL/GHd2A5EqfoKhFWyxKYdELQEI6EVlxwbGi9CPlV5yCg1uO5EfECYJKZgPtW6lLYcdqF31oR3gLPNI//rdUbvvD7WbHFxJgYhErm4ud9CQ8+K7JMXLQTf55cS+FdW55ZSOoQDvcnNzQtME63Aj1otpbUwait+1mPDwd6qnpqathpWmMtUlbTQeye/zkJSkwysPTudz+kgYfL+BM6ZyoI3SE+ZZULLQ== 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 (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=l1ysbsAln7bP/WKAos1tZO5uWElhxX1Y/5p1lLqlJ2s=; b=jO4tOWzqx7HGvlPoGMAt3O4oY2bGemWu7rc99Sr6xgR1tFC35JffFcxWnxBnOs0rP3U9mEil+ClPczikLc58RFGsIDQW1zlB1Ia41LBBUCD/kawkB8lBDvexaAuyDnBfVB2Vxt037tuUbKU7d6V0fmD8otlOUp+7FbkLLAW2bVE= Received: from DM6PR08CA0064.namprd08.prod.outlook.com (2603:10b6:5:1e0::38) by DS0PR12MB7653.namprd12.prod.outlook.com (2603:10b6:8:13e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Fri, 31 May 2024 04:35:26 +0000 Received: from DS3PEPF000099D7.namprd04.prod.outlook.com (2603:10b6:5:1e0:cafe::f2) by DM6PR08CA0064.outlook.office365.com (2603:10b6:5:1e0::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.25 via Frontend Transport; Fri, 31 May 2024 04:35:26 +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 DS3PEPF000099D7.mail.protection.outlook.com (10.167.17.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7633.15 via Frontend Transport; Fri, 31 May 2024 04:35:26 +0000 Received: from gomati.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.35; Thu, 30 May 2024 23:35:22 -0500 From: Nikunj A Dadhania To: , , , , CC: , , , , , , Subject: [PATCH v9 24/24] x86/sev: Enable Secure TSC for SNP guests Date: Fri, 31 May 2024 10:00:38 +0530 Message-ID: <20240531043038.3370793-25-nikunj@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531043038.3370793-1-nikunj@amd.com> References: <20240531043038.3370793-1-nikunj@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: DS3PEPF000099D7:EE_|DS0PR12MB7653:EE_ X-MS-Office365-Filtering-Correlation-Id: d369892d-c5c0-4e14-ea80-08dc812b1810 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400017|7416005|376005|36860700004|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ZWFbvhTDWZxCpHegyv4k1FBk6suzcrzsqYapq9AdtTKqRGsNYkI2EVB3iXb/?= =?us-ascii?Q?cEpXyfkLkzWDj4gH5PlwRAndn+K0rsOK0/KpYT9HUABXE0ZG6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Aa+L7doDwaCGWmMm09uDKQBM5J2FFNk/iZzskj2Ik+LQmVMEalgsbB?= =?us-ascii?Q?8PELxAORXP+Dm6C2pYJOhDQy5dvaqd2zd/qnCVMmvCktgL93XlHpfGOshmTe?= =?us-ascii?Q?/mTBzGpKIyMlW5/WyIHwk4bG9nzDhlVJ+N1QmrQ+Q1HHVBXjYRKZL6Thb9Fo?= =?us-ascii?Q?WJIYqQrrdvtFncLF4MKuVlYRmul3A3we+nV0vM5/m+mZsAX8yPLeBaLOc7eP?= =?us-ascii?Q?TKoWhDMVmoT11fbSZKkrONtixOeWc/jKGMlIGYiO2CYbFLiCmXTi+Rmu4GT4?= =?us-ascii?Q?WEXvjXk4rW7HRpAlB8hv0ORqEf2lzIhmVGtlE5nV89PzpAyl3dHE94OXHVzi?= =?us-ascii?Q?GkI/aJnU0HAbio6eyuDKAlLEQPziV672odbmKGKlt2bMjPOWJg9NRutI2ySm?= =?us-ascii?Q?Tqobhc9M4i5eP+9eqqbwjQTBq+tw?= 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:(13230031)(82310400017)(7416005)(376005)(36860700004)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2024 04:35:26.6325 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d369892d-c5c0-4e14-ea80-08dc812b1810 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: DS3PEPF000099D7.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7653 Now that all the required plumbing is done for enabling SNP Secure TSC feature, add Secure TSC to SNP features present list. Signed-off-by: Nikunj A Dadhania Tested-by: Peter Gonda --- arch/x86/boot/compressed/sev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c index 0457a9d7e515..9474a92e8c5d 100644 --- a/arch/x86/boot/compressed/sev.c +++ b/arch/x86/boot/compressed/sev.c @@ -363,7 +363,8 @@ void do_boot_stage2_vc(struct pt_regs *regs, unsigned long exit_code) * by the guest kernel. As and when a new feature is implemented in the * guest kernel, a corresponding bit should be added to the mask. */ -#define SNP_FEATURES_PRESENT MSR_AMD64_SNP_DEBUG_SWAP +#define SNP_FEATURES_PRESENT (MSR_AMD64_SNP_DEBUG_SWAP | \ + MSR_AMD64_SNP_SECURE_TSC) u64 snp_get_unsupported_features(u64 status) { -- 2.34.1