Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1244377rda; Mon, 23 Oct 2023 07:02:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEsYnGjPsyehx1kZTxZ4edKu/mMOdKEDMKL14l3pLmZUjqttafXEb2FxqT0XXSArBadrIfC X-Received: by 2002:a17:903:447:b0:1c5:9f52:6a5b with SMTP id iw7-20020a170903044700b001c59f526a5bmr6453275plb.42.1698069765065; Mon, 23 Oct 2023 07:02:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698069765; cv=pass; d=google.com; s=arc-20160816; b=DEMzSr1XWJH7Xg5/TnfJsAE7XSd4b0/uYTIF485sAih7C2Kjgu0jwTOjyVYQKfNvBA 94AExlEGslNM6ithbF2+PIbJskYe73Nl06uWA5+bWF10Go2mHM8MGlF26xkD+uuRSqkP FQWuQVyMyfiqvRyNOO6rWS9c9Kgo+ImREo+lmqFSkkS+XwAornoe/lvYWi9IpFeEw84m Sslce8PbXGMtRPRwfNUt33kuLc124NmCRcVcyzHF+SNvk0mOzBS4RPh6/sxOMBFo5UJy rzczuQj9eNwIj5Zx9XgX26Gr6rUGWVxc7bmQTg9i5SkCOtqkCaTF16WrzilLXxxdABn5 gL9A== 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:organization:from:content-language:references:cc:to :subject:user-agent:date:message-id:dkim-signature; bh=e3DyJd7TFF/qBXDokCRyFkVipgEdQQ7Nb0o3Rd52qZg=; fh=UOPJsf9lmIzLCspXbjH6obOHXQ5oGjpXG1AsZNArMQE=; b=fx3e3gNBa3VYwDAsFqqaNvwf8CyWmOT/DNSdzAdRy6W3qkYzIEuSyGOC4PO5yTSCN/ EOmHVr9Fuz3t2rAyQqjd3YaqVEYXvWbj/OMReaLhqCbJdj13gtjj0wNUP4NY9+uLcrZw 04DvwNOoUUU5CvqxDxG9u7jYTm4/PXLT9ePEW/I1GbyieeB8X2uSxSNVFAY83DixY5ur fUEwiFuOWhV/deVt/9RU4FPvIy6zW04uac591oIvWlQq9YAE6iDSWiBVrb1y8p0/IwWb 6UNOGVOm5yzreJGJ3Lay0xOexEzaX5CdWLq5MG1QLgoErfY3PcuWVGHmTxp53dyJJaP0 0MLA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=iIwHoOSu; 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:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id az12-20020a170902a58c00b001c9abee0d76si2273492plb.331.2023.10.23.07.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 07:02:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=iIwHoOSu; 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:6 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 pete.vger.email (Postfix) with ESMTP id 20570807CF50; Mon, 23 Oct 2023 07:02:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230242AbjJWOCX (ORCPT + 99 others); Mon, 23 Oct 2023 10:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230250AbjJWOCW (ORCPT ); Mon, 23 Oct 2023 10:02:22 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3C77110; Mon, 23 Oct 2023 07:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WqKGhQIPGccdliRPHxVYgDepliO3TT3V+8YOMGrFnyYx9k4XVWt2f6lw7WgD80TcKRsSiGD4um6Ww13WoOffUai9Mmj3yd6pjqSWGv6TBvmQ2/m083U6S0bzkCgZJTmJi3tgVOJOKo3bp3sA4wyNDdPZXrqLkWgNkPLv7gxjYWpISSWbz5SG2ImrKPlTuB3Bz0L4UMhx95ezCdroJAqqkm4B9iuNL8cfLd2R0MDNBwYDl7+z+bhH54rCMh7u5X/4cyh3rkbBZvCex+bQQYvL0UvYF04XXJtWbdiTvc/RZAsKQTFNxfbZ2kfBZSJOOsrFCPeXN6qRpeXMgVdD5KYt9g== 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=e3DyJd7TFF/qBXDokCRyFkVipgEdQQ7Nb0o3Rd52qZg=; b=SeKD4wb41x+wFFLwRZ2bNOCldjeYvd5R5+2lFyGsqUP0bWnFc18bMehU5EWZzQ0YwCFYhhF0YbNm4iff5m/L+WL8Yke7d7lilOHBKVYfOheShe9pHfo8TFKdWItgL2SZY7P3Nl04ImzDCw2wl+Nrq2mMjdQ7QCg5tT7zYRu7LmHYmJYNLHOGM1TBAjqdy4RklxIKGcpEra321dHRL4b8AQOY49lUZfQ0WTaJFWAMw3XqOTCqlSqx/tA1H5uMe+GvBhaHC0uSoI4p2SBTGC8NJAhTShwoC2HpF8PqV+ZvGBVz+j+drb5cod7ZPpE1IxViAkIUYh7P0AUB+ZmkEHNh6Q== 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=e3DyJd7TFF/qBXDokCRyFkVipgEdQQ7Nb0o3Rd52qZg=; b=iIwHoOSu3FdhhB7tyOTdvpTb4Oa4a2G/73rnD4PIIkC+GkjbWBafCgr/VIlARmqrg4XVZwW6VVHPSg6UjbNssW9Qk0zn2IVbYbyMeyKOxR418q6GNzR6vMQdw6QxWr2SMCpHVuPSze0PlgxdyFMK5rrN0zNXMhvVF9X19X3aqzA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SA1PR12MB8743.namprd12.prod.outlook.com (2603:10b6:806:37c::18) by PH8PR12MB7111.namprd12.prod.outlook.com (2603:10b6:510:22d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.24; Mon, 23 Oct 2023 14:02:13 +0000 Received: from SA1PR12MB8743.namprd12.prod.outlook.com ([fe80::4af7:3f12:6583:f51d]) by SA1PR12MB8743.namprd12.prod.outlook.com ([fe80::4af7:3f12:6583:f51d%7]) with mapi id 15.20.6907.032; Mon, 23 Oct 2023 14:02:13 +0000 Message-ID: Date: Mon, 23 Oct 2023 19:31:45 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] tee: amdtee: use page_alloc_exact() for memory allocations To: Jeff Johnson , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Jens Wiklander , Sumit Garg , "Paul E . McKenney" , Catalin Marinas , Randy Dunlap , Peter Zijlstra , Steven Rostedt , Daniel Sneddon , Rijo Thomas , SivaSangeetha SK , Josh Poimboeuf , Juergen Gross , Ard Biesheuvel , Ross Lagerwall , Yuntao Wang , Sean Christopherson , Jarkko Nikula , Herbert Xu , Tom Lendacky , Mario Limonciello , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org Cc: Mythri PK , Nimesh Easow References: Content-Language: en-US From: Devaraj Rangasamy Organization: AMD In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0172.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:de::16) To SA1PR12MB8743.namprd12.prod.outlook.com (2603:10b6:806:37c::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR12MB8743:EE_|PH8PR12MB7111:EE_ X-MS-Office365-Filtering-Correlation-Id: 5fde619b-582e-4fe7-4847-08dbd3d0a7fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kAAugxLSfRWV9XoKxcBMpQpzazqlqFrml7pB2/7uO7TXkTnol7YmR/uGGWf5Q9g3XMLICxsbZj700XAn2QQ9hUSyh8xtizm0eRR5b8bZc0Rj5gOnaac2dVGznutV47KSoGb/5W5o10xCE2KzKd/HGdnmOyleab5cVP04xgs/m5m0ejwExuURsLTyY5MpcCG2FDH8Iruyj19ITLToZP8BbTDm7f6fZhrOhYhs27a7EsAhoewH0EmZZPcSU5QKxhOQfXhu6E4dAmO0W00Tj/NlOKlREvHGt6haUSJFFKhNtGNX2/+DI9QVBYRpfhQD97Z4he597GFsVanDw97cF6PgF+GrPGTYXMr0Qlv472nEKXrMkyyd6zGnCw27JEjNOkjQkmw05NacIN0x9ja6QH9q3HEKF96kE/VH1cbWnPfLtaED8lpo03FOtHvRyaFajU365v6TAdHyZAcrcG0JrmS903WZAFtfi+VZcrp696ANmehMr8M41y2PNFeMThvlJLM1hEca27KavjYcdI2L/aBqizlWK7dxrAo8jV3A6AqKWqjKjBo0iWNYsYQkNi8F8Px8VujXVbK78b8NtGO9HS061d3l0cQEAw1xKU2OfYy2DArGegrTvRX7jvqCh1E5X2EFFgJxCurl37/Ye7k4sIEEYXkg9dLlxCY3UTQVZmLzejY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR12MB8743.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(376002)(346002)(396003)(366004)(136003)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(31686004)(36756003)(110136005)(66946007)(316002)(54906003)(66476007)(66556008)(31696002)(38100700002)(86362001)(2616005)(6512007)(83380400001)(4326008)(53546011)(36916002)(478600001)(6506007)(26005)(6666004)(41300700001)(6486002)(7416002)(8936002)(5660300002)(4744005)(8676002)(921008)(2906002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V2xrbTVjK1Z0T0MyS09EVVhTQnZ6bHZ3Y0NWVFYzTTZDRTNXak80SVhBRkZt?= =?utf-8?B?NzZuWXVCcGNKUWpTYzBSblNIaXlrK3NUaTVqY3l4azdxRlJvVDdNYkVJLzR5?= =?utf-8?B?RTJWRVkxQnUyRGRZdWlObnNoSzRNV0dDYkNPTXhVT2lqVStJd3hFclpveDd6?= =?utf-8?B?ZVp1RFNMZGRk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vN1RkL2JST1VXdGlzb1VKeWYrUWlyMzhSODdtL0hy?= =?utf-8?B?dUlielZBbkhLNzB0akRLRUt6TlhKYUJYV3o2SG41b01HT29iTmxzSFU5VnV1?= =?utf-8?B?eE4wN0hSbUlpM210WkNES1ZZa0xmR2t1QTNWdlg2UyswVTJOZGRSMEVmZHhC?= =?utf-8?Q?4k/Uswz4fjoaFaLA6hWH+4k47?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fde619b-582e-4fe7-4847-08dbd3d0a7fc X-MS-Exchange-CrossTenant-AuthSource: SA1PR12MB8743.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2023 14:02:13.1502 (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: 1vZYzQS720ct3ut6rSu6YWwOWjE/Po0fmjfU3CJ15g96EZywa7aLIFyW/RlVCwG9fmqWa6JgJXo79Y3DGq/KdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7111 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 23 Oct 2023 07:02:31 -0700 (PDT) On 10/5/2023 12:39 AM, Jeff Johnson wrote: > On 8/29/2023 1:19 PM, Devaraj Rangasamy wrote:> Use page_alloc_exact() > to get buffers, instead of >> get_free_pages(), so as to avoid wastage of memory. >> Currently get_free_pages() is allocating at next order, >> while page_alloc_exact() will free the unused pages. > > s/page_alloc_exact()/alloc_pages_exact()/ everywhere including subject > to match the actual code change? Ack. Thanks for the catching this. While I could send an updated patch taking care of this, we are working on a rearchitected patch, due to a new requirement. Kindly abandon this patch series, and we will be posting new support soon to the community.