From patchwork Wed May 1 08:52:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 13650319 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6FAEC4345F for ; Wed, 1 May 2024 09:05:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 58EB16B00A8; Wed, 1 May 2024 05:05:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 53EDE6B00A9; Wed, 1 May 2024 05:05:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3915B6B00AA; Wed, 1 May 2024 05:05:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1BF7E6B00A8 for ; Wed, 1 May 2024 05:05:37 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id CF1891607A2 for ; Wed, 1 May 2024 09:05:36 +0000 (UTC) X-FDA: 82069243872.21.CD708E0 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2080.outbound.protection.outlook.com [40.107.92.80]) by imf08.hostedemail.com (Postfix) with ESMTP id D0FE316001D for ; Wed, 1 May 2024 09:05:33 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=l9jrihWB; dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf08.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.92.80 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714554334; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Y+FNVfD9fNFkqi60nkH0uAzq1nrTCqNbeox2T52AD2c=; b=QP2W4DjLkOx/9+/ravflvk11XbcKDqkUAgUOJJSMKjbzmy9LAfJXsrgjkOWk47mDFY+jaz oheRslaUCpxel+1HQoIR+C23Xw7G0AWtnt/cDNFv3aSS3tMuYJa9gvCzVDF0601ts0woJ9 aXgmH8oKM13iMzim+5sxb4fyuF74lnU= ARC-Authentication-Results: i=2; imf08.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=l9jrihWB; dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf08.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.92.80 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1714554334; a=rsa-sha256; cv=pass; b=ha3mj4JkhbLLO73jidTOTnQqqB6+1mTov+pMDJIMBWYt79CahpmiajByWlwQ1wltZYcbll z1VL2mh02SLcWjw4QdVuF7Rt8v4ja64Ti0ouHMaqmNRbvlap00Ln7G0Ionh//7HnSOkDXT EdM+8emzRvFZUaHDZ0BALj0Ok3s2yjc= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QalWgB1Zn+TsHYgm70ySjNhuKkqgoZLB71HIH75C0fUh1/jlkwSIYdin6goVokzmmTxnWGUG9akMG/FwBAlP4hIsEcvaxz0BLy3fMTwFM6RzUeGkvn6jtCzXOJEiBxsMjSUVJsvrgG7CROupKeq/cGl+dKhzjnvY7TV2Z3uRgCjM1fe+TX0xLqTPE6X3KwjGmUWWSwz0XBNUJ+Xg927BYpskvFhK8lq/kqFgAB9mdyUItPNitqt5hByd8c00cGA4yUpIQJJpHAWEcnsiU/rFvn9p+fHs/SQbHYPgyfORafvdEoBTvSmI5ipjJxDvHEVdKcBXkIEd3iuSmVbKURoRdg== 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=Y+FNVfD9fNFkqi60nkH0uAzq1nrTCqNbeox2T52AD2c=; b=aqw1meTMsIoxPMwOo2ubzyzR+4BAnBHGGg+dCxYlucPQ09jyDI9c55im/xnM/EQlBaQ5F3anjWslz6qFq4dWIHAOFiQAi+hvFzJPgQ0TIoA1NkcU1+vSx1JzTDmihm16rM+64nPrzFiS3HI7pM+22FEbIAPK7IH9aZwcL083mYLfUziX1X+rSijX/1UdLZFLfv+zMX0i1fhflFc5jaPCtOr3pZLr8U6fz6vHVl/rnHfTfsajcdYMsBq6OFPPCNAt9n7OzKHrKBWq45DiiuYR8iUCtB7VXOER68Qa/uDhY69haBqxZynfMjbxi1RmFuH7X910fZdQ/+uTpDyrjeAIjg== 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=Y+FNVfD9fNFkqi60nkH0uAzq1nrTCqNbeox2T52AD2c=; b=l9jrihWB4tY98VUlHjoLDc5Mb60StL1LeHv0v9bvd59uksr1FVD59CnFMVUy9fySEq11f1F9mvff7/k1VQAnk5W8Gokw15C2ttLxmQgaeEZffDFS63mxvO9HLW3lY+LCBV0cJI6EzuxmLrqwMPq1QT++duvSQmvu82yVtxtzTF0= Received: from BN9PR03CA0892.namprd03.prod.outlook.com (2603:10b6:408:13c::27) by SJ1PR12MB6220.namprd12.prod.outlook.com (2603:10b6:a03:455::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Wed, 1 May 2024 09:05:30 +0000 Received: from BN2PEPF000044A4.namprd02.prod.outlook.com (2603:10b6:408:13c:cafe::4e) by BN9PR03CA0892.outlook.office365.com (2603:10b6:408:13c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.34 via Frontend Transport; Wed, 1 May 2024 09:05:29 +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 BN2PEPF000044A4.mail.protection.outlook.com (10.167.243.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7544.18 via Frontend Transport; Wed, 1 May 2024 09:05:29 +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; Wed, 1 May 2024 04:05:28 -0500 From: Michael Roth To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Brijesh Singh Subject: [PATCH v15 17/20] KVM: SVM: Add module parameter to enable SEV-SNP Date: Wed, 1 May 2024 03:52:07 -0500 Message-ID: <20240501085210.2213060-18-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240501085210.2213060-1-michael.roth@amd.com> References: <20240501085210.2213060-1-michael.roth@amd.com> 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: BN2PEPF000044A4:EE_|SJ1PR12MB6220:EE_ X-MS-Office365-Filtering-Correlation-Id: 7242241f-b64d-43b0-4242-08dc69bdd949 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|82310400014|7416005|36860700004|376005; X-Microsoft-Antispam-Message-Info: Owcem0LFO1Xy5hTdrGqTXe9bK7gK1cF8+k57St/25NcVPKfM5ecyP8QtmWqP4Wjas0dcrFeoSQnlAjacq8/3NjInnnLUh8WQXoq2RZyMtCnz1iyRzAFHdPbjXeYulwRQjYtl+WQmPbH/yRqTk4lpkVlPues09UAodv6PphzHk0qjmBXC3Bu3AzvNKY+C8o5nFIVZs2SBOolcvXwi/lwmfP45iqoH8vkPJkUVRjZ5Y/tVoriN45MDX8kAtenQql62TWuRpphDgvFkyuNnPJyynlfsaueFgiSIPObzqqQnhGtHJzTPJFFgm+sPpOZLfszaytQ8e1XctkPKu/9p5YC1SRM57nI6OLEubml4yV062HXsdIKwtawvyldyeqRUMpjeh7+o3u++WxBMFU4ChNt7uuwwFjWRAluYWcTyxhRqrVaQVHAhvDkaQfWCrb3P9nrwBn+qnnqdUDtj1ILuVhfcrQCD2Ymql5cZjYNoSfHyN7j66divwIO9YefJJ0JBLcvYmY4sxsRmcjFfAphdM6XLz8xSZly+tpVnVIEx5LqLawyGwy0zYsDsAtIz9lvDqyoqSWvPGj1i6rw8+rP5+UUMPtX0tWe0I8JJF7dMZp3FUQtbpNPYYC9Bwr8axpGtueGVH+294HVTXw6vGR1in9oQzNLVSfYVauTaxvspi3bqN3KXbJlpVb3kDaZ0kWlmPqY60WfXJ3ydWJmTZ043BdcQ6fA7jaW0tuwmXFSQyWJqqrX0r2GhpI7XMfAZRHW4r4+alLQUgxPVoT4J6I1RAawTa+1TA4H2u3/rwV5UYTiaGd2DFHOln/TR71rUDwoWF4ccJExP/toGKdX+7FbrVnQlvrJ15IWkaKFvsPM45tXZNZuOZfUPIZOAV0AFDESI5DGeLWaOpXCQYNIcs+X1yLlyn4ClZioLO1wzFJaFMXAPTaUb+hpGLbc21njUR+UDly2IMJLSqI1uVNtnTyG6/+y7RmMvmdqgPRs5drEaOhKEkat5RnsayLqfIQ5qBUjVyTe9YWG8tQJO9uyFbYQYeDj7ijKO5/AekFRFkGya9Wv754N88HZnSby0RAR9a43F2W+yWv/1aXlio6ZWNoLvSq7nkYbX7B7kn0hKi9P1FoMNgx2/ORwS/W/Rp9/X7WIXdfXgpba03legx/HwIjHvudh5v55VGTxZVyMLiI8c271jQBoPvA32fshJmEZY0CdEHBO+1i9rua7hhWpO3TGLcM7N8qhJnMSbIDa0Zs0IaaPzwQpEKaEBfJnH9Q3Kz/+STEIhFr90WMfQL8HqD6Pvt0x7ySCXSnob+umjN2jmDv3kEo/ndgpR8aZiCAyKq8NEHouHJr3kdUUTFgs39mD/r70El4xIexskJgnlfe3pEy/qeqw= 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)(1800799015)(82310400014)(7416005)(36860700004)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 09:05:29.4335 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7242241f-b64d-43b0-4242-08dc69bdd949 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: BN2PEPF000044A4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6220 X-Stat-Signature: mxbdpsu9j1yihg54isjdyiau7fdt1tdq X-Rspamd-Queue-Id: D0FE316001D X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1714554333-887343 X-HE-Meta: U2FsdGVkX19IgAnq89I857LmoIQiPZb0qspNkWzk9J5pcJyUJEo95713WKgYEl7AELJpqzPQKjn+phlEZyvE//uvUqOjpxrSepnB6laLwS2QlMEF/uG02QFKPm16q/mFbU4wSAY+rBJT6OuE3Tr6m7a9249187JhDPt/amPZkoJM93sZF4tS4m6gAg3v2aDH3p5Y+hhvoxnygNXx29VGVWMFwik7WDJEZ7aSWjBHH1CdEySkwoutyrswUhCoAcXiUBOES5axpUSF/lKXGH5rZbHlkgGS/ZxsbUF6AG+05FNLK12ZTlsI0fYaHkkfMrMzVhMNE+q3LqDZvI3PRg6bjit/86VB6Nhhx/7VmJYN82kjuQB6130UqNktTN2mutDDvEf9ZFHsDba4Iwbd4mM5CzPhCRQE1EhxyGUBRQYvPUeFOa1XMaHWeygkCpxOdFjGuJ6LypBf5TiE9IvWjeHtftWb0teQAC3GqSfHiqVRnBoEXn7FQv21wD5n6rj4xMTwB2icXmXkK63IzOkiiY6ZzzcApVqKYgPzFxgjTkNnANHYSmqYQsQfSXQ5DSKgyhY7Ny5jjHlp6038uBt/fbpFLY4gAJzaSyTgk6u2gxeNIAl80ytvdz1+KrW2goZMWgrN4vSuG165inPy+TzOMQ8edWIissAhGVj8ZTbbOM9OMlGowjwmq8PP4iIB1BxRJh+mzmMsleh+avFEoe3dUMLGAJ8hO2ngprUiDPGNPYtQZLUcI5dnqzz3jx0EKxy3D/6boLGxqxuZ4jEV64kkKvnl14zJ3Bh/avctq6SamkjyqnlECN10kmtFEvjGsE9cOTRnh/zvaHwQySeNTQFIDbf1q/+iiY4d8ZlyYytShbCLMfj9KAduaUE0IWSWhuP2OMGti3iKRXpPoau9ONbmtKDByuHzBQQKDPHxQrXImzMoCCshspouWeHkj3qFZdMNMndwlwx4E5i6SkjFC51G/8p ITzUYY5Y LeZYP73C1y3q3qr00jImy2Yxl0Z0Ji88Aea9x/ZOdr+S4oTiDlLo7IUm31C+1tYm/uHBydN/X2UMZ7R9l7NgQTIT4/FegqXNpoFTDBhCx+ZOecK8ButkmP9m7KJ3BHDBMHFhLcFPYXOYFBcwWpUiThuA5dxPu/GKvcxPByZN8M6q2AUGeYoz3HbXILcdvDisSWbsyUvRfK8jzhRWo6lx4tmFil9MA+tACT9aq0Slm4vWj7cWDYNXrrHDR9HzWiauFOYkODU2ebwqkY6+/Ma6ceZki4r6EEEPBdkiRxVNyESNvvuhnhYhw+q3wN0YZeNN/kH7+wBpXR0v/jKnTAzMEdvJ5UX9z+dyj1ZG0baDLojAaIAg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 e94e3aa4d932..112041ee55e9 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -49,7 +49,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;