From patchwork Mon Oct 16 13:27:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 13423271 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 84600CDB465 for ; Mon, 16 Oct 2023 13:34:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 27D2C8D0079; Mon, 16 Oct 2023 09:34:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2065D8D0001; Mon, 16 Oct 2023 09:34:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 07FED8D0079; Mon, 16 Oct 2023 09:34:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id E817E8D0001 for ; Mon, 16 Oct 2023 09:34:09 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C30C1160974 for ; Mon, 16 Oct 2023 13:34:09 +0000 (UTC) X-FDA: 81351418218.22.B411250 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2053.outbound.protection.outlook.com [40.107.94.53]) by imf24.hostedemail.com (Postfix) with ESMTP id B12C918001F for ; Mon, 16 Oct 2023 13:34:06 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=suN6sdi9; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf24.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.94.53 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697463246; 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=wsAfKNMAPFhTgdRyhK+t5rk/oQLLqXKvgTPOydWXrvk=; b=iYjJAqVGyHDfiXoTMwOfJ9jIvwMKuWTRxy3Nn8FNqgGYQ0m9BVlKKHmyzHea5rVa+rcYTo /HgGOAzBE8xwxeYQYc+a6qZB01cV7oUTq9htserBvASolte3RJiVewRX3AKtskV1cGC5oo hIJXfJ90a5NDY+HIGrCzK6KRolGRxyc= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=suN6sdi9; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf24.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.94.53 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1697463246; a=rsa-sha256; cv=pass; b=FCPMaj7PtfPZqvODfzfY823IAKzrufmFhWyZk8bQ3/1Za1Bl6ur5wCONrYqPewY1p4rbxW AN/Qvgd9qgZSEaGxLsDc7waePac/YabScCyE8M7q1Y0x1oqiz8tPmZDhaGcQNX5LYfjTxf TsXuSnD12/mOsxXNiA8aaArP537HgUM= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WT3EnXEn88VbDl5+qAV9Xuc5J6aFadnjZ2CPBpc+a9s0yq+gls96fo7jIcYXqLZICKNR8l4/SuFennUcJbb/1aMRa1fIeOdD44jS1Onkuu+Qeb0/tzZac9EojJqLpbUFRhnAXu/vplzABNfFHnNs8LqFpcCLSTQQTEaANBn9WUlI6KaEKx5BlbYa7kLREgtyFDhxnuh2PBVgkEDpx26b1v9G6zgsmOuFnGMnF6AQGX6cBZ9+C6eH0pHNSrPVpB12ZOJLIAFW4DkbCk0luCI03ys0IH+0enrzaz7D4rxhSAEXwcPpzux1bd+4fntaf9lmHxchy915FXxefg+/SxBPxw== 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=wsAfKNMAPFhTgdRyhK+t5rk/oQLLqXKvgTPOydWXrvk=; b=f8wAve2bYczAN73Pf47eqyTFwOeKhdb4WZMT6ClSuBS7FwBjFfqaSyUoAViBJG9vCWu1JNrYnrv6iMB2szhCbuMaywQFbZ4xdhviwLpStv1vbGHHi1CabyFk1u21P/PzO+ugMKB6XxuiGvEstMnWJTgCEDIN1wfIcdzFpozwCeS7rZ61sLUt4CRJhYl6Xup+h3Vz4vCq7VaCZTZy7zsr2Ql+cYzgiZFCLC7z9UvEO0+VbiX9bQc4RwLPA/d5gTOt4lHgmfqovP8B7/506abl0df14C1RRzoRMopdmmMohSWf70g1MsFEhHeI/ToFxoCSHTHIPMt+INpcGxOTT3SfKA== 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 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=wsAfKNMAPFhTgdRyhK+t5rk/oQLLqXKvgTPOydWXrvk=; b=suN6sdi9dmnU4yOmo+0lMVpySg9oNSHiBZkemMRL/nBIIFLB3Q+UHiD9NXZoliaezapXyvnzhn7Tw7mKrSwpH+xxwEUywiGbI96pvS4g4tIXexlefQZFfVy6APiSP+FRvA9pXxZYT88H9Vkt7W0Z9yP4FoEfnadh//oLgFA013o= Received: from CH0PR03CA0023.namprd03.prod.outlook.com (2603:10b6:610:b0::28) by LV3PR12MB9331.namprd12.prod.outlook.com (2603:10b6:408:219::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Mon, 16 Oct 2023 13:34:04 +0000 Received: from MWH0EPF000989E6.namprd02.prod.outlook.com (2603:10b6:610:b0:cafe::12) by CH0PR03CA0023.outlook.office365.com (2603:10b6:610:b0::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.35 via Frontend Transport; Mon, 16 Oct 2023 13:34:03 +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 MWH0EPF000989E6.mail.protection.outlook.com (10.167.241.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.22 via Frontend Transport; Mon, 16 Oct 2023 13:34:03 +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.27; Mon, 16 Oct 2023 08:34:00 -0500 From: Michael Roth To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v10 20/50] KVM: SEV: Select CONFIG_KVM_SW_PROTECTED_VM when CONFIG_KVM_AMD_SEV=y Date: Mon, 16 Oct 2023 08:27:49 -0500 Message-ID: <20231016132819.1002933-21-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231016132819.1002933-1-michael.roth@amd.com> References: <20231016132819.1002933-1-michael.roth@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] 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: MWH0EPF000989E6:EE_|LV3PR12MB9331:EE_ X-MS-Office365-Filtering-Correlation-Id: f63d2624-af08-4c51-2777-08dbce4c903f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hQIUvsCU4k8v4G5jN9HSHJVQLA/rQk1bBWq2rc5btrIDxdOuWHDDW8gTYbg7Gch+9L7/I+v0607Gu+B98c/P7xTJV5UbuDe4nd1CwowLID47d+4RCAKbhzsLttwWf4WoNryw75TEVA6Ab/fSStEgKNjdufBbyQ5xM/d4NLqJlfgaOyhhpj0Ts2SpdQzgNxJ/b/r6+P/al9qJgE+uHHCgjbFs+DCV9nvDAomCe8QOTHPoNSvmKKOohEbMsBv3ssmxktmeOkuXBB3YnztlqxbTTT4Fnsiz5friA2S5fQwBUZ2B4eEPmmarK3Z+S1VqHMj+2kZ3l13KZ7U7bNKzFZ84iSqOjNG+92ScSbpLfMVH29EHAiR1Ural6k+6GlhniGgZH4bhtbHAMBno7ePQRv9HaJh9JgnBfvhYxCRWvmn2tjAfdCq9y95W9BQM8q8HeYh8XcHdq4MFPEyeTNyqpvB8jmy+xxcqZZYt66CxzJU9OaxacqsoXRsFvXtGexZ+hnHgdYSBqjyD1nGgMO26TBBCaQtWv5ek1d2WSjNBMQmvQEajXNLeSUYWxmWhEkz0EjfO3zT0vOllkU7TAHfezpACSsLeB9+e+Z+IRa10hdXPFCusZczDqR/KRzzFQu3YCEWNUfYT9htrh+hfNcxbSFqdUJMDf57mQcp2YR9DULXy3uYraBeE1zN6/8g4hhPjMAT1k9VBQA1keziIXBPOAze/k7BFKSDYMiQgHV1a3tEgr+wvKdIbgvob9t9N3Hfma0zavQjoHYgNofOL8cnmcM2+0A== 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)(4636009)(396003)(346002)(39860400002)(136003)(376002)(230922051799003)(451199024)(82310400011)(1800799009)(186009)(64100799003)(46966006)(40470700004)(36840700001)(40480700001)(5660300002)(44832011)(40460700003)(6666004)(2906002)(1076003)(26005)(36756003)(336012)(2616005)(16526019)(426003)(4744005)(356005)(81166007)(86362001)(82740400003)(36860700001)(47076005)(7406005)(7416002)(54906003)(316002)(6916009)(70586007)(70206006)(8936002)(4326008)(8676002)(41300700001)(478600001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2023 13:34:03.4232 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f63d2624-af08-4c51-2777-08dbce4c903f 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: MWH0EPF000989E6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9331 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: B12C918001F X-Stat-Signature: np4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xLVa18gYSn7O0z4dpp2FbqhNhyi15Be+eNrw9mkAR4isgERwIIx3RCU2ijAXQWtz36lwX02M95A++SesZwQxOvX7bKiVaZ0AAwCtAF1nYN2Ij+IjL6q316lDuZS/MU+1ksDNnUQ0aHxeg4dRgRmJ89zm4ecuaRqouo4OYEr4tAgkJx5knmEWoJ8fQ6O2IL09gSN+zT0ZcCr05GRhKX/hbx2Kh1hCayZ5PM+rygUgvMi1sMyWdUK2UI20zeEFc2qO5Ne1IQ9on5NpYCjQR0N021hNhjbdAXZRDhhqQ+M/vK6itCsuZvpDo80ZIEH+v5thgyt3dhxW6NIbEbXU1BKO2yTs3mJOKTa 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: SEV-SNP relies on the restricted/protected memory support to run guests, so make sure to enable that support with the CONFIG_KVM_SW_PROTECTED_VM build option. Signed-off-by: Michael Roth --- arch/x86/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 8452ed0228cb..71dc506aa3fb 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -126,6 +126,7 @@ config KVM_AMD_SEV bool "AMD Secure Encrypted Virtualization (SEV) support" depends on KVM_AMD && X86_64 depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m) + select KVM_SW_PROTECTED_VM help Provides support for launching Encrypted VMs (SEV) and Encrypted VMs with Encrypted State (SEV-ES) on AMD processors.