From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D9ADC433B4 for ; Fri, 9 Apr 2021 08:59:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D716611AE for ; Fri, 9 Apr 2021 08:59:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231765AbhDII7Z (ORCPT ); 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 > . From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C99FC433ED for ; Fri, 9 Apr 2021 08:59:18 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 80174611AB for ; Fri, 9 Apr 2021 08:59:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80174611AB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D42444B5BD; Fri, 9 Apr 2021 04:59:16 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9xLsLFg7Odcv; Fri, 9 Apr 2021 04:59:15 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id CD3F64B674; Fri, 9 Apr 2021 04:59:15 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 0D1764A4E1 for ; Fri, 9 Apr 2021 04:59:15 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uQSpcjuzx9TM for ; Fri, 9 Apr 2021 04:59:13 -0400 (EDT) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 566E84B599 for ; Fri, 9 Apr 2021 04:59:13 -0400 (EDT) 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 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-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 Cc: kvm@vger.kernel.org, Marc Zyngier , linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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 > . _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81310C433B4 for ; Fri, 9 Apr 2021 09:01:21 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B2B52611AB for ; Fri, 9 Apr 2021 09:01:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2B52611AB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K52EAIw+UhweqU/bRzKbbAPalY2zccPMD5wJr5T+l1w=; b=D1lhdhhJEwnH7rTqiK9uHCrcS 9+oeTGwIdUpLSp6m8sH5SBDzUxeJnUsZ4IOKp1L3HF95r5zzkG5moEi4KRlrGJL3dpRseIvKHlTuh C3nI5Sf6S+d5LdFACZQDMpSUj8IWmX7LCkwIFvm1ihokLVLVtXU4erZvYZt4Ioffh7AwA5a4TIobi 5WQvsOLmFauhtUolVyYI19cnoqueXrcADiQJSQrSdnnQ4S8jmtDKqi73erHoFe9ydt95tBV18cGjo r7vJAakL82iOn2WRqcdCAdcCNWWL4THbJ053sdgpw143G79QECG7Kte1jySsb62D/aSv65Xu86CmC oU0Vqq3gA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUmzE-0008rP-4V; Fri, 09 Apr 2021 08:59:32 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUmz6-0008qI-QK for linux-arm-kernel@desiato.infradead.org; Fri, 09 Apr 2021 08:59:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:CC:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=mlGeiDxhZqAqhkBGD2FsaFXya5DzdC2oxqLjHBdrDag=; b=eSDSXpsVvswpuUUZdzKx88q9CZ tDUKfFcmLK1HBAnk2hSj1X+Ts6ZXzyXolUcTQ6em3ANyO0iZpRpnPNPE0t1qCU1FVuQQSORTcTXiV lFDDMmZfJFbSSSUkvcC3zugfaU4dphHjs3/cHjld5qFfMulsE/m81AB8ge4uguGQLHBImVErx287K wvV/SVefF102wfu6BnzQHa/jRdTw7+ZguMqtZumqppeXDICnJeKArTVrtXoUGTO6U5ZpBXVtEidVu Eq1h4exHOb+0dQ+cbmyEVR8eqF+EQA9wZ/vootSugdXW2v6d61yusOD93ViiNlPDjOg88zIVr3YSe ReI+1zfw==; Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUmz3-003fR6-L7 for linux-arm-kernel@lists.infradead.org; Fri, 09 Apr 2021 08:59:23 +0000 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-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210409_015921_889494_501AA4A7 X-CRM114-Status: GOOD ( 15.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > . _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel