From patchwork Thu Apr 18 19:41:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 13635352 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 B5A92C4345F for ; Thu, 18 Apr 2024 19:47:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4849E6B00AB; Thu, 18 Apr 2024 15:47:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 435056B00AD; Thu, 18 Apr 2024 15:47:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2AE396B00B4; Thu, 18 Apr 2024 15:47:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 0DE486B00AB for ; Thu, 18 Apr 2024 15:47:37 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id C828BA146C for ; Thu, 18 Apr 2024 19:47:36 +0000 (UTC) X-FDA: 82023687312.18.6DA2C1F Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2062.outbound.protection.outlook.com [40.107.93.62]) by imf05.hostedemail.com (Postfix) with ESMTP id DFA49100007 for ; Thu, 18 Apr 2024 19:47:33 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b="bsb+al/+"; dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf05.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.93.62 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=1713469654; 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=+G51mueTV+Sdz0lYR3YMAwLh9NKNaUf/zMQeba424ks=; b=QCHsyza8SwY7ImH6vTrg2LTt1P0wFgUmMQ5R+cX6ZRu24DhQEoXcPDMyeNQ3oL2iorWLAA 5LerWbhWg/cp+wBF/35ehPcEKxcxIIFSk8hJK5o6pwXNFT041V28Y5bCcvUHsXYhEbOasd E2pAnHNFvKH4dYlPA7o3qTKGf6adDao= ARC-Authentication-Results: i=2; imf05.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b="bsb+al/+"; dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf05.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.93.62 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=1713469654; a=rsa-sha256; cv=pass; b=xzVnSc++TJN6e/XfcL/8kiQdE9KHByv3ojL/aPi6CHM4XZlPVEAGoUoHxcY+fIbiq0t6RW 6RhGVeZK76ykFvdBMzjTWIGdy7MokKsZvq/gxDeJPu+icHHyOyDUwhLwsy7y4jlbmymQDC pVjRAKen+eZtyRqNAPcUH3t70Wu27K0= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hHzeVApHM3eBAGnk0zS0FIomV9X0ZYN5tWVDRDHGj4ixBqOx4zgcSOySKt/0C8uTq3q27PqitCiMfvJ39MGDnWJfpju+xQfdsrgBIGffk646TSvamgVuWuKFepbG562cxomybv7ClTAbXDSNXwnJIHLK70LZMng6ademG6VhjKcwmWJ6jTRKhIugw5J8cU13qRML2oKbsH0B6BDedZoqOO+JTHJ2ebN/+k6+uctp74Qnwb30JKjdZRQoVyfShimR0x0V/RAeXm8UvucFVUn/pzWxZ7FJoz2CQ8vRgMbZhb4UNPTg10eHPSOWKTo8fDKaXD0nshRma+mVQjLUJHAHvg== 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=+G51mueTV+Sdz0lYR3YMAwLh9NKNaUf/zMQeba424ks=; b=BqNkf/ye2xzurnXRFICMKSd/HPS0DPQFuSrezazL5rZ28uAE9tUI12i5n5mdRx17LpMMNKGKQ6dM4v6lrRKhGPa38Ns20ZraCqi8HIbzvtTYx6JdG37s0piUN8cYXSE/o7ubLqCq9KxN7aia6P3cQgzjEJbMX8Lyvr5iSqJxISl0q2rUiywmf0oL2DH3/c3A6rucAR9s4y7rrrLJu3bWsTjfT1nJ3uKirhnfiKixwW9WIsxVmiXSvqS4IgSgSnv+7J9qUBkeia0NORPwCDyjiJPth6tCl2juMAXbjyd7fs9KtQRWR7hr6lfqrQLh58WoON0v7IGMizR5GLLioc2agA== 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=+G51mueTV+Sdz0lYR3YMAwLh9NKNaUf/zMQeba424ks=; b=bsb+al/+F4BEopdNimTPOHk4iTera7y/a+fqa8S/mezNfUExyaNNej9Zcfpcq35bNr7r1uXPrNB05rV1NBRsGisnBW0v1r7h0tDRSAHwvvZOglMNB6FJYUfiWkybzpdiFa3MVK1ID+9+V+hgLLHQhsMpNJ1lZ4tOj0qq0iDa8fs= Received: from SA9PR13CA0167.namprd13.prod.outlook.com (2603:10b6:806:28::22) by SA3PR12MB7902.namprd12.prod.outlook.com (2603:10b6:806:305::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Thu, 18 Apr 2024 19:47:30 +0000 Received: from SN1PEPF0002BA4C.namprd03.prod.outlook.com (2603:10b6:806:28:cafe::fe) by SA9PR13CA0167.outlook.office365.com (2603:10b6:806:28::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.30 via Frontend Transport; Thu, 18 Apr 2024 19:47:30 +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 SN1PEPF0002BA4C.mail.protection.outlook.com (10.167.242.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Thu, 18 Apr 2024 19:47: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; Thu, 18 Apr 2024 14:47:28 -0500 From: Michael Roth To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Brijesh Singh Subject: [PATCH v13 22/26] KVM: SVM: Add module parameter to enable SEV-SNP Date: Thu, 18 Apr 2024 14:41:29 -0500 Message-ID: <20240418194133.1452059-23-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240418194133.1452059-1-michael.roth@amd.com> References: <20240418194133.1452059-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: SN1PEPF0002BA4C:EE_|SA3PR12MB7902:EE_ X-MS-Office365-Filtering-Correlation-Id: 7058a6d5-b1e0-4d76-897a-08dc5fe061ef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: haObDg2x85k+C5Ve+hXk0voAqj9oHsBc3A4T6pGb4rNvxqGbrgtv2h9q6sxzCroX2J1binc6t18HZrt5Qdl1BCr1xYcjLji61S+9+rsHYZX1b0IT7xiRTA25SEnVLYGNvg5YyTWYrsDfRcOIMnt71gnm/IHipQWpUhfAjqy1mGbnQiURFJHxASNxZZ/CV3ABUe7Gx9pUoyO3rA2vtoMEnIYEnpoHBfOJLlzqpz63fnl6OUPJeViyzVhdUHW1kbS87s0ja7QoO19zqDcd4Fjw1p8Ihx5yYGpJBhLIG/6PhKTulIyMtE3VpQMZPEfCMpQne8ElF50JL6A3tX5+TCYcrU6Ug/XxEEaI/uwz2AXNWtVyy30v7Sfnst8V5u0/vurI4K96/Y3W0W5hmsh7ny79wEZ5r3KD7lwZ+Tl4eF51lM6WwNvPb6OQcnfrhxy0Id80lUyM0+4xh0mA0DI2XVhGFQqGRd43K/hxkbALVlac+1PpaJ359lh1+ZZttlRA7CQ7BQPjCiDFBEyuM5lB0Qqxcbl7esDaFmmgl77/wA0FuNj8gHfsqKFiNuvSOHkVLgid55/YHXm42jMKlOTUeeaRZGIllgM/PtJI5cYRlgqO6bJ3f6a1TiT2Uqd37ElHaEYBNcM7rl4GFIWMjCKSjTDZXbFJo6n1k6SwdvPpIXdKZjLWdwoSOwoXKsk3LrYH/+G/+fSnGu66Q1w1MynjghE6ty6Q0SghEDJVpRSOx3rf4Nz+Q+cucwoIUfe0fKk/6vdm 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)(36860700004)(82310400014)(376005)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2024 19:47:29.9231 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7058a6d5-b1e0-4d76-897a-08dc5fe061ef 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: SN1PEPF0002BA4C.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7902 X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: DFA49100007 X-Stat-Signature: m4ogd9rotmwo161qanjs5a8ifkoqpcq6 X-HE-Tag: 1713469653-374489 X-HE-Meta: U2FsdGVkX1+3ibZs3fIAKhZXzl2Ou2wYvyyGk4Y0YbKcVcp6bP3R455tZdUIHDjHk1UFsMe0wKFRL2hDvR5dUENWfrCLi7uwpQ4upuf0uv+njSzsM83ozafEY6D3dpurI3AEOH4IbsfilNAeDglSNI0/DDsFhfMKnhpbcLWUEFCPAkDgptA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Sbxgk8pPWZA7QlW5Y8k1GZTTapKoJyQBzrtuGlpjIg4ZJ0J/g/wJ553ElxcJ1A2Dso2QiAKiG9r5AkWWWODcIkQBGEh0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 03bfb7b9732d..de51c3aa0040 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;