Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1252063rdd; Wed, 10 Jan 2024 13:33:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVcB/RLeJOnBQSgALgOullOzed1Sg+0C6rw6lDneBVpyJy+md4m1WFI5n8WvKLBL3JwVj8 X-Received: by 2002:ac8:5bca:0:b0:429:bb62:8605 with SMTP id b10-20020ac85bca000000b00429bb628605mr184745qtb.85.1704922411253; Wed, 10 Jan 2024 13:33:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704922411; cv=pass; d=google.com; s=arc-20160816; b=Y8xAWYGgdoeAZZotkVgWrOFYjQpsilp8VeQ1IX8OoKlK0FhsLtsLq7MKSx+LQ4juEe 5ihVD2WKh63DncUw1qlNcEkpq871fPU0TMgPqRqPaoENl/LToQ8s6WTWQsrQio8uO6dM e59XqHFQpvBlkrL6Gk1T///B0YvzbcI9GdPRL43Z8qOEoo5coEimaJOcLBTx0YJ6ST/Z XL9j+Y89geo/zqf65EVwaMqDeqHjmoZ9HLGdfi4/mn2rcaUbvGVC5rw7gl++HpAIqYnL NpKOriuBfcZa9W1H1sojrWtplFFIaX3XFyouPA0aOyVXsEDsvciyaLvvWKX93NrJaGvz qDFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:date:message-id :dkim-signature; bh=2EdtsvJBJxu4SP4qGgDY4CjgRKodlKU5nFLkP8ZWXLA=; fh=xcCLp5tGGJsZ0bmSzuwNLYpWAWQwzK+1LRx4c3VEyiQ=; b=VG5fAUJuTCrza9HBMNTTta4deKV55Cq0zAzJfLTNYpjZBM4kkXpdB5a4uxslfNsX9b 6JKYFv3wiGDgcf23dpSW4J6gAh1EQrHyaoUDlScg2c9b81rb3yQttjB92QgcbyrIQPli 8SgQIP3lbYaBzA8iN39LRaaraBgVwU03QnfVweB3HBjvK6C/DPHrb5DUjAxp62vhZ7Jp j3bUNi8KVBkAav+3XzVka94qHtOq7bqcFYlJ1GacenGBWEsgW7v3RH9lwbhdMiniP8fM kXFkz55sDXerRQl1f2n8a44Anrxtzm8Gsjrl3F77bkVRaLY4LcVRS4atf9ELmQEC87jC oxJA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=BhtImvQM; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-22818-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q7-20020a05622a030700b004283ecb4b44si5127175qtw.202.2024.01.10.13.33.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 13:33:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22818-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=BhtImvQM; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-22818-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22818-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EDB231C22D41 for ; Wed, 10 Jan 2024 21:33:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1606F4F88C; Wed, 10 Jan 2024 21:33:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="BhtImvQM" Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2076.outbound.protection.outlook.com [40.107.243.76]) (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 0ED534F881 for ; Wed, 10 Jan 2024 21:33:17 +0000 (UTC) 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=OTevLgT0Tjn/oG9b8y5EC3Pmsfq3bvRSkUSZCtIQv3ssigGtWFnwbsvQvjPlXrEtOrFR+TWoiuXcSJh2fYOvI/eLxWbogrJy86xsrQPoSHpMtNZZBmh1xDBg1FQhRrNhdncLBLHa4hiER8mbZNcYKEOaxFTrlMB6yEBk5ykkYzm5I0h9zLMPEwWKGYI9yAMA0PtVyPpbld09H+kZccsAXoR2vmbuRxdHiua1qDEY5TnEeuwakeNIL0GPJtMC7dISmCf0/J+xkOCINRW3cfL/fSFIacuziK9nVCbujLokstAhurKkNTm1nS70vFfwr0fXFAFlpGQh4CDr2dcV/rls6g== 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=2EdtsvJBJxu4SP4qGgDY4CjgRKodlKU5nFLkP8ZWXLA=; b=jQXrbfjn/vdqFZ+gWR9At5EnCiI3k5bUrng963/CWQCoJd/q/wB6k5sLIvw7MnD35t8QLBeAZu/DrwMZm0cg2hCejA+Mj0PylDO2oCaMW8JHn1WtqZabsT+alIEnQanXvJbTZCAA4ZJxMsnyqn6E+QTkUEkUIRJ3xoyLPQvqzPNeQF5ajDcpixq2VsVi0PFlmAi/276D7i1bPh/O+9b1KUX8vzRODQn71TUUm5nKPb2WvozSJ7VlBJG0CV9t9THbGUeysRAER1svrheyAjWrVlImKxQdsI2nln3N3BUCNmtpPjFnILRMSsWesty7Ova/jckMTMyuRjKhEeG+IvEKuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=2EdtsvJBJxu4SP4qGgDY4CjgRKodlKU5nFLkP8ZWXLA=; b=BhtImvQMy5nID0MfTxklFrCttVEiAJTHajsSUiTYxAlZXbG08PgWSr91kj5zchWidZM2JclPpepq0zB8QvjfXwnATE3oRfMHo5KmnFeKCGnXXuG+KfdCWcNwpznEYsfQNXdZ22A+DgKwipA5+XPqFK+jMS5WWq97gSoKsNbda40= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) by CH3PR12MB7569.namprd12.prod.outlook.com (2603:10b6:610:146::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.25; Wed, 10 Jan 2024 21:33:15 +0000 Received: from BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::200:c1d0:b9aa:e16c]) by BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::200:c1d0:b9aa:e16c%3]) with mapi id 15.20.7181.018; Wed, 10 Jan 2024 21:33:15 +0000 Message-ID: <8d443374-1b3b-4099-a306-5f9e0fac7851@amd.com> Date: Wed, 10 Jan 2024 15:33:13 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] x86/mm: Fix memory encryption features advertisement Content-Language: en-US To: "Kirill A. Shutemov" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Cc: x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Dexuan Cui , Jeremi Piotrowski References: <20240110193514.15620-1-kirill.shutemov@linux.intel.com> From: Tom Lendacky Autocrypt: addr=thomas.lendacky@amd.com; keydata= xsFNBFaNZYkBEADxg5OW/ajpUG7zgnUQPsMqWPjeAxtu4YH3lCUjWWcbUgc2qDGAijsLTFv1 kEbaJdblwYs28z3chM7QkfCGMSM29JWR1fSwPH18WyAA84YtxfPD8bfb1Exwo0CRw1RLRScn 6aJhsZJFLKyVeaPO1eequEsFQurRhLyAfgaH9iazmOVZZmxsGiNRJkQv4YnM2rZYi+4vWnxN 1ebHf4S1puN0xzQsULhG3rUyV2uIsqBFtlxZ8/r9MwOJ2mvyTXHzHdJBViOalZAUo7VFt3Fb aNkR5OR65eTL0ViQiRgFfPDBgkFCSlaxZvc7qSOcrhol160bK87qn0SbYLfplwiXZY/b/+ez 0zBtIt+uhZJ38HnOLWdda/8kuLX3qhGL5aNz1AeqcE5TW4D8v9ndYeAXFhQI7kbOhr0ruUpA udREH98EmVJsADuq0RBcIEkojnme4wVDoFt1EG93YOnqMuif76YGEl3iv9tYcESEeLNruDN6 LDbE8blkR3151tdg8IkgREJ+dK+q0p9UsGfdd+H7pni6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kZDzIM2m95K oczeBoBdOQtoHTJsFRqOfC9x4S+zd0hXklViBNQb97ZXoHtOyrGSiUCNXTHmG+4Rs7Oo0Dh1 UUlukWFxh5vFKSjr4uVuYk7mcx80rAheB9sz7zRWyBfTqCinTrgqG6HndNa0oTcqNI9mDjJr NdQdtvYxECabwtPaShqnRIE7HhQPu8Xr9adirnDw1Wruafmyxnn5W3rhJy06etmP0pzL6frN y46PmDPicLjX/srgemvLtHoeVRplL9ATAkmQ7yxXc6wBSwf1BYs9gAiwXbU1vMod0AXXRBym 0qhojoaSdRP5XTShfvOYdDozraaKx5Wx8X+oZvvjbbHhHGPL2seq97fp3nZ9h8TIQXRhO+aY vFkWitqCJg== In-Reply-To: <20240110193514.15620-1-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DM6PR18CA0008.namprd18.prod.outlook.com (2603:10b6:5:15b::21) To BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5732:EE_|CH3PR12MB7569:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d66f9b2-fc3b-4a68-7eb5-08dc1223c111 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SxOK9Q2kgTEgTA7MIhqFQjUotwTQqgNh2WnQd2/O1OpiQhpi1aBhBV/8zUmIkXBut88CtHz48eHmAAUQ18JABmRDmawefD/Y+j1x7cegh+0bDn2cO6pvbevhRcrVtOaEV8QqlM4PAtKOKIYNhqTe3k3Ui7sFsdS9JpZbW9V9unUidc3nwUMoYO2wj44YZLvQ3uNVPBvm/NujpMIWANU3AGi02iGJ+bFrO/8TefkVOp3M1xYPzPeAGOem+g1/j6kmJ3Gy5ENjfhF67UgZMhiPjwGPqsfZFyYNNKt0++VSco4v8aksAvGycWuk+EMkJiVuRVVpggW748O7DHO4s3g27nZBFV393xvDrhTmyLok2p9/FfgVEroPyQcZU0NS5JT2bDUHMlN4kEOMoxfuB5VSd0wIMWQobdIGsx5ZYUgCUDSTwmvEoN6c12BZUy4qHBwt18DqcuAvqJi5SbBabEbjy04/KftTGKmYMeh4ZzaNzNMo9RW8zpU2R7D/tf+Y7TLMBaL8nOsUuoybC3sRJ2YhMcDfDB5JKeiWqyTAv2Uj6iLleS0i/jafFkBS6Gao6KaDbf3CgAz3aJJcDp7+tbM/WoazPBRQx1em7uSnH6yvyPr5rHkmIBzM5lASQClGciXLtvf74A5dGHKitVTZ8kwFxw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR12MB5732.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(366004)(396003)(346002)(136003)(39860400002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(7416002)(478600001)(5660300002)(8676002)(6486002)(31696002)(6512007)(45080400002)(86362001)(6506007)(2616005)(53546011)(316002)(66476007)(38100700002)(66946007)(41300700001)(110136005)(54906003)(66556008)(36756003)(8936002)(26005)(83380400001)(4326008)(31686004)(2906002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aWNXK3RXWnJLK2RrLzBxV0hnK1QydXJVc3RIRjhjQ3hkNCt1U0NKSWp6dFJs?= =?utf-8?B?R01OQ2N2L29aT04zUFl2bStVS3Z2SEJsZkVhN3NlSjdEYm1IUG5qaVB3QWc1?= =?utf-8?B?aHhQK25jRXFxWEVDSUkyeGxEekxYKzNGb3Z5ZXBCc2NjNlRyZ2NXNXJCbVo4?= =?utf-8?B?TVRZeEs0NH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WWWdUQWJzanV4?= =?utf-8?B?Z1U4MkhKSVcwSW5PVU90b1pZejhwU21jeTRTZVd3NG05d0RocUhGMnROTzRM?= =?utf-8?B?NVYvZVpCbkFBQjhOUU5ER3hja2RTdjFpVFloNjlQbitGMXBjVGg4aUV1eEJQ?= =?utf-8?Q?Zva5pHbhgin7yGMyXF28ARYlS?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d66f9b2-fc3b-4a68-7eb5-08dc1223c111 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5732.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2024 21:33:15.3403 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +4T9KztKN5KULTsERTQVTAO6Vz4qL40IBbJxsS/+JzqIC++3qRuiwYIZWSv8s4oateMOLssGi8PchyLxtlA7dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7569 On 1/10/24 13:35, Kirill A. Shutemov wrote: > When memory encryption is enabled, the kernel prints the encryption > flavor that the system supports. > > The check assumes that everything is AMD SME/SEV if it has the TDX CPU s/if it has/if it doesn't have/ > feature set. > > To avoid confusion, check the cc_vendor directly. Is this because of the setting of cc_vendor in hv_vtom_init() without setting the TDX feature and so "Intel TDX" isn't printed and instead "AMD" is printed? If so, the commit message should really have some info about how this relates to Hyper-V isolation VMs. Thanks, Tom > > Signed-off-by: Kirill A. Shutemov > Cc: Dexuan Cui > Cc: Jeremi Piotrowski > Signed-off-by: Kirill A. Shutemov > --- > arch/x86/mm/mem_encrypt.c | 56 +++++++++++++++++++++------------------ > 1 file changed, 30 insertions(+), 26 deletions(-) > > diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c > index c290c55b632b..d035bce3a2b0 100644 > --- a/arch/x86/mm/mem_encrypt.c > +++ b/arch/x86/mm/mem_encrypt.c > @@ -42,38 +42,42 @@ bool force_dma_unencrypted(struct device *dev) > > static void print_mem_encrypt_feature_info(void) > { > - pr_info("Memory Encryption Features active:"); > + pr_info("Memory Encryption Features active: "); > > - if (cpu_feature_enabled(X86_FEATURE_TDX_GUEST)) { > - pr_cont(" Intel TDX\n"); > - return; > - } > + switch (cc_vendor) { > + case CC_VENDOR_INTEL: > + pr_cont("Intel TDX\n"); > + break; > + case CC_VENDOR_AMD: > + pr_cont("AMD"); > > - pr_cont(" AMD"); > - > - /* Secure Memory Encryption */ > - if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT)) { > + /* Secure Memory Encryption */ > + if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT)) { > /* > * SME is mutually exclusive with any of the SEV > * features below. > - */ > - pr_cont(" SME\n"); > - return; > + */ > + pr_cont(" SME\n"); > + return; > + } > + > + /* Secure Encrypted Virtualization */ > + if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) > + pr_cont(" SEV"); > + > + /* Encrypted Register State */ > + if (cc_platform_has(CC_ATTR_GUEST_STATE_ENCRYPT)) > + pr_cont(" SEV-ES"); > + > + /* Secure Nested Paging */ > + if (cc_platform_has(CC_ATTR_GUEST_SEV_SNP)) > + pr_cont(" SEV-SNP"); > + > + pr_cont("\n"); > + break; > + default: > + pr_cont("Unknown\n"); > } > - > - /* Secure Encrypted Virtualization */ > - if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) > - pr_cont(" SEV"); > - > - /* Encrypted Register State */ > - if (cc_platform_has(CC_ATTR_GUEST_STATE_ENCRYPT)) > - pr_cont(" SEV-ES"); > - > - /* Secure Nested Paging */ > - if (cc_platform_has(CC_ATTR_GUEST_SEV_SNP)) > - pr_cont(" SEV-SNP"); > - > - pr_cont("\n"); > } > > /* Architecture __weak replacement functions */