Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp242545pxb; Wed, 15 Sep 2021 00:36:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdl12QWHj0a8vqr3revlpxOENcFA+a47u8IutFHSHbuALFD+RAIUvrIpNVJdgZR0YO0RfP X-Received: by 2002:a2e:83ca:: with SMTP id s10mr18972451ljh.335.1631691410580; Wed, 15 Sep 2021 00:36:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631691410; cv=none; d=google.com; s=arc-20160816; b=mFPlYzWa2nDH1d+WxJWOgqvu3XjNlB9/wMI94RYaY9rfoPVDjixZqP0XKDeAt3ZxDB muYnEah8OX6QE3qkeW1A2uSauK7fwTuLN91Ar6arCUahvkln/EaJwvAUw2RmSh8I9eHy o8jMC7ibU8Nimreu5Yecf8L1KHjhsgXn7aQfThMLFdXfDX7aJd28Ehpe5cK8H7DlONYY Ke5qz0vXuxqpD0c043SbNF6fmQ2gK3nWFHW2Ga/oOuEvLRiOK86dRMPpFEXhK7BMk0D6 NOZTyKWIcJc9kO3NQXgul1GdTQ8ujPeffAK5H3uPCMHHg+7H0ktLZJSqCH3FSzJvJE2S eHVA== 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=LGJs+Fpgf7gp12rHzYu8A6yhRfF0MPPNi4HtRhobWJY=; b=z7NspQHiwfyBmsoe6678bm9jcA+Q33dVRWJBR8jmi/6hP4nDgspffypnonwAbvZU+/ 1n8zPiKS71qReNrZ73MSFoUCi69cBEgoXql/JxNz94VQybuKwkpLnZZSBieAdJuASSVg pSovqqQGcuMLyXr6jG93il/QKBcxhZhB/U03xyPxQ8Oz4HKUQVCfNe2zugDZbTV21FRB Dvy1DMVSr0KZGBF5n+OOStCp9ySr2bx4u1JDWXi0SlgApld3UDjqLdVBL1ooAwHYmH0x GXgroNcZBd+vnspByfZU6dPUHnBgyots0Gx9/q0oAcgTSjmI4lSh2khtycS+9ymZ46l9 TPWA== 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 c2si16578857ljf.237.2021.09.15.00.36.16; Wed, 15 Sep 2021 00:36:50 -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 S236615AbhIOHaK (ORCPT + 99 others); Wed, 15 Sep 2021 03:30:10 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:16209 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231326AbhIOHaJ (ORCPT ); Wed, 15 Sep 2021 03:30:09 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4H8WyW36Gsz1DG6M; Wed, 15 Sep 2021 15:27:47 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 15 Sep 2021 15:28:47 +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, 15 Sep 2021 15:28:47 +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, 15 Sep 2021 15:28:47 +0800 From: "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)" To: "Paraschiv, Andra-Irina" CC: "linux-kernel@vger.kernel.org" , "Gonglei (Arei)" , Greg KH , Kamal Mostafa , Alexandru Vasile , Alexandru Ciobotaru , Paolo Bonzini , Stefano Garzarella , Stefan Hajnoczi , Vitaly Kuznetsov , "kvm@vger.kernel.org" , "ne-devel-upstream@amazon.com" Subject: RE: [PATCH] nitro_enclaves: merge contiguous physical memory regions Thread-Topic: [PATCH] nitro_enclaves: merge contiguous physical memory regions Thread-Index: AQHXqRawqxaS4TqZA0GxQ/Ip1Z5mj6ujSD8AgAFbRNA= Date: Wed, 15 Sep 2021 07:28:47 +0000 Message-ID: <49b04e536b994795b2c4015f6a3ef8d5@huawei.com> References: <20210914031450.919-1-longpeng2@huawei.com> <2a38e35a-5dc7-72fc-7cd0-5b54cd1d212d@amazon.com> In-Reply-To: <2a38e35a-5dc7-72fc-7cd0-5b54cd1d212d@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 DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogUGFyYXNjaGl2LCBBbmRy YS1JcmluYSBbbWFpbHRvOmFuZHJhcHJzQGFtYXpvbi5jb21dDQo+IFNlbnQ6IFdlZG5lc2RheSwg U2VwdGVtYmVyIDE1L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gKyAgICAgICBmb3IgKGkgPSAwOyBpIDwgbnJfcGh5 c19yZWdpb25zOyBpKyspIHsNCj4gPiArICAgICAgICAgICAgICAgaWYgKHBoeXNfcmVnaW9uc1tp XS5zaXplICYgKE5FX01JTl9NRU1fUkVHSU9OX1NJWkUgLSAxKSkgew0KPiA+ICAgICAgICAgICAg ICAgICAgICAgICAgICBkZXZfZXJyX3JhdGVsaW1pdGVkKG5lX21pc2NfZGV2LnRoaXNfZGV2aWNl LA0KPiA+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJQaHlz aWNhbCBtZW0gcmVnaW9uDQo+IHNpemUgaXMgbm90IG11bHRpcGxlIG9mIDIgTWlCXG4iKTsNCj4g Pg0KPiA+IEBAIC05NDQsNyArOTUwLDcgQEAgc3RhdGljIGludCBuZV9zZXRfdXNlcl9tZW1vcnlf cmVnaW9uX2lvY3RsKHN0cnVjdA0KPiBuZV9lbmNsYXZlICpuZV9lbmNsYXZlLA0KPiA+ICAgICAg ICAgICAgICAgICAgICAgICAgICBnb3RvIHB1dF9wYWdlczsNCj4gPiAgICAgICAgICAgICAgICAg IH0NCj4gPg0KPiA+IC0gICAgICAgICAgICAgICBpZiAoIUlTX0FMSUdORUQocGh5c19yZWdpb25f YWRkciwNCj4gTkVfTUlOX01FTV9SRUdJT05fU0laRSkpIHsNCj4gPiArICAgICAgICAgICAgICAg aWYgKCFJU19BTElHTkVEKHBoeXNfcmVnaW9uc1tpXS5wYWRkciwNCj4gTkVfTUlOX01FTV9SRUdJ T05fU0laRSkpIHsNCj4gPiAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2X2Vycl9yYXRlbGlt aXRlZChuZV9taXNjX2Rldi50aGlzX2RldmljZSwNCj4gPiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAiUGh5c2ljYWwgbWVtIHJlZ2lvbg0KPiBhZGRyZXNzIGlz IG5vdCAyIE1pQiBhbGlnbmVkXG4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