Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1829020lqt; Sun, 21 Apr 2024 11:07:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2QCYPzXis6Bl81a59rqSGH2IIBUtheGETsWz9xW+C+ai6eE3oD+0nEPJopQODegeg6y1sUnEjjtogdcueK2bZIKuKxkbhsYBfJlPtUQ== X-Google-Smtp-Source: AGHT+IFziSNPLaWkQYM9mVoppPM81luOZdJC7PhGrYxERPrUzGQxp02rzwJoyJZfouArkarPUlaF X-Received: by 2002:a05:6a20:a124:b0:1a9:9825:a2d1 with SMTP id q36-20020a056a20a12400b001a99825a2d1mr9246814pzk.30.1713722845161; Sun, 21 Apr 2024 11:07:25 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m18-20020a639412000000b005e438e99d3fsi6260163pge.124.2024.04.21.11.07.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 11:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3745-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="pMe4/7sB"; arc=fail (signature failed); spf=pass (google.com: domain of linux-crypto+bounces-3745-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3745-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A22C72812DC for ; Sun, 21 Apr 2024 18:07:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD2163BB2E; Sun, 21 Apr 2024 18:07:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="pMe4/7sB" X-Original-To: linux-crypto@vger.kernel.org Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2061.outbound.protection.outlook.com [40.107.243.61]) (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 10A783AC16; Sun, 21 Apr 2024 18:07:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.61 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713722822; cv=fail; b=gmiA05CP0FhXUqkS7o7zUgTn7ADpmdLeO6ThFfKqFHSt/qXt4y7XuYl7zMJQhJhB+PvGozu99OCZ+Kdf9YAIr5gpfcrr1tX0Cl/vAb+umqcUMQXPZ7QKFCyRxeeR4oNNllSo1u/WsoYh8RsHN1sr5FRmDsI+sfWqeZcmwj9JlgA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713722822; c=relaxed/simple; bh=Q+V+nYqBd6POkZspbyLDxUbWczhgLGTzslpKte0/ECk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gm5dyKtuIOgZs32sqU4RRXMraNZEqe8F+Dv2d5bk/2Ox8AGFuQsuqeyrS/G+rmVZtf4DoIo2taoZh76XLguaaYVb7hSHNVbXEtrXHFfdMvUvKQZxwJ+WCKrDXlYQN5tqVWfsyOuRE6YNvR5wYBV3nGinhMZHW+FE/rOFTXlgY1M= 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=pMe4/7sB; arc=fail smtp.client-ip=40.107.243.61 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=lchikEj6lzpwCZPpoc4/RZBVpisku0V/1DsE0zd4ywix1wFeU6PWnczzk+3x/J2C17L8iO1zg34H36cJjC2NMEKVY1qS0vd/NkItEjLiLFpsXbGc4cTMzTdbTj3ultUVOIoJeICnAOfV//jiZzFg6nhBy6CSU+JTS29jKmVIoc3s+Np+OrnbNs3ZPtAattKF/IrMyXz/QoV0VgjPXdarPzgUYY4M/qKZXjforqyevUlHKOSQCChvb+etB+L9JaEy1df5iD59zl3ySJQc6o+X/zLJ7d+2MwsEvPl1rM8oklXEYXjj2DoI44UQ+cTrm9Z/BAKnABCIRwo+B8uAkxZpCg== 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=DWxiMrBbWnKcm6ydpzx29svDwThWmkLP9QyIGv8efkM=; b=ftPXJ+jVxjcfdYzDwxn0noZkhVoHdyjEDmfXYTQnFuZ2nQkT7b5gf2KSPQxcZ/HPRX9kozyyHY982+IIzh4Op4oEUV4HUsku247419wJgeCL7vCkYhEG/x8eA+iP3qbfF0RaHD6VDuDRuhvzzU/2Rmx0yrO4/AtxueXiyOqpO8j9AM1RS1b/LW2sI8NmUYxPdCYWU1Cd05f+VChTl2drZzbj4QytuQ94Vf/mq+5j2eF93XkhwJeI3pkUt2gi3u8Y13qddmzhZNJOfh5s8iPUxtPAMvLOWyIrBuRFCg1VHrR/+pkQ7gxcSlmxJ9eNZMdAYETcZguJADmLgRYZPyPoiA== 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=DWxiMrBbWnKcm6ydpzx29svDwThWmkLP9QyIGv8efkM=; b=pMe4/7sBvEAq0OuZr6MNt6tGtLittwOHovoQ7xaNweolwSFHIfN9VhLCfB648zXg1wuh3umCz5FDrVyaDwlIeXlpruoSv3xYO5iymucWLJEnYTRJ8ju9TJdjuv0IY+jOR5PSWU71oJ5TfW7iuMPxi19o2pJmv5StPDqKDEWZe3g= Received: from MN2PR14CA0011.namprd14.prod.outlook.com (2603:10b6:208:23e::16) by PH7PR12MB9066.namprd12.prod.outlook.com (2603:10b6:510:1f6::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.41; Sun, 21 Apr 2024 18:06:55 +0000 Received: from MN1PEPF0000ECD5.namprd02.prod.outlook.com (2603:10b6:208:23e:cafe::d9) by MN2PR14CA0011.outlook.office365.com (2603:10b6:208:23e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.33 via Frontend Transport; Sun, 21 Apr 2024 18:06:55 +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 MN1PEPF0000ECD5.mail.protection.outlook.com (10.167.242.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Sun, 21 Apr 2024 18:06:55 +0000 Received: from localhost (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; Sun, 21 Apr 2024 13:06:54 -0500 From: Michael Roth To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Brijesh Singh Subject: [PATCH v14 18/22] KVM: SVM: Add module parameter to enable SEV-SNP Date: Sun, 21 Apr 2024 13:01:18 -0500 Message-ID: <20240421180122.1650812-19-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240421180122.1650812-1-michael.roth@amd.com> References: <20240421180122.1650812-1-michael.roth@amd.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: MN1PEPF0000ECD5:EE_|PH7PR12MB9066:EE_ X-MS-Office365-Filtering-Correlation-Id: b56e8a82-40cd-4e50-ebe2-08dc622dd439 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?AiLufHETMZV2o/iR+DNIPiYIdRlsvMk0NENoITWX0b3Pl54nf9gTBXTHbRoA?= =?us-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bL492dcJ28RywvsSH4zlJfMdIp+W?= =?us-ascii?Q?OiJOsxHuI2kUX59JIF/moJcTk+4ZNyZwSN8NMojBtscu0zIbpV0Ku8vt2Y5O?= =?us-ascii?Q?vy8D4PbwwyW6a0acgcKq6fr9T+j0Y8aGivQAzZEd6LXBUNv+JvAKzD14K6ON?= =?us-ascii?Q?gBL9m2c1mwa+N/GWb+vpXeQRAJ/mqR/4o5440/bQ62tDfVHgxwPp5/2EHLVn?= =?us-ascii?Q?6LvIR97h2CS6R36I7AfQn6+HKkIVKRad7KZCCzCeOfRI8hlvdHctiJGy4ukk?= =?us-ascii?Q?28QLQlza1uJXo6M6bLo1kjZlMBs63CyLNqqp3OSr+/VS4+Go1cXyc5Epbmew?= =?us-ascii?Q?Co0RbETE7YBhBPqBruiCBriwsweINhqRdWbMQg8N2YZeG4Iw3g0fQucjGO67?= =?us-ascii?Q?i0xJgObXZCjN/Tl29jfyJ02fazDdr3/MFKpFJm2lslGonIfOyZvdjL5lvFG1?= =?us-ascii?Q?WSm/89M=3D?= 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)(7416005)(376005)(1800799015)(82310400014)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2024 18:06:55.2758 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b56e8a82-40cd-4e50-ebe2-08dc622dd439 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: MN1PEPF0000ECD5.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9066 From: Brijesh Singh Add a module parameter than can be used to enable or disable the SEV-SNP feature. Now that KVM contains the support for the SNP set the GHCB hypervisor feature flag to indicate that SNP is supported. Signed-off-by: Brijesh Singh Reviewed-by: Paolo Bonzini Signed-off-by: Ashish Kalra --- arch/x86/kvm/svm/sev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index cf00a811aca5..c354aca721e5 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -48,7 +48,8 @@ static bool sev_es_enabled = true; module_param_named(sev_es, sev_es_enabled, bool, 0444); /* enable/disable SEV-SNP support */ -static bool sev_snp_enabled; +static bool sev_snp_enabled = true; +module_param_named(sev_snp, sev_snp_enabled, bool, 0444); /* enable/disable SEV-ES DebugSwap support */ static bool sev_es_debug_swap_enabled = true; -- 2.25.1