Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp73216pxb; Tue, 21 Sep 2021 19:08:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuFZAloZ/GPT23vaiQSo3r0bAsQFnEHqSFcBgvGEzeoYBh0dHugMvzGtk+4niQks2OBGJ4 X-Received: by 2002:a02:1081:: with SMTP id 123mr2580767jay.83.1632276509259; Tue, 21 Sep 2021 19:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632276509; cv=none; d=google.com; s=arc-20160816; b=RFQjOaj9dctBYAL3fNTOQaV4tD1fWJ6y5iJSU/VbXwlTUHpNT0XPXip+E/7nX8RCYS MKVIN+b2H1m7JAtnNHEkoGEaNx7yhYa/danknQqlnOPBvIEMkka9kbw3OIzmiZaG82O8 uDsnrh7o+MKkJIdCyTzYO52mY3OHDY/XHQ3kDt63IEy+XBDXEEvluM/ev0Bhd0LkoBfm E1jyNz3o3rZry0VWc+/SZk8UbcdXYRepf2wQnjLtX1EDdRzvkFCel/12fhOMXXJsPEYt Zeu4kVtS5RsrxoeIQ24Gi1jjwraxM0OQcUO713CAkCOdXchR3MyaSWMscDwqEP99r+Oy iqdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=JXascXT1PXI8XeaJbZKo/rO0yo//3l0376N9jTvmbHE=; b=QnNoBldnl03URZgWxHfbQaNGtD6kYt3q0oNvT1bKA8toLeRthR+0wQa19/QxZHUIrC k3zs1b2h+6p83Tuz4RYIqFsSGC16z+CvIkMX2O1MyvysoaGkiEcKZRD0wm+wS2HB1wji 2U6G6d4WbqaFmzk45wirF1dQjZOZuKnDdF4zJ+33MJ/ZEPK9+mRKda+sl7JHxCNgOkxb MdYkFiJOaPJUUlo2iCtqDTlsVE4g1LNeLF2PHt0bP2FoJ/jaNhuNzQonUt+78KMaWb+k wxXyxl2LuQjsMUv3FOgXXNxmrXlbeZZun7iWndOZLDOV18Qpt1VCCAVixVK0L0lB7dck Yf6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o3si966004ilk.61.2021.09.21.19.08.15; Tue, 21 Sep 2021 19:08:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbhIVA3Q convert rfc822-to-8bit (ORCPT + 99 others); Tue, 21 Sep 2021 20:29:16 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:15437 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbhIVA3P (ORCPT ); Tue, 21 Sep 2021 20:29:15 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HDfCn4yPszRQFf; Wed, 22 Sep 2021 08:23:33 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 22 Sep 2021 08:27:45 +0800 Received: from dggpeml100016.china.huawei.com (7.185.36.216) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 22 Sep 2021 08:27:44 +0800 Received: from dggpeml100016.china.huawei.com ([7.185.36.216]) by dggpeml100016.china.huawei.com ([7.185.36.216]) with mapi id 15.01.2308.008; Wed, 22 Sep 2021 08:27:44 +0800 From: "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)" To: Greg KH CC: "andraprs@amazon.com" , "lexnv@amazon.com" , "alcioa@amazon.com" , "linux-kernel@vger.kernel.org" , "Gonglei (Arei)" , "kamal@canonical.com" , "pbonzini@redhat.com" , "sgarzare@redhat.com" , "stefanha@redhat.com" , "vkuznets@redhat.com" , "ne-devel-upstream@amazon.com" Subject: RE: [PATCH v2 1/4] nitro_enclaves: merge contiguous physical memory regions Thread-Topic: [PATCH v2 1/4] nitro_enclaves: merge contiguous physical memory regions Thread-Index: AQHXrvraMNZnMWAuzUKsEPXAU06oZquuFF8AgAEeIgA= Date: Wed, 22 Sep 2021 00:27:44 +0000 Message-ID: <545781e2bac049dea6a46164fce86267@huawei.com> References: <20210921151039.1502-1-longpeng2@huawei.com> <20210921151039.1502-2-longpeng2@huawei.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.148.223] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Tuesday, September 21, 2021 11:21 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > > Cc: andraprs@amazon.com; lexnv@amazon.com; alcioa@amazon.com; > linux-kernel@vger.kernel.org; Gonglei (Arei) ; > kamal@canonical.com; pbonzini@redhat.com; sgarzare@redhat.com; > stefanha@redhat.com; vkuznets@redhat.com; ne-devel-upstream@amazon.com > Subject: Re: [PATCH v2 1/4] nitro_enclaves: merge contiguous physical memory > regions > > On Tue, Sep 21, 2021 at 11:10:36PM +0800, Longpeng(Mike) wrote: > > There can be cases when there are more memory regions that need to be > > set for an enclave than the maximum supported number of memory regions > > per enclave. One example can be when the memory regions are backed by 2 > > MiB hugepages (the minimum supported hugepage size). > > > > Let's merge the adjacent regions if they are physical contiguous. This > > way the final number of memory regions is less than before merging and > > could potentially avoid reaching maximum. > > > > Signed-off-by: Longpeng(Mike) > > --- > > drivers/virt/nitro_enclaves/ne_misc_dev.c | 87 > ++++++++++++++++++++----------- > > 1 file changed, 58 insertions(+), 29 deletions(-) > > > > What changed from v1? It seems you missed the cover letter ?