Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp707086pxb; Thu, 15 Apr 2021 04:52:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2iI9G8lXfmZ705t9StooXZtNOUgR1fvPZb042CDs0OL1WPzLLJYY4RSwDErl+SjD1ta6F X-Received: by 2002:a17:907:720a:: with SMTP id dr10mr2937862ejc.375.1618487541722; Thu, 15 Apr 2021 04:52:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618487541; cv=none; d=google.com; s=arc-20160816; b=ivjjrrsck0S3FbMOiWeIZC/sHPfBEhWKWqYiLCeqsz8SdjC8qc5JS/9A7hCTCnCncb d3I9NnyDw/3SqWw3khJ1bYpT7vVvGVzXrqxQnYFEfrUK8tg27nZHHAOLHy/66xoVMGx/ Y4g5GgI72BpGcBNTAs/lX4U4PAZAeYZYfjB6pmtBMju/R2f7+ftdelaXnLnMkJv6aztu 6lVsYvKz7qxiGeEV3BYG3+jCjzdXqal5NDbhoByU2adMbtFG4c8+cr62Ma9mfbBgVC6V r9iY9NJz0/tghsqImuPB23L/vuvzXAhRPYb3mb23H8By0cx2UVZeRoWdZoWA/TOLIKl8 at6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=S6Qgf4Dx0JASURe4gC0D5vnpQiOcqshxt1TUwy61dF8=; b=eKMqA5zYBg+PfMQBZjcjbP2SywJ+XQmf+5XUkgB9eq3wxMK+ae4yuKyceiaekgSf14 FWXCLEg/QtLMXC7siL843dLDwdG1RfYE/hon1xNwvX2Ga+f2X42/rPLtgBcF7qqEAQMe D5u3d7M8hTG4vwMReXh6XslZOHrRrX6Luvg/62pqG7uWqzy8h7+VH1/3unz7g7aK8t54 Tyv/dzFSMDZQri4UV2+Ohpnx1Hn8O+l/yYVwAkGo4mTOkYDZOvI5zC1GOTUw7SYJBL8a g7MIv+5qtTbSVOIkPOO1UVyvQYNr7vEZTtOivcTPGAX0XV22LChLLp/XbXuCF8UWtWM0 GiKg== 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 e12si2215683edz.568.2021.04.15.04.51.58; Thu, 15 Apr 2021 04:52:21 -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 S232739AbhDOLvR (ORCPT + 99 others); Thu, 15 Apr 2021 07:51:17 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:17342 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232718AbhDOLvL (ORCPT ); Thu, 15 Apr 2021 07:51:11 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FLczw63WhzB10g; Thu, 15 Apr 2021 19:48:28 +0800 (CST) Received: from DESKTOP-TMVL5KK.china.huawei.com (10.174.187.128) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Thu, 15 Apr 2021 19:50:38 +0800 From: Yanan Wang To: Marc Zyngier , Will Deacon , "Quentin Perret" , Alexandru Elisei , , , , CC: Catalin Marinas , James Morse , Julien Thierry , "Suzuki K Poulose" , Gavin Shan , , , , Yanan Wang Subject: [PATCH v5 4/6] KVM: arm64: Provide invalidate_icache_range at non-VHE EL2 Date: Thu, 15 Apr 2021 19:50:30 +0800 Message-ID: <20210415115032.35760-5-wangyanan55@huawei.com> X-Mailer: git-send-email 2.8.4.windows.1 In-Reply-To: <20210415115032.35760-1-wangyanan55@huawei.com> References: <20210415115032.35760-1-wangyanan55@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.187.128] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We want to move I-cache maintenance for the guest to the stage-2 page table code for performance improvement. Before it can work, we should first make function invalidate_icache_range available to non-VHE EL2 to avoid compiling or program running error, as pgtable.c is now linked into the non-VHE EL2 code for pKVM mode. In this patch, we only introduce symbol of invalidate_icache_range with no real functionality in nvhe/cache.S, because there haven't been situations found currently where I-cache maintenance is also needed in non-VHE EL2 for pKVM mode. Signed-off-by: Yanan Wang --- arch/arm64/kvm/hyp/nvhe/cache.S | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/kvm/hyp/nvhe/cache.S b/arch/arm64/kvm/hyp/nvhe/cache.S index 36cef6915428..a125ec9aeed2 100644 --- a/arch/arm64/kvm/hyp/nvhe/cache.S +++ b/arch/arm64/kvm/hyp/nvhe/cache.S @@ -11,3 +11,14 @@ SYM_FUNC_START_PI(__flush_dcache_area) dcache_by_line_op civac, sy, x0, x1, x2, x3 ret SYM_FUNC_END_PI(__flush_dcache_area) + +/* + * invalidate_icache_range(start,end) + * + * Ensure that the I cache is invalid within specified region. + * + * - start - virtual start address of region + * - end - virtual end address of region + */ +SYM_FUNC_START(invalidate_icache_range) +SYM_FUNC_END(invalidate_icache_range) -- 2.23.0