Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4157389iog; Tue, 21 Jun 2022 13:18:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uKcZL1dadwCrQa8XpV8Oh3dAv/xhhCN2bdYTsd9CWhBRXYYZXFvzjcvz0y7RCPSCK+P9Hz X-Received: by 2002:aa7:cf91:0:b0:435:6e07:2825 with SMTP id z17-20020aa7cf91000000b004356e072825mr22731019edx.381.1655842712376; Tue, 21 Jun 2022 13:18:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655842712; cv=pass; d=google.com; s=arc-20160816; b=zpGEe9vTAz5NDO49PqBobme8Jc5iMtZ6YfPkWfeSdKq+qGntSSJEPXCvelP1uifskV Vs3qLOtEs4xvw5ySpsNLk2AFfS1pKF0yG9dozV5zMcUG8VNDakPWqBxt5TaqssD+PxXs TAO87ur2IzMz97cD4D1H8LGERrgv46IHxohIVfMF4kQ8H47OYki+4FBEdqH0FaKdOMvc MImAX3mUvm+5b+NgLmLfSkkknnbze7C843s4yOTB7WuDdhCHGSaWdlE2Kn94U5vkoEkX ofirRXYNMFbk7lGF/wjIEK3lIHmExCnrPb3jWlJEu4/DphlV5gKCawXiNvdT6PphBL57 3sgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_contentbits :msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_actionid :msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_siteid :msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_name :msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_method :msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_setdate :msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_enabled:msip_labels :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=NkOlL6k/8gXpWMU958lgZu4PhxJ57T5r9KoyhnsKKJg=; b=sPIRZ1CSCh8i/NHwmsNK2kWnm61jqR5uAhupvWZmII4u/3Nd54WLK+oZ+fZErB/hcL q918030C5BP5oLsdbcTosw6Rc/G+IlAnlEGLhj9/CwCYGFuSNuaXM2d0Jddwedxe8ucD A6X7shQVmAWnMp4hjkAKE8jMC4WCBkfGOTFtW4bhm4EH358wOAO74nljy6/JS3wq8KAX qkesZMaXXRbwtQabXWwe1spfQixi0dBuZrbQyEOON1T1fkCkkjcYaPbRTpA1I68BA4OS 50dm9lfyCEGqt4bQOBT8RmLIy2olDf6rzVunGKYlMbKiKPqf3b5xhJMcDuijT6B0OniJ JfxQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=wnM71+eX; 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-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs20-20020a1709072d1400b0070f1426c37asi19094932ejc.464.2022.06.21.13.18.00; Tue, 21 Jun 2022 13:18:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=wnM71+eX; 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-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231343AbiFUURU (ORCPT + 99 others); Tue, 21 Jun 2022 16:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233414AbiFUURT (ORCPT ); Tue, 21 Jun 2022 16:17:19 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2051.outbound.protection.outlook.com [40.107.94.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0024F2A70D; Tue, 21 Jun 2022 13:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ctVlgznizxfgVoD8+tJ7yYEftRN06MbFf9yNEoMM4f2D/g35ksmrGKxdiDKHFhbrP77YyF3xYUdYmuwNymsWYJlUPCEptAUkZzmR5ip8pfR15W1XYX3XNo3x0j5IL2IjovRFBZbunPDu0ZNRFdtvQQTk9z1dcUbCWSPh50oGKcyXYEIwDXPletXIw3045xOGKUdKIiDObNrIKFrBzrP8h5UwjWzSYR+KBuFPz7kE0W9thp2AUgb8czxXlGrJF7EHSj71be1HPiNjEKL9X46H/EtXNkfl9ohHEOM8IKdy+y+NtqoPI3gF0eOPpPOTSotPHcpKwn0hD9lIKr0Zg3d0/A== 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=NkOlL6k/8gXpWMU958lgZu4PhxJ57T5r9KoyhnsKKJg=; b=JygLAZ0TQpqygaTkBzolOAhom4A6kGfKXV1vxWF96jL+x7XtXD3xYxbVsk3VB0GpCxSYuLPrJ9JJbYO1Dyhbg5sd4RWBCLf4WJZoG1O0lpaMDdptM3JNjKWua2nhjLGSnIsTLViWBZ+aQYPrS0w5abICW/Mf3h+dvzw/YHfJZzteJ9omyddQhGcv2QZSoomMamKZeOeWfM0Cklh/GPrrlm/XHw1bAEVYmZ8B8LdHse9vlbAwDaKgiFTfS6JEREt+G3dJTh33U3XNDt2OQoPBL8jF3J3mCZYlqjuWYwDNl/io5yfvQdHlBm9oWtOrDZkw3IeK75tlVcQaFh8jQqez+w== 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=NkOlL6k/8gXpWMU958lgZu4PhxJ57T5r9KoyhnsKKJg=; b=wnM71+eXDJ4dk6c0D/f/i2i5+7rnT4M0OO3y9tbUUx8fWIIlFxuWMyMR6NCDi4Or2oe0bWPMc7vHT1K08gK8e7PKcBLir3mnfLIY0k8skzEtMIHaMWMRqIilVB3hIPdIGr20AEB41K8HXH2bkO8KYiPTyZQc2RXQdjjDol4tg0w= Received: from SN6PR12MB2767.namprd12.prod.outlook.com (2603:10b6:805:75::23) by BN9PR12MB5052.namprd12.prod.outlook.com (2603:10b6:408:135::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Tue, 21 Jun 2022 20:17:15 +0000 Received: from SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::810a:e508:3491:1b93]) by SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::810a:e508:3491:1b93%2]) with mapi id 15.20.5353.022; Tue, 21 Jun 2022 20:17:15 +0000 From: "Kalra, Ashish" To: Peter Gonda CC: the arch/x86 maintainers , LKML , kvm list , "linux-coco@lists.linux.dev" , "linux-mm@kvack.org" , Linux Crypto Mailing List , Thomas Gleixner , Ingo Molnar , Joerg Roedel , "Lendacky, Thomas" , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Borislav Petkov , "Roth, Michael" , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , Tony Luck , Marc Orr , Sathyanarayanan Kuppuswamy , Alper Gun , "Dr. David Alan Gilbert" , "jarkko@kernel.org" Subject: RE: [PATCH Part2 v6 14/49] crypto: ccp: Handle the legacy TMR allocation when SNP is enabled Thread-Topic: [PATCH Part2 v6 14/49] crypto: ccp: Handle the legacy TMR allocation when SNP is enabled Thread-Index: AQHYhZpY+tOs5rhl/E63aZQgkZ9Qqa1aQYRA Date: Tue, 21 Jun 2022 20:17:15 +0000 Message-ID: References: <3a51840f6a80c87b39632dc728dbd9b5dd444cd7.1655761627.git.ashish.kalra@amd.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Enabled=true; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SetDate=2022-06-21T19:40:20Z; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Method=Privileged; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Name=Public-AIP 2.0; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ActionId=25b415e6-13f3-4207-9342-ca3d7c21768e; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ContentBits=1 msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_enabled: true msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_setdate: 2022-06-21T20:17:13Z msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_method: Privileged msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_name: Public-AIP 2.0 msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_siteid: 3dd8961f-e488-4e60-8e11-a82d994e183d msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_actionid: cc1f3d52-50cb-4506-9c6d-af57c945b07d msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_contentbits: 0 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 65f7ffdf-7775-43d4-04de-08da53c308cc x-ms-traffictypediagnostic: BN9PR12MB5052:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wwP/8ofCPxXWDOvivGng4TdCeO9ljkzLjhySESYbS5W98ytEVG6j6NCHwm0oJVeFsC+NCo38Oq59xjuklpkWCIn+8GKONNdMVkFG6/ZumdnIME213SbwFUdWOrqzHbdDbq45wPWkz+ITjPUhH287QSn67g5Xrh1yyeqi+ropyjZVxB+UzZ8m/TbcmCG0WSPf38PBhyFLxclDwAbe4AjBzZegk80DQArSv3k6uvfSb9FjJ7wfWzGr094CwTBs9P1ipCwac5FkmqcYNoDxGd5X1xBfkwEaVBXKyhIulJ9+3nSZeGJbkg3BwlJAX/oALTm1uP7zbi8kU2g/uAlE/ow6ZHmFqaF6XW11x7CDUFiEoF10PJ1DZQAy7QKfbY/gDSsD0yK8yl0DPGTtilgTtmW/776ac/YSbjsMyfk5y83xWZKZWNbglOdCOLg+O/Ah7iR41zcuUHVqY2ek+5iwePNPiJKzM7XTjYdOPFFF7KXp/PnYg/46tYfV5AY0m/2HGqP9GEuXHHtLkyhCKz44pZ+sh5lYgAyZviv6ciF7Oxj2qjp5BeH1aZsqhyMEcs+xVtepyfg4W4zbRBlF7uHuox7U1PG3vpm56CS7f7EshlmViIO0lYeZl6sGl2ucevtgk4SRFk0+CRk9daJzX+vcVw4hbDrvhAMckVgjJMP6G30J3t3bp4Yo3yxG+qZ6eppywfdU4oOKAzWoASyoA+ub1uCXSQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2767.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(346002)(376002)(39860400002)(396003)(366004)(4326008)(66556008)(71200400001)(66446008)(122000001)(54906003)(478600001)(316002)(64756008)(38070700005)(6916009)(8676002)(76116006)(66476007)(66946007)(186003)(83380400001)(86362001)(26005)(41300700001)(33656002)(9686003)(7696005)(38100700002)(5660300002)(7416002)(8936002)(55016003)(52536014)(6506007)(2906002)(7406005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?UEp3bFR6V3ZTcTNPenhycWlad2FJVVFKWUpWb3g5YzZJbmdrcWZvaDg2RldM?= =?utf-8?B?ZERabzFqeEVwNE85NHJNNURZQ1ZTZWh6b3lRSVkvbExORVF4dWR6alN0QVc4?= =?utf-8?B?anBwWlU3R3ZCQkNReThKalc1MTJkNGU0eGhEeXJyYU8zRDNMQ2x0WmNCeTZy?= =?utf-8?B?cWQ4Q01sVlJ0djJSWVZFa2NldlBsbDhkenZTMTJiT09uVDRMUjBRM04xL0JK?= =?utf-8?B?UGxOT2lwN2orMGtwNm8zb25wOUVBT01PRGd3U0NaeVJWWWtUYU5SSnJLeUVO?= =?utf-8?B?b3JrNU9IL2tQcWV4U2lxVHhkVm5HUWw4R25haVdNQ1RoRS8rUEI2enZxR3Uw?= =?utf-8?B?R2FVUHV6cGoxMjFLNWVGbnk3Q0hNOEx0Q2ZHeVZtQUtCYzJFRGdWakdKUVJm?= =?utf-8?B?NVZHZk9iU0xSOHRVUTl6YmJ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?ODdLak9ZVGU3Qklhay9iS3NhaVlpZGxJMitxZTVHakVpcXF0d2p6UFJuVEdN?= =?utf-8?Q?qopmJDbH8aGA/LqXHb?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2767.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65f7ffdf-7775-43d4-04de-08da53c308cc X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jun 2022 20:17:15.7662 (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: 4b/+SVDMzB4L3GCh3Lo3cBR930j9t3HShUZ2RiauQnK0bCXIOlPALQy/+QGQL0z2IUquwuthA2iSjU/G4+cMWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5052 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org W1B1YmxpY10NCg0KSGVsbG8gUGV0ZXIsDQoNCj4+ICtzdGF0aWMgaW50IHNucF9yZWNsYWltX3Bh Z2VzKHVuc2lnbmVkIGxvbmcgcGZuLCB1bnNpZ25lZCBpbnQgbnBhZ2VzLCANCj4+ICtib29sIGxv Y2tlZCkgew0KPj4gKyAgICAgICBzdHJ1Y3Qgc2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