Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2796551pxb; Sun, 3 Oct 2021 06:02:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwXuCGO1AaprRwp5ZxnpbxqGpcJJ4Tal+SABDcHXPxsu7MzHbBX3VFj2KE2TXBJ9hoNyri X-Received: by 2002:a17:90b:1804:: with SMTP id lw4mr12187635pjb.174.1633266168963; Sun, 03 Oct 2021 06:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633266168; cv=none; d=google.com; s=arc-20160816; b=csmzUczAdwe3XvaTHFzM08+4lskeODGZTyusxhMKE+vA/DCnG85M5y9ngi1nLWOWno GuMg4jISkFzEtQnPVjTM2r+iNp/Ui/D21c6S/1dNz+WGhBUq1kxypmj2jP9v3Sh3Ktn8 tDr2g8bqM1Xqn/no3jl5T7ZJO89gzCXZRSUUH79nXX/shfCiRZCKgYtuKed/8HpVXwzx 4mHPWSLFesQDdnK7XLrNFXDq3HKX/mmx8yhTd8J/y9w6WGoNSVvDPnyx+TsIO/2UzOIk GJO4gm1I8VXs+GKB7p86TttQSYqtFSeM8sDEW0Fq1MPkJtrVwLTiuCyAJN1iZA/YeKNY sMHA== 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=Y0INUAV6/ZWXC2bUU/zJCgWXTYuGsqgqxIX4gJRUqxU=; b=q6zsypNyVNKuINk4n6uGvoeerOaAHInjk47GBtHwJncZAA9uDU6qWvzq3XUMHxtfEM IclE5PqUSBcnUXgQzz9KIVEIB9BTfK9ap13McIBrSZK7jtNv4k9IxBF4b7CK9avS5DY6 N1dLs6zTcNW1A2jT9572TXWdAtovtrf4OvVezwIL30tKstkeX43wqQn7XEbK284ZXzYx iB2wom9EEtd8rw7QbCv9fkkmhYAWuxXNkqlNvDIMbDVhafGJfy/WpR3/AIYAtZ74Cg3V K1f7mzPzeg4fkqgYhy342gi619PKP7v06ikx9TlCqfNMp58Zjh5vralmpe25X0UX6D90 c14A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=SEf3NF2Y; 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 o12si14947787pgd.443.2021.10.03.06.02.35; Sun, 03 Oct 2021 06:02:48 -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=SEf3NF2Y; 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 S230215AbhJCNCt (ORCPT + 99 others); Sun, 3 Oct 2021 09:02:49 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:56359 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbhJCNCs (ORCPT ); Sun, 3 Oct 2021 09:02:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1633266062; x=1664802062; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Y0INUAV6/ZWXC2bUU/zJCgWXTYuGsqgqxIX4gJRUqxU=; b=SEf3NF2Yw5muTZkkyuYMXh/8QHA26vGtNLqXg3I98mNoA6RHK60shPxY Ng1hvn6VNAxGvkj2ldcAWbTri68Xqi28wF8asW6EJb9jNLbgtrO92kXCa YrHQEzZkZqTO2a/n6SIR79um7DjY1DaS77hHeB1kyU9R4dgEkCy+3RjZv k=; X-IronPort-AV: E=Sophos;i="5.85,343,1624320000"; d="scan'208";a="151400598" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-iad-1e-0168675e.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-33001.sea14.amazon.com with ESMTP; 03 Oct 2021 13:00:54 +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-1e-0168675e.us-east-1.amazon.com (Postfix) with ESMTPS id BEE5DA2AB7; Sun, 3 Oct 2021 13:00:52 +0000 (UTC) Received: from [192.168.13.185] (10.43.162.51) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Sun, 3 Oct 2021 13:00:46 +0000 Message-ID: <91d9d531-de3f-ecd4-c437-e7af9a8fe3a4@amazon.com> Date: Sun, 3 Oct 2021 16:00:37 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: [PATCH v2 1/4] nitro_enclaves: merge contiguous physical memory regions Content-Language: en-US To: "Longpeng(Mike)" CC: , , , , , , , , , , References: <20210921151039.1502-1-longpeng2@huawei.com> <20210921151039.1502-2-longpeng2@huawei.com> From: "Paraschiv, Andra-Irina" In-Reply-To: <20210921151039.1502-2-longpeng2@huawei.com> X-Originating-IP: [10.43.162.51] X-ClientProxiedBy: EX13D18UWA002.ant.amazon.com (10.43.160.199) 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-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