Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp744682pxb; Wed, 3 Nov 2021 11:37:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+R6CMYvUs93Xbix0tY58qthNtbDVCFfEyQAjgRYOWsD6Koe92P7HR7zRhHmKeFK2wVkeZ X-Received: by 2002:a50:9d8e:: with SMTP id w14mr62539621ede.74.1635964679478; Wed, 03 Nov 2021 11:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635964679; cv=none; d=google.com; s=arc-20160816; b=j64bDdaoZNjG5XbI5r/CpNDUKnItHfbhjZkFA29+wPwh2Wlg5DOSlLtwWc73YKuhz1 2bZB8pp+PQYCDq3jQKbGIW3XRDvpj4U3lVxCq+U6MjyGnFCogJ1aVeqZtfg3cFf+1oSc D80ZIOFTkqOv4ilIejL68N/+ITePj7rVSXbvaOgqIpPfP7sm2ku/M8YKxn/ivTPwTTOW nxIc/B6+2Ob0nllKoQTakXBQnhWp5gtYacRQxf+fkO2uAYh2HrZmhpWzkbitzEf/ud7K LebykV0dFjQuSLPbWt+upr+qBkHD1iwgNw4JUWnLsW+6ZOo7NFwf1zJJ4Paf+6vVsNsS tPsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yLbDzljAl65euJHGtAw35ylJJDH8lX5x3EzjYTggdSg=; b=EhSNQZmx65al9qvUcRW6GCWaiY/ygaopoVqdJ2I913Jt6Ll8Ma1YLOm6TjOjb6Zjqb cSsuwpp9r/TJ51P4+N+pjj6Fkh/istK/ACNUQiTF5GtsX3UQtEcRzZaliVk8AJCknolj ydOVxcw+wY8vwJYHZLCD4wEE72PEC7MKNWVpGwJ7zDnk7rxd1vHeySPCCLK02TAxrKUl KbKC5miX/Wc1Hv6NuSGPtQLKyVEROgG52GVQu89nA/VuhijjT5Ix7bIAQ6yFUY0QFOGu 7jzn210ncqTpajvTZgtrvXAOVVHbJ87ygNqPOUDcSZhwIfikdF74pkCGewZJ8tONbPf/ 4UcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=FkUJBHQO; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ji21si5345279ejc.604.2021.11.03.11.37.34; Wed, 03 Nov 2021 11:37:59 -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; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=FkUJBHQO; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231360AbhKCShI (ORCPT + 99 others); Wed, 3 Nov 2021 14:37:08 -0400 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:11414 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbhKCShH (ORCPT ); Wed, 3 Nov 2021 14:37:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1635964471; x=1667500471; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=yLbDzljAl65euJHGtAw35ylJJDH8lX5x3EzjYTggdSg=; b=FkUJBHQOvjoFqyeLeTGExK2gFPs/4a1b/7oczY6SNVt70eaFcoVnNjvT uVEhIvmQ1h1Q8vRVxWq9/Fm7EJTuY2PFlVDCFbZBeTHbggD6R+4hmqb0d qcehQ4upj6xo1pk7IXfth36hxCEJEAz65k1SE+fSCDYwCAT+iUTqoPzb7 I=; X-IronPort-AV: E=Sophos;i="5.87,206,1631577600"; d="scan'208";a="153980723" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1d-8ac79c09.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-6001.iad6.amazon.com with ESMTP; 03 Nov 2021 18:34:21 +0000 Received: from EX13D16EUB003.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1d-8ac79c09.us-east-1.amazon.com (Postfix) with ESMTPS id 5CC0F81644; Wed, 3 Nov 2021 18:34:18 +0000 (UTC) Received: from [192.168.20.5] (10.43.162.57) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.24; Wed, 3 Nov 2021 18:34:12 +0000 Message-ID: Date: Wed, 3 Nov 2021 20:34:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH v3 1/4] nitro_enclaves: Merge contiguous physical memory regions Content-Language: en-US To: "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)" CC: "Gonglei (Arei)" , "gregkh@linuxfoundation.org" , "kamal@canonical.com" , "pbonzini@redhat.com" , "sgarzare@redhat.com" , "stefanha@redhat.com" , "vkuznets@redhat.com" , "linux-kernel@vger.kernel.org" , "ne-devel-upstream@amazon.com" , "lexnv@amazon.com" , "alcioa@amazon.com" References: <20211009013248.1174-1-longpeng2@huawei.com> <20211009013248.1174-2-longpeng2@huawei.com> <21f6433d-b116-2e27-90b0-16122106fbf0@amazon.com> <11ef0019edd240b6a218b50d766f62ec@huawei.com> From: "Paraschiv, Andra-Irina" In-Reply-To: <11ef0019edd240b6a218b50d766f62ec@huawei.com> X-Originating-IP: [10.43.162.57] X-ClientProxiedBy: EX13D45UWA002.ant.amazon.com (10.43.160.38) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CgpPbiAwMy8xMS8yMDIxIDE1OjU0LCBMb25ncGVuZyAoTWlrZSwgQ2xvdWQgSW5mcmFzdHJ1Y3R1 cmUgU2VydmljZSAKUHJvZHVjdCBEZXB0Likgd3JvdGU6Cj4gCj4gSGkgQW5kcmEsCj4gCj4gU29y cnkgZm9yIHRoZSBsb25nIGRlbGF5Lgo+IAo+IEkndmUgcmVhZCBhbGwgeW91ciBzdWdnZXN0aW9u cyBpbiBlYWNoIHBhdGNoLCB0aGVyZSdzIG5vIG9iamVjdGlvbi4gSSdsbAo+IHNlbmQgdjQgbGF0 ZXIsIHBsZWFzZSByZXZpZXcgd2hlbiB5b3UgZnJlZSwgdGhhbmtzLgoKVGhhbmsgeW91LCBubyBw cm9ibGVtLiBJJ2xsIHJldmlldyB0aGUgcGF0Y2ggc2VyaWVzIHRpbGwgdGhlIGVuZCBvZiB0aGlz IAp3ZWVrLgoKQW5kcmEKCj4gCj4+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tCj4+IEZyb206 IFBhcmFzY2hpdiwgQW5kcmEtSXJpbmEgW21haWx0bzphbmRyYXByc0BhbWF6b24uY29tXQo+PiBT ZW50OiBGcmlkYXksIE9jdG9iZXIgMTUsIDIwMjEgOTozNCBQTQo+PiBUbzogTG9uZ3BlbmcgKE1p a2UsIENsb3VkIEluZnJhc3RydWN0dXJlIFNlcnZpY2UgUHJvZHVjdCBEZXB0LikKPj4gPGxvbmdw ZW5nMkBodWF3ZWkuY29tPgo+PiBDYzogR29uZ2xlaSAoQXJlaSkgPGFy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