From patchwork Fri Mar 29 22:58:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 13611252 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 9718CCD1283 for ; Fri, 29 Mar 2024 23:08:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 341D48D0003; Fri, 29 Mar 2024 19:08:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F30A8D0002; Fri, 29 Mar 2024 19:08:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 192C88D0003; Fri, 29 Mar 2024 19:08:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F03968D0002 for ; Fri, 29 Mar 2024 19:08:33 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id BA753A10A9 for ; Fri, 29 Mar 2024 23:08:33 +0000 (UTC) X-FDA: 81951617706.18.F02977C Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2060.outbound.protection.outlook.com [40.107.101.60]) by imf15.hostedemail.com (Postfix) with ESMTP id C738CA000D for ; Fri, 29 Mar 2024 23:08:30 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=v3wKXvjw; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.101.60 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=1711753710; 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=Hs6vtIletVIfLiB2vNU/OSS5KUmsbyBS00A1GGOPWuE=; b=IUfmPE73B9hui1TdGaiz+oz4UvHcid9vqttdiOiUg/MGC0IctogIs13dDCut1Ocgsn5QQQ CXhhXULlKNUUyK+WuSKLk9Cd4u777zLJn0PgqrX2VVvwC82ZgDq431jYi6fK3jTEiWSXLp LCkCYU6A92jhhuxEzgmyltJIqr4QSpE= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=v3wKXvjw; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.101.60 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1711753710; a=rsa-sha256; cv=pass; b=EMn91iY4ItDsjLBB2jkR3VCr8Zwis7aUtna3NdG9UMRWMnqlhF6SyWnOikPGeiDQDM1GYz r4nRZmW4RNjLr9eCiS1UYcGfl8nMKaET+Cd0e7ogljGhUb5y/BLgeyMPyjH1anIEyQufQq IbDCmwddcP+7YdbHip51sxdytPHv6Kk= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LmY81wlUdFCd6qo8wV3jaQpwUUJUakr/xhElDtb4kjNcZ/4ud4qHzFbvyK2is5E/FQVnnf6KpoSJfPB/vqd30Ccf2FhoCfDXI3Flrn4CvHekwe5Pj0WMMCtGlUX1zOAThHtPYmKWS+EhXtxktKRLKs9vzCsmBMlIa3UlkqKgNtAr09TMamfUfL4tyCr2/ILa/JWSWeNwiJMEZTVxPRMZROyNTyNvxgY/Jg9utJOn1R9wF0b3vUc8L6Om35NIWCsIrpsjc7baNfF7e7pZFYlG3XWf00lK8VClhJi29NNcum3Y/5WW9ShYx6RPj8zk7HBw6xavB6k6yF18G1x7ArL+Bg== 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=Hs6vtIletVIfLiB2vNU/OSS5KUmsbyBS00A1GGOPWuE=; b=fDQ/r1H2tcupVeFXRTxpoevdYPnS9V5tEUMt2PifVARe860rSb44h1JzV7HBXzi/Qa+tauDfVRPvxxESHi7bNVgQFQK8+oSVCcdJCaBZSjIM5f/RaNVMl5DgNLnXqoTb6oAIYjpfTPhnpCBh6UfXlT2OIrehx8quKbmDDqFI2F5PjzGlpsEwq7eN+5ChXwW2/twgov5hzJkCOKg5f8aaOlX4B9qY7GNyczJqcEWS/omWTt1ADIV3UoqgRGWNXX2PJQsfeEyyOI3yteNCmSZQ4UFM7JRZeXjkSt2Xx59g3JIBG/IpetFgHZ+VHXuYUdcp5WspzIfEV7aqmXw+la8crg== 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=Hs6vtIletVIfLiB2vNU/OSS5KUmsbyBS00A1GGOPWuE=; b=v3wKXvjw9sGO5Q1VIWR6cafX4GbqdyINHexO6Za1gY4It3TBXZYnXGCbAiq5Pbui/K+c0x+ycqK9x0mwC1jK5pMRRmjqeVB30nJpOo1fdfptyIobGIS4FXQSWenIcU7+uOTyiUrmaD+bNaiGlZHd9mWhXlgZjpUnwxAtHQcozi4= Received: from DM6PR06CA0059.namprd06.prod.outlook.com (2603:10b6:5:54::36) by SN7PR12MB7956.namprd12.prod.outlook.com (2603:10b6:806:328::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Fri, 29 Mar 2024 23:08:27 +0000 Received: from DS1PEPF00017092.namprd03.prod.outlook.com (2603:10b6:5:54:cafe::a3) by DM6PR06CA0059.outlook.office365.com (2603:10b6:5:54::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.41 via Frontend Transport; Fri, 29 Mar 2024 23:08:27 +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 DS1PEPF00017092.mail.protection.outlook.com (10.167.17.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Fri, 29 Mar 2024 23:08:27 +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; Fri, 29 Mar 2024 18:08:26 -0500 From: Michael Roth To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v12 06/29] KVM: SEV: Select KVM_GENERIC_PRIVATE_MEM when CONFIG_KVM_AMD_SEV=y Date: Fri, 29 Mar 2024 17:58:12 -0500 Message-ID: <20240329225835.400662-7-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240329225835.400662-1-michael.roth@amd.com> References: <20240329225835.400662-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: DS1PEPF00017092:EE_|SN7PR12MB7956:EE_ X-MS-Office365-Filtering-Correlation-Id: 8b111cea-4cc8-426f-97eb-08dc5045249a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZAVczZOg92p/Mb7vMsVAXeZclps4PTA4ROA/eB8m/Ebt6cz0nvCExFaYLsIT9eTIR2DI0gFBnRpDHlAl37yBFuaMVvRuR4G/HnoFaoMZ+y9BR9BDjVH+Tu5oGzDBKdcyBXcfUf1DikeHiI+XoX6uuXdl7hW6iEojbIfhKG/52+tldu+QyRWzjIWP8wJUPGGlvtpGWgBJOYnuLhtF3R2iJi7rV21+zu6qmFSnfPDUfzuqdXl24yakh7krWQYP1RCWcQ+Uxj9arNjb9ls2/SUSZOb7BBkE/xnFUN8VHpsItE4e6jQaTuQ6+uNI3HCrJzscNkvtQkUgcOUqNuRr2IhE+ZJj33roHsh+wzgWwCZovHBV+cVoJMbEve+n+KjXyIb52pRXnKxIOTQA3S/cZZ02BL/C8AyPehOf2NhTTseWtkRZTcoLDg5mpZbJEHrmxacW2FaK56aeXgsOl2WNms/y5vbhSSXxpswVhGVqq4Pc0c5SRJl82kvmkPgFz04JJ0wSjtjRR8ilwv2JwH6b6/U3qpvSKlwbwb4ekcig57BxEInnGRIBCqBR/4T4TMt43zLlbvER9+1mnlx7nAHSjRRfpCl70VUg5idYo/8UHKdePtRNpmLZfsuj23DFDzKBH28fLtIDV67Fe+AiQiUcfK+zQ1sVTohf3wMKw8U/awUJXLH+IRPOBWHnkUdaxcW7qZsGsRPFe/I4v64NYWUzjqOxvCtZz+qSO6ayPa29mPR5i4XKPkXRKTIeJ/EFra94gUR3 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: 29 Mar 2024 23:08:27.5907 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b111cea-4cc8-426f-97eb-08dc5045249a 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: DS1PEPF00017092.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7956 X-Rspam-User: X-Stat-Signature: g1rjfg7zfrpynn7iqbuin5bf6xir7rcn X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: C738CA000D X-HE-Tag: 1711753710-544280 X-HE-Meta: U2FsdGVkX1/+SYBLFNyTzYJ2buRBPJWbaLjP2Tr0Fh5a/itpnAOvl3NmZXclj2Bk7KazdLysYbwfP19mL/LzKO6IyPxoNsNPWgW02ZtMuMAOrylvIrcVgtxPORXo7Gtw9f3o749urmu+TjF5HRDHhJGjkXBuP/clzfSaabvEHsGt2xpG9khN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Td3Tu9q/8MM4E9krKhcDrnY7ZRQffMfzq3niJZ6eDNoEDEmD3F84V2IXrQ+dDQOwNa3kEqq2Bt3b7sjAF6qx8F/kIdz7V6F1/C8AgD1zQudl/PnW/r X-Bogosity: Ham, tests=bogofilter, spamicity=0.000009, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: SEV-SNP relies on private memory support to run guests, so make sure to enable that support via the CONFIG_KVM_GENERIC_PRIVATE_MEM config 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 6a76ba7b6bac..d0bb0e7a4e80 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -123,6 +123,7 @@ config KVM_AMD_SEV depends on KVM_AMD && X86_64 depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m) select ARCH_HAS_CC_PLATFORM + select KVM_GENERIC_PRIVATE_MEM help Provides support for launching Encrypted VMs (SEV) and Encrypted VMs with Encrypted State (SEV-ES) on AMD processors.