Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4125664pxu; Mon, 30 Nov 2020 18:43:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+zow09yreHRFuIU+AQqX7bfKl7VO1zea3+Tpa90W6iHS1GaIv+xzKtQ2N7fi7UytjSJ88 X-Received: by 2002:a17:906:a95:: with SMTP id y21mr913834ejf.339.1606790623938; Mon, 30 Nov 2020 18:43:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606790623; cv=none; d=google.com; s=arc-20160816; b=T9d2ZV6kiQkzUHS7cvT6USw8VZ84/aTOxl6tvPrfsCZTI2b57V20IRfbIeK3gGgCkF dlx85kxT946eYeJLOaQi/EP2ZFBMT9ebIVi2X8w3zla3Yh+ZJbkJtw7s5nWerjxsWCPG rRBzbV/DSSYpCUlpY0xWIde7be6+fwhu3Eof/C/Su1ooqX0HPss57tB0nD1bUHjgT03v JPbbWGHQv+61NUhLIEuDucO24OmE0FBysLKsYuYHgPW1b1gk2CyJExq0kcjFp1n/RjT/ RdTFr7zqA9ihyLuNtJQF9Qtd67sHZkQhf2K21wN2T30FhE+OEP8cyHZ0bvNIq9smSduU AWRQ== 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=XI8Pc3BfWhPH1P3LoZvdSaqjNRVSK6+hPsCw6E/Z2sE=; b=Eq3Sk+1RLWhZSm3cfwZMcWeY0tyViXySEPZ+kKesJLA/7CUhpeBeLixRaOYFz6Fh33 ALMFP/f1FA6P1JTHQ8jJyY088x0DcNuXkNuCJKXHh+dnanZ5On9DXNYiPtIg8wIl4SbW YwvJPg5+BYDctKm9QMDw616FXBFZTARlChboKQv1ESczoeEGvUyyU+cgHA/K+MrVEH3v alF5J/082dpMMHx/w8l2Y5vOPwM+vZyZHI3L0BHz1UlRhDM284vOx+/cXtV4OaSBLhfL dEhIqTiuVi8X7NUv93H3sTwyEkChc52NleME+2pSvl1kkJZwLF5MZAjwwMOZue/+LBFT 2Mqw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u14si247905edo.600.2020.11.30.18.43.21; Mon, 30 Nov 2020 18:43:43 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726055AbgLACC5 (ORCPT + 99 others); Mon, 30 Nov 2020 21:02:57 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]:2385 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbgLACC5 (ORCPT ); Mon, 30 Nov 2020 21:02:57 -0500 Received: from DGGEMM404-HUB.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4ClQM72g75z50HC; Tue, 1 Dec 2020 10:01:39 +0800 (CST) Received: from dggpemm000003.china.huawei.com (7.185.36.128) by DGGEMM404-HUB.china.huawei.com (10.3.20.212) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 1 Dec 2020 10:02:11 +0800 Received: from dggpemm000001.china.huawei.com (7.185.36.245) by dggpemm000003.china.huawei.com (7.185.36.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Tue, 1 Dec 2020 10:02:11 +0800 Received: from dggpemm000001.china.huawei.com ([7.185.36.245]) by dggpemm000001.china.huawei.com ([7.185.36.245]) with mapi id 15.01.1913.007; Tue, 1 Dec 2020 10:02:11 +0800 From: Jiangyifei To: Anup Patel CC: Anup Patel , Palmer Dabbelt , Palmer Dabbelt , Paul Walmsley , Albert Ou , Paolo Bonzini , Alexander Graf , Atish Patra , Alistair Francis , "Damien Le Moal" , "kvm@vger.kernel.org" , "kvm-riscv@lists.infradead.org" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "Zhangxiaofeng (F)" , "Wubin (H)" , "dengkai (A)" , yinyipeng Subject: RE: [PATCH v15 10/17] RISC-V: KVM: Implement stage2 page table programming Thread-Topic: [PATCH v15 10/17] RISC-V: KVM: Implement stage2 page table programming Thread-Index: AQHWtoxQ6udyTXND00qYbGxBYAdmN6nKgOywgAwTtoCACX1NgIABjEYg Date: Tue, 1 Dec 2020 02:02:11 +0000 Message-ID: <87f95ad08ead4755a2f2cf120be1ff01@huawei.com> References: <20201109113240.3733496-1-anup.patel@wdc.com> <20201109113240.3733496-11-anup.patel@wdc.com> <186ade3c372b44ef8ca1830da8c5002b@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.186.236] 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 DQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IEFudXAgUGF0ZWwgW21haWx0 bzphbnVwQGJyYWluZmF1bHQub3JnXQ0KPiBTZW50OiBNb25kYXksIE5vdmVtYmVyIDMwLCAyMDIw IDY6MjIgUE0NCj4gVG86IEppYW5neWlmZWkgPGppYW5neWlmZWlAaHVhd2VpLmNvbT4NCj4gQ2M6 IEFudXAgUGF0ZWwgPGFudXAucGF0ZWxAd2RjLmNvb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