Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1182026pxf; Fri, 9 Apr 2021 02:00:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV3Uj/hopNy7+F6QFMTWxcbK3ojQfMJcucXUEQllAbVx1GRAMI6ytUH6u/oo+OsHTVl+Ah X-Received: by 2002:aa7:91d1:0:b029:1fe:2a02:73b9 with SMTP id z17-20020aa791d10000b02901fe2a0273b9mr11448534pfa.2.1617958855470; Fri, 09 Apr 2021 02:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617958855; cv=none; d=google.com; s=arc-20160816; b=Cnqb5FGFB/Rf3e1Q435ZX4BWh2op0PDasVH25lvf+lazfSS8oxd5B9Z5U2Tpg1RPMy TAcJjT6QRLMYLuQyBfFiSWoQW/mGiGoxu08I9ZUk2KUgU26IoiTHFITAYQrRuQ3Zj4qs 1arKXlpChQpCcidgY3By6bWlyhD7q6LJLrPzcfgHgNIH+CsYmr03Snll2wS1t0dmMHH7 VdTH+LYVzHHhfkmD/Q8TDKs+8Drx7M+FvMLRXubXr68slEQD5JnlbnCndIcs0ziS0k8q e1krscV22CooeMno9fu4ytaHHbkHMRtDiIHjEKcxWsbNkAtQim5mGWGs5y8mKcbARg6Q 42pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=mlGeiDxhZqAqhkBGD2FsaFXya5DzdC2oxqLjHBdrDag=; b=ay12n+/exQhh4FxpbX2ky53YE3Ou+TeRZvB0aHd6m6DD5OClydbeS4i6lT69ZrFJ2l DLWk9mhxLsIPMwWjBOs5I+eYUdh9hFoEEOOURE35VIA0sM162qRoy1uMFBCRSZAQryLT kDh62GMUSo7IGRi3TRnk8x2uqEfnrEVMyZXonjn5uRF9gjKvIpaR1/x4ohlOVgos2YDV lH5eK9MzDT1YYflDuj/2xGnDH2iBFDVpmxOlEA5ac+ByeEoL+wn3AB1wzm0lY8CUDma3 kdKiHVY6FyLx1ekPIIKaK4njaxpNNFh1360s7mLKJ1EbTxtEEK6CDX06PmP5o+btzSEZ pr7g== 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 oc7si2591637pjb.24.2021.04.09.02.00.39; Fri, 09 Apr 2021 02:00:55 -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 S231621AbhDII7Z (ORCPT + 99 others); Fri, 9 Apr 2021 04:59:25 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:3081 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230181AbhDII7X (ORCPT ); Fri, 9 Apr 2021 04:59:23 -0400 Received: from DGGEML402-HUB.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4FGsRF3G8zzWV6R; Fri, 9 Apr 2021 16:55:37 +0800 (CST) Received: from dggpemm500023.china.huawei.com (7.185.36.83) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server (TLS) id 14.3.498.0; Fri, 9 Apr 2021 16:59:09 +0800 Received: from [10.174.187.128] (10.174.187.128) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2106.2; Fri, 9 Apr 2021 16:59:08 +0800 Subject: Re: [PATCH v4 1/2] KVM: arm64: Move CMOs from user_mem_abort to the fault handlers To: Quentin Perret CC: Marc Zyngier , Will Deacon , "Alexandru Elisei" , Catalin Marinas , , , , , James Morse , Julien Thierry , "Suzuki K Poulose" , Gavin Shan , , , References: <20210409033652.28316-1-wangyanan55@huawei.com> <20210409033652.28316-2-wangyanan55@huawei.com> From: "wangyanan (Y)" Message-ID: <67c497cc-5a74-e431-a9bc-d05582998bbe@huawei.com> Date: Fri, 9 Apr 2021 16:59:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.174.187.128] X-ClientProxiedBy: dggeme708-chm.china.huawei.com (10.1.199.104) To dggpemm500023.china.huawei.com (7.185.36.83) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Quentin, On 2021/4/9 16:08, Quentin Perret wrote: > Hi Yanan, > > On Friday 09 Apr 2021 at 11:36:51 (+0800), Yanan Wang wrote: >> diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c >> +static void stage2_invalidate_icache(void *addr, u64 size) >> +{ >> + if (icache_is_aliasing()) { >> + /* Flush any kind of VIPT icache */ >> + __flush_icache_all(); >> + } else if (is_kernel_in_hyp_mode() || !icache_is_vpipt()) { >> + /* PIPT or VPIPT at EL2 */ >> + invalidate_icache_range((unsigned long)addr, >> + (unsigned long)addr + size); >> + } >> +} >> + > I would recommend to try and rebase this patch on kvmarm/next because > we've made a few changes in pgtable.c recently. It is now linked into > the EL2 NVHE code which means there are constraints on what can be used > from there -- you'll need a bit of extra work to make some of these > functions available to EL2. I see, thanks for reminding me this. I will work on kvmarm/next and send a new version later. Thanks, Yanan > > Thanks, > Quentin > .