Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4617410pxb; Tue, 5 Oct 2021 06:57:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwt1E4AO6FFkuluw0v2fJQ6lxINnEnL9fKByNyzVrAbM31B7/SolF/tfav3TPeFmhI6Ye4n X-Received: by 2002:a62:5e44:0:b0:44b:1ab4:59c5 with SMTP id s65-20020a625e44000000b0044b1ab459c5mr30605710pfb.13.1633442226114; Tue, 05 Oct 2021 06:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633442226; cv=none; d=google.com; s=arc-20160816; b=sDDPe/416EVmQ3AdqxMcRn1Eg7FM4pedPBAN9TVdka4Mqoc+Tm8oPOHUZB1BCGGqD0 kKrFHJgsN+cQjntLlrhhJu8X9WkVOsaoPXRH498CXcnF9ll1ob/Mnj2yg6XXx0ADZizV HBu38KKaxCzLfdhfWLyR7oLzoPezu0Rp0CfiY6Yj7fjmomUtFqF6tj1C5SEQ/pPSeHFb J7hsjN1m3gsI5nXWzjXcTNuvJjS4sIaQ56lv6UROVrjgk8f3tnd0dwSQkm+OxUZQ+bVT iwpF39Opz0M+TnZP+/41NPp7EFwx5d3RlhrvDSlOblynQwG+tK4kQVAsgdaW5ONBpAYN FZlA== 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=3f1xmk8eW6jfNMeoHzQ3Nej7eToC4T8oidfJcR96DPo=; b=mzHCwqOvz6Z5r++eIQwVirX6qD8LNSQhORhXS5HLuaEHG6FWm38ECz1NVPSypy84Su S1XBsvJiz+21SG3Fh74YdMNntmu3kPQ7XRoJXMaWFEyiRFsbR7ZKrupsLZvz+6f9zA0k rerMTI9pBamuqlg6gFVNI/2I1qD4bnrrXahuZs2k3Ld3/WYbTPuemQFADmMd7CLvSEgq KXHWRHMIjtPr/wSbf2ySBT1qTgZgKXZcMlIbHfHiRV1ouyZBYGrJRKSy8OuqgNddujqF VHmsyljsbpnj4oumwIzxQyEs5W65qd7BFxT7LliUpZTla31P53p90pbHvH+Ra32wgfWu 8WdA== 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 mi15si2443101pjb.175.2021.10.05.06.56.51; Tue, 05 Oct 2021 06:57:06 -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 S235208AbhJEN51 (ORCPT + 99 others); Tue, 5 Oct 2021 09:57:27 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:13875 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235332AbhJEN4d (ORCPT ); Tue, 5 Oct 2021 09:56:33 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HNzVC4cCmz8yxh; Tue, 5 Oct 2021 21:49:55 +0800 (CST) Received: from dggpemm100006.china.huawei.com (7.185.36.196) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 5 Oct 2021 21:54:39 +0800 Received: from dggpeml100016.china.huawei.com (7.185.36.216) by dggpemm100006.china.huawei.com (7.185.36.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 5 Oct 2021 21:54:39 +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; Tue, 5 Oct 2021 21:54:38 +0800 From: "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)" To: "Paraschiv, Andra-Irina" CC: "linux-kernel@vger.kernel.org" , "Gonglei (Arei)" , "gregkh@linuxfoundation.org" , "kamal@canonical.com" , "pbonzini@redhat.com" , "sgarzare@redhat.com" , "stefanha@redhat.com" , "vkuznets@redhat.com" , "ne-devel-upstream@amazon.com" , "lexnv@amazon.com" , "alcioa@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: AQHXrvraMNZnMWAuzUKsEPXAU06oZqvAyT+AgAOxhaA= Date: Tue, 5 Oct 2021 13:54:38 +0000 Message-ID: <9c662cd36f684e3ebf4c35eadca2cec7@huawei.com> References: <20210921151039.1502-1-longpeng2@huawei.com> <20210921151039.1502-2-longpeng2@huawei.com> <91d9d531-de3f-ecd4-c437-e7af9a8fe3a4@amazon.com> In-Reply-To: <91d9d531-de3f-ecd4-c437-e7af9a8fe3a4@amazon.com> 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="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgQW5kcmEsDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogUGFyYXNj a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