Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1900412rdd; Thu, 11 Jan 2024 12:42:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhL8TgHPfU01Y0muvzI8susJLCgCPtZkyMLjwli32yh56h24xY8Dm999MqAev9y1DZMBUN X-Received: by 2002:a9d:6398:0:b0:6dd:e2f0:b67d with SMTP id w24-20020a9d6398000000b006dde2f0b67dmr371484otk.42.1705005730918; Thu, 11 Jan 2024 12:42:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705005730; cv=pass; d=google.com; s=arc-20160816; b=VOjgF+7VkRlEQUH2YCMNbFUa8xunc9t2ZHdrsvYDIV9l0A1oG9dHK1A1qTP2fvo3Bp SrQRFBmJRCgzUg7nvJLEF5EWnY0QSbkFXXRKGOsKNG/F8MRb34/K8e+x2eMcgTSK0zph bvPyc/kLVOt6xo8tfdTXUSkFWFFvmNV52Dps7XgwmN7nvq68/4pQXALyL/SCuxkBwWWf 0wrR/0ViG8QIEN+TOlk/iHWnpW6RERDOJ7p/AZ79NLnasRAN4QvSArz+1Zg+ZOy/WyAn hmnJ86CK4V5m+pybA5i0Ax9WGgVXLFTqe+H0hHvP06959jN1sddZ7WzXXyNEbwkGTQJn r7nQ== 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=HyP3TvnFIm798nCZ0lCM5dlT6R/Ny4UMVe5Mbos/nAA=; fh=wWI5zAS1jgOty//Uzr0pJa41l9e3fkY1Y0PDJ0YNfPs=; b=vYP0K1HaMvNmi0JZ0jKr+7SS2NbcQi8o5tePA8AYR5j9EdzcP07DICf0MhWGnRlGc6 IfaSxU7PIdLFlailqhSZeV6nD9AAO8GQ6RAbU8LSeBqK06C7spZbzKUnBCHMGRcxVPHX DCs1lfxN5nvdPJXg9G8Wb79TtjJXq8uuCHr3Uk73W8UorTlCJv+gb/xikttrWkeDSwSm nJeECkFCcSghkt/wELzIJXuijSHS3GiQ2U6vQfGSKvciM/m6/zSgKjDve0QPxr4E1kGt cNuhr3B6ijgHtRTFDVHu5ZIQZK8X9BgfE+JH6N2o4BiF4JaTFdLeLl/AT8WfedrnW+Vb T5Ww== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=jSGWDjr1; 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-24055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l23-20020a635b57000000b005cdaa0544cfsi1800357pgm.670.2024.01.11.12.42.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 12:42:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=jSGWDjr1; 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-24055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24055-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 89191286C2F for ; Thu, 11 Jan 2024 20:42:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1B0058115; Thu, 11 Jan 2024 20:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="jSGWDjr1" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2041.outbound.protection.outlook.com [40.107.223.41]) (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 65F225810A for ; Thu, 11 Jan 2024 20:41:59 +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=KRaZZu4IZFwTPFfs8lGNtlIiDBjXGHIWh+SHlVW/FTXE39anqwFJqScFTxXT7LktIuWsoVxBBCrPjDVN0+tlCP/jRssUsUDC3JWAvcieQDJrcQH0YkvaMD2pXreDBZ5e9LTLqwinQn41NZdJY5zNPzpClnbE65EBb6TKHJwpxYvOMRHeusGD5+FHK6J5/8fQLAJnaOUsZJk4Blwu87nGhVThuys3dvlVXBKgzH5mj2mDDX/gMz28vKsiw+MhbhJJ3KXo6dhjLfny1UcLP/fVZh0yuUy+/cKvwBOvsxzV6DjYhzljO9S0U1v/qTlF3HFJ+XAhyAi7fmQJ7GLRPE5kng== 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=HyP3TvnFIm798nCZ0lCM5dlT6R/Ny4UMVe5Mbos/nAA=; b=dzeuWi4TFgwINYYKHBjEcme1xwb4PfRy8Yh4MObVQ1vflvqTbpjx1ed1f2nK402btmcnAyaqsdRPzVupo/ML9pbeIEt/mPb3cxcTdZ4qX0T6L158caYKEe8d9expUMjFlrZPB9WnT0YQDA3+TFNIc6cN7URWNmQi+76YwiUcFz23gzrVVLOsG7DuiG1vyMVx3LtrjHAXuRFj4J+8tlPT3xrwG3vASGi0kXACNsCH9coJXa7q17JjyM3gjJ0TYLF88kSMlhB7i7Tv0wSewq8jNRguJPEulyMK9TwwjI8B4V5SAvChhyg8Cv3JMOPIB3myGiDpCmLSaPWovgpyHB/DbA== 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=HyP3TvnFIm798nCZ0lCM5dlT6R/Ny4UMVe5Mbos/nAA=; b=jSGWDjr1D6ozhMlnVT+ftbDWjydt+Cm79dCxjGdvIL5vgHHmJXj4G1jw7wTpIcfs6dAtcG/L4xzmaKKpEGKuEVW16CJ4OFMS+tw4QVZyMBg0MGvA/4nphG5sStNHI4OvPNgmF9Ru0hZFw/PaVdiSg933ZVcdD+67qveW1Oi01lM= 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 CH3PR12MB8458.namprd12.prod.outlook.com (2603:10b6:610:155::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.23; Thu, 11 Jan 2024 20:41:55 +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; Thu, 11 Jan 2024 20:41:55 +0000 Message-ID: Date: Thu, 11 Jan 2024 14:41:52 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [PATCHv2] 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-coco@lists.linux.dev, linux-kernel@vger.kernel.org, Dexuan Cui , Jeremi Piotrowski References: <20240111111224.25289-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+q0p9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ybc7sZWaIXotfkUkZDzIM2m95K oczeBoBdOQtoHTJsFRqOfC9x4S+zd0hXklViBNQb97ZXoHtOyrGSiUCNXTHmG+4Rs7Oo0Dh1 UUlukWFxh5vFKSjr4uVuYk7mcx80rAheB9sz7zRWyBfTqCinTrgqG6HndNa0oTcqNI9mDjJr NdQdtvYxECabwtPaShqnRIE7HhQPu8Xr9adirnDw1Wruafmyxnn5W3rhJy06etmP0pzL6frN y46PmDPicLjX/srgemvLtHoeVRplL9ATAkmQ7yxXc6wBSwf1BYs9gAiwXbU1vMod0AXXRBym 0qhojoaSdRP5XTShfvOYdDozraaKx5Wx8X+oZvvjbbHhHGPL2seq97fp3nZ9h8TIQXRhO+aY vFkWitqCJg== In-Reply-To: <20240111111224.25289-1-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SA1PR05CA0009.namprd05.prod.outlook.com (2603:10b6:806:2d2::11) 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_|CH3PR12MB8458:EE_ X-MS-Office365-Filtering-Correlation-Id: 6cd6cc28-dbc0-4da4-cd4c-08dc12e5bf87 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0rKPhhuTRUuIm/7D95fiIjjYieC2Lz6xaA2TAPD1AVbtMRIsZ7Nx2605g9W0nTn2jy7ibws9GHnBWtSYiKIg4+ePG6TBATJ7vnIz0Nigb2Tf+xKQRPQA/FyxFL665BUJiIg6WfJ78bxTtFMfS4e+n0TzACvD0Nv8vod0WASez3lbZUtj2FK9G7fCy74Ed3bfW8fIb7TEZWOwTmpbBZychLfFTZTJ8vQVFfuyExPIolatQAsog8qtwbLEd/mh8qyf1uxIAxhKix7Cl2VoN8t0sRPsKOf5X4ocAnD/rtuoKdOx0/q4oLNjF+m18pSqHYwNX/PeJVobTYmERDKkMTAzImWSzKFhsmHnU7yeplgiU5LRmwkR/zREIRDy/FWbwFDKKbYHIs+lOHbcVdxpPziQQSAE/QpzDdajRpbz7fyRcP5DF1au0h7IxQadx7eAlnh0ecqOF7mhwADO4Dj6Sfq7y+1vvEIpg4pUlVwQv6z3POd1ioW0gQzjzvVSt98qdTxzbsslP2jT/xldtJAvxwdWJ7V8gp9sAjuvvCIJELKoLHmwHtjXQsuBj7+eH0mKlL6gcDVgkUyzwT4nOuCrHhLmiIwng8zrsyTZaTmfFjN+AOhm/ewNmdf0zI2rwm0vPSIldFACy4I1a+uFOyK1jtTQpQ== 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)(346002)(39860400002)(376002)(366004)(136003)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(31686004)(83380400001)(86362001)(66946007)(41300700001)(31696002)(36756003)(38100700002)(478600001)(316002)(26005)(6512007)(6506007)(53546011)(2616005)(66476007)(6486002)(45080400002)(2906002)(5660300002)(110136005)(6666004)(66556008)(8676002)(7416002)(4326008)(8936002)(54906003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dWNnUGZyWDNyVEsxT25xQ0hBZ3NwSmZsanhjQ0xvbUhLVVRLbktlZS9VU3N1?= =?utf-8?B?WGtkVU1tdVFzQ0pYV0JRWXBrUGNXeUhMdllrQXVURkF2OUt2T2p5dXlzWWFP?= =?utf-8?B?ZXNRZU15Z3Y3RnFIOXB2RXdLMUthRms1ZFBTSlN5QXJHWXVFTXd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1cDNiYWxEcUpKaHRudTZSWnhyZTJQMXlYTXZtWlVCcHFW?= =?utf-8?B?MTlMemlrMHZqRG1mMHRiOWl4UzZhMTlBL3NuTHEyc3AwMlkwT2JBTllSVmFO?= =?utf-8?B?TUtxcXVhZnRIM0lpSE9LM0hXUTFXeFZyTFpCd1NtQVVxSldPL0dyVXpRaGVZ?= =?utf-8?Q?g772A8EFTO1vqjqwhvsETa4p3?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cd6cc28-dbc0-4da4-cd4c-08dc12e5bf87 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5732.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2024 20:41:55.1317 (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: sleXlFOE10yVuUbE+FnQuvPYa0yqyRBSQYm7+xqzQTQJCsgpigivb7Pc0jezR70ASY4AAWAIXtNm9xP6D5EMFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8458 On 1/11/24 05:12, 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 doesn't have > the TDX CPU feature set. > > Hyper-V vTOM sets cc_vendor to CC_VENDOR_INTEL when it runs as L2 guest > on top of TDX, but not X86_FEATURE_TDX_GUEST. Hyper-V only needs memory > encryption enabled for I/O without the rest of CoCo enabling. > > To avoid confusion, check the cc_vendor directly. > > Possible alternative is to completely removing the print statement. > For a regular TDX guest, the kernel already prints a message indicating > that it is booting on TDX. Similarly, AMD and Hyper-V can also display > a message during their enumeration process. > > Signed-off-by: Kirill A. Shutemov > Cc: Dexuan Cui > Cc: Jeremi Piotrowski Acked-by: Tom Lendacky > --- > 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