Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp155129rdg; Thu, 12 Oct 2023 01:28:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrPFxzF61t3OCfgd+JVP9+iQtPjgfzuqg1fPtyu3JYuJFIa+LyL0yGHdsTNnc6H1+kxsg3 X-Received: by 2002:a05:6358:279e:b0:134:e458:688d with SMTP id l30-20020a056358279e00b00134e458688dmr21051502rwb.15.1697099290965; Thu, 12 Oct 2023 01:28:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697099290; cv=pass; d=google.com; s=arc-20160816; b=p7hx27d2l9gnVv9cIAi8NUkpYNTlEpSFGuyNwL8n9nnRztYTvNux5JMKqIpcKhawP3 8/7E1+xD99Qs9pSJskxpmhZJdTrJOgHiwY7P7W2eLrLSkhM0UkJKdb7efHa0K+lCfDTu B/oBODzXKCTysp+gHXazk6wQYivvIUiUdcp/A8RZu3J/Ru5V6vqZycUE4xePPVztyowk 3kIENY9//8WrTOkuGFABCfMxSF6Qr0b70Ixy2DnprdkEnRqs70DXbKjaR25QrXspwZxt xjVtS6us1wl0NxJ5yW5qFjgnCmttPQF34zJPlTLGuwaPOT0KoGEogePW9hsme0hKtiR9 Q2aw== 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 :in-reply-to:from:references:cc:to:content-language:subject:reply-to :user-agent:date:message-id:dkim-signature; bh=gEYgTEOhCog3VEeOf5Uadoa4L9kATEleBzhDKsmf60A=; fh=SriCPCnSJhukApE+lJ/SVTjhvWY79nDaHUb32SC726Q=; b=mmRKQ/i270LVqQHKMFCYZWbMD3vd8OdSt5L1Ec919jcfxXB7sH2ZZltxrV1sWCJJUt vnv4atzZMy226T+mUo8O1+A21HaVaEM8Kt3keCI5C+jGMGeS0lkg5ZWXmpxbUgeweOiJ PboNc7kT/0MnR0fq3VUg439KQNxQuJEMBPpLRnC2fXg84nALYkPoAxoY42GveXF7N/sk yc2DUG+j0lUS7f68fXsVulR6xpR/NevgrR578PE6h825k2pVPj3i2dgpNLq/AMf6kRad j7zYUa8dBbS4mONeqOkbrrRCox0aMN5zMEwTNFN2XEneZ//gFj5ZwgzDdbsMojM0i+sl r0ig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gzt6xaza; 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-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u18-20020a056a00159200b00690bc199287si14043849pfk.393.2023.10.12.01.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:28:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gzt6xaza; 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-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 09008807501A; Thu, 12 Oct 2023 01:28:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235424AbjJLI14 (ORCPT + 99 others); Thu, 12 Oct 2023 04:27:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233712AbjJLI1z (ORCPT ); Thu, 12 Oct 2023 04:27:55 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061.outbound.protection.outlook.com [40.107.223.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 494C590 for ; Thu, 12 Oct 2023 01:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ajWeqdMiDZis8lo7QPO62Cl8rgEAXe6/ckAAak3dyZxYOh6egS+EwumZA88ulV4IM7TjPKjLsfzZxp0u28Ks6ILxZrFfAzmAt/vKrqhAopCAuewMp5WOLvQhOANMtFLG0GvmFDlLVlRni4yVATG4Wkdkn6JKhGUfOEJcHvtJe/m8A5t7B1OMzLVQn5x1Q8wuZjEODI98WmR7c0/U04nwpb7CqEtTWVIJS7mFVy9OkMYVH/Yn+PA67m/HJZig7fbQYw38y1B5NWYWzoIplLv8FemR6aS5G/d4Cde5Oc9eeUYMRldHngHs4O9ktk0Jx9+b0h8wKjHSJTVFNTQvhG2+Ow== 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=gEYgTEOhCog3VEeOf5Uadoa4L9kATEleBzhDKsmf60A=; b=jNkzZSJHQNZE31eBp+VzcL6NjJ/S+8DtnxbpXYqHF99FYTdVhXgHfT8sASXXiZFJ8Myh/p6dOD/wWxJpLBZ3D/UL7s67OVAEC+mvOEm5dYb8jfSOn+1qJHgKKiuAii+3hIPPkuhZQTwsYnOW4T9KhmXYKC+gXXynGGgjS8hnmdATkC9AMPXEvw79WLPh+uU8UzxFz0KBxaVW2Aplp54xGMh/gXSr2gpPbZulnHJ1hRrzydOO3LKH7birDeHfnoNaPoXiX+QlY0/NqZXPupzjKEdblzhYEqqovLlfCJL2PkxqMr1lLJ4yBkwxo/h7uuKTXfis0OcGeCSaAOQyC+guJQ== 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=gEYgTEOhCog3VEeOf5Uadoa4L9kATEleBzhDKsmf60A=; b=gzt6xazaWp039D1M6fHlVvf2dwiGGSRJOb7wWfG7zU7GySUY9ljy0TFlKnLS5pK51K+TZupIANcI63q17b/tJaK7HXllHRYW17b8TJgX44nGvA87BNrLOGSGmUuDpZbNME/4ZRwpt2pPz13Z2dkwlp3cBAz962EK6pF3f9QoWII= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS7PR12MB6309.namprd12.prod.outlook.com (2603:10b6:8:96::19) by DM6PR12MB4106.namprd12.prod.outlook.com (2603:10b6:5:221::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.37; Thu, 12 Oct 2023 08:27:50 +0000 Received: from DS7PR12MB6309.namprd12.prod.outlook.com ([fe80::93cc:c27:4af6:b78c]) by DS7PR12MB6309.namprd12.prod.outlook.com ([fe80::93cc:c27:4af6:b78c%2]) with mapi id 15.20.6863.032; Thu, 12 Oct 2023 08:27:50 +0000 Message-ID: <81b4e3b6-a9eb-ff29-efe7-94ec2fb47c18@amd.com> Date: Thu, 12 Oct 2023 13:57:38 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Reply-To: nikunj@amd.com Subject: Re: [PATCH v4 01/14] virt: sev-guest: Use AES GCM crypto library Content-Language: en-US To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, x86@kernel.org, thomas.lendacky@amd.com, dionnaglaze@google.com, pgonda@google.com, seanjc@google.com, pbonzini@redhat.com References: <20230814055222.1056404-1-nikunj@amd.com> <20230814055222.1056404-2-nikunj@amd.com> <20231011185607.GVZSbvx8rJ8DXPqYfg@fat_crate.local> <3b484a1a-e6dc-3b73-ba1d-72fd6ba38ebe@amd.com> <20231012074539.GCZSekIxe9KM1lG9eC@fat_crate.local> From: "Nikunj A. Dadhania" In-Reply-To: <20231012074539.GCZSekIxe9KM1lG9eC@fat_crate.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BM1PR01CA0153.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:68::23) To DS7PR12MB6309.namprd12.prod.outlook.com (2603:10b6:8:96::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB6309:EE_|DM6PR12MB4106:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a7fbdbf-c1f1-4d72-c88b-08dbcafd1ed4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EXfRhcxBzNmhSPUbsfpCvXnsslsV+NF2mLZvl5AMl1Ap3lW0QeljTTL67Z9t6cGyDNKPbDpgsFEh3jW4E6okq+1nwH8onugbdxJLsi5mptxBcvB08FUa2C8YE+Vw46Xq53nYsYJhiyZ7wyCC7zQdeFrSIGJ7SWqetApeFnTIY4YJsBjUgXOaXw5Z8tXdtF0XZZ1rfnWiBeMdk8MnAUoRV3XYowtEB5kMf2vGns2/06MNUet+u3D5gMGuNv+ayw+mG2BxWlUH6gfVCu6pQrhFArBS/pDMkzyiTCthbE1Ht2OBzoI4Ts4qCGG6rgzlxJYnAfTq3P3CRyIBbJyBiy3FkreyD+ct+1wiNhiF2qYNI1FAbg0AOHY7h/VoY156hTPUtSYXuUb9QbJ0JTqASknKIDXCxTACE5MFcQRL+qn84HPaCkhwvvXnHsD/wIADzCqJrI8/sjD6x2SNfAOTvU4G4Di7+OKxkh0pzbyotVKPtLsZFOzma2ZdRORMEP0/kYY8Rlu/5Xw73/mrZUO0uHy2WMHd5K8QUSX6BxW48cNvqJVWCUihYPHOF4QjJy8pa0NkWR7GJtv2znf2VTb5mw+KSIAipi+g2L26ZglQgDf6zYk3B99xo57aoLVNj99Ikz6DmooYNq1nihXhbF6ck+k6CQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6309.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(376002)(346002)(396003)(366004)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(6512007)(2616005)(53546011)(6506007)(41300700001)(316002)(478600001)(3450700001)(4744005)(2906002)(5660300002)(8676002)(66556008)(6486002)(6916009)(66946007)(4326008)(8936002)(26005)(36756003)(31696002)(66476007)(38100700002)(6666004)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aHpUdTlOeEhnOXpwa2RWSkd0MkpOUFlST1VDL0hqZ2ZsWmZ4QlhQa0ZRMVpy?= =?utf-8?B?ZWV6QzB6dHZUTnFXMC9jcmlhWkVxQnRHOFgwVU0wNFpnL0hVK2NkaCtVbS9D?= =?utf-8?B?YkdNQWhkUmgzNlNrQVo4cHZxS1hUWHlWVmdxanNqUk5RT0VZd2VsSVNoUlh5?= =?utf-8?B?UTBiNkxOTWw4Y3FLbFc1OVZmdy9RMEc4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?SGJNQ0E0SUZwdkh5blYzUTE4K2RBckpBYjlsaDI4RjUyU216OWFEVHMvRy8r?= =?utf-8?B?Z3ZLTkcxdnRpd2xvU21nU1ZYN1NxZlBHZytJTkppVUYvSnhDMXI5U2Y0SGhE?= =?utf-8?Q?KNw8/62VPOrHzcN5/dwg5Empi?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a7fbdbf-c1f1-4d72-c88b-08dbcafd1ed4 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB6309.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2023 08:27:49.9743 (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: Ypnhg1pFpBFMj5nXvmPq7aV2P2rTd9BAZ51z97ycO7zQ2rI/J8mhmKIBt1LD1dgu8xZ/V81scKPiB/ZemTi0dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4106 X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 12 Oct 2023 01:28:08 -0700 (PDT) On 10/12/2023 1:15 PM, Borislav Petkov wrote: > On Thu, Oct 12, 2023 at 10:10:43AM +0530, Nikunj A. Dadhania wrote:> >> static inline unsigned int get_ctx_authsize(struct snp_guest_dev *snp_dev) >> { >> return snp_dev->ctx->authsize; >> } > > Or simply not use a one-liner function at all. Sure, this is what I meant when I said "I can drop the helper" earlier. Thanks Nikunj