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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CD26CCD1297 for ; Fri, 5 Apr 2024 03:59:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XQD/91wnktsV9xvozV8bkrH7h0tblrMyS8BeUv1QeM8=; b=OcLUfDA/hOdfzb 5T8LMmcHE1c+ABEc/1dxEPPNVhWcuBZ6IbhVHw+yQk/Frmbj+rlOX8eRyQygI3yLhGqoGWaUDpqqs vv6etDAjFuPcjoLCPxlXHj485cXdI2T75xX4xXzpBow8d1+ZB8HzmwuUGU8+3hPfSJktkBilLq80T rkCnod7dotlIpvBGGrjz6Hxh9XIe7N/gabb+tv2OE4xUqUFxEkpgpDuf9qgz20PxXd0i4QoMh/XL/ iT8LtsoD7ijjvRAQjTwals8nk53DJV+NlJYyP2t05AmvwuCs1OBSvybnQstHIJBzKhMPvd/67YxIM 6aYVdqa99rikeNtAmAew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsajk-0000000565a-07Si; Fri, 05 Apr 2024 03:59:32 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsajf-0000000564A-1O62 for linux-arm-kernel@lists.infradead.org; Fri, 05 Apr 2024 03:59:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712289560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7yPh3QTB7FkxbLm1lXDMlRiRFk5C+eT+UIW9LjRtUA=; b=fVmjeppmxefDyzoJ9mOTuO/D2YKIllmOPX6Wbif8G3JUlBYfECBNA4yRmOSWzWm550dmyP roJ85bQmkOMmkJi2L6EWSvETC4g3tHoqHQePiPP4S+JWrRSqLzyHFJk3xWzOaYMqH+pIkO UAsdSoZkyClo9ZCpxBi1gf494BUgwQM= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-94-NG0_X88hN1-f1iSmt59s5Q-1; Thu, 04 Apr 2024 23:59:16 -0400 X-MC-Unique: NG0_X88hN1-f1iSmt59s5Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2A16B2815E28; Fri, 5 Apr 2024 03:59:16 +0000 (UTC) Received: from gshan-thinkpadx1nanogen2.remote.csb (unknown [10.64.136.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3FE661074E; Fri, 5 Apr 2024 03:59:10 +0000 (UTC) From: Gavin Shan To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: catalin.marinas@arm.com, will@kernel.org, gshan@redhat.com, akpm@linux-foundation.org, maz@kernel.org, oliver.upton@linux.dev, ryan.roberts@arm.com, apopple@nvidia.com, rananta@google.com, mark.rutland@arm.com, v-songbaohua@oppo.com, yangyicong@hisilicon.com, shahuang@redhat.com, yihyu@redhat.com, shan.gavin@gmail.com Subject: [PATCH v3 0/3] arm64: tlb: Fix TLBI RANGE operand Date: Fri, 5 Apr 2024 13:58:49 +1000 Message-ID: <20240405035852.1532010-1-gshan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240404_205927_471088_1DD11DE0 X-CRM114-Status: UNSURE ( 9.00 ) X-CRM114-Notice: Please train this message. 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org A kernel crash on the destination VM after the live migration was reported by Yihuang Yu. The issue is only reproducible on NVidia's grace-hopper where TLBI RANGE feature is available. The kernel crash is caused by incomplete TLB flush and missed dirty page. For the root cause and analysis, please refer to PATCH[v3 1/3]'s commit log. Thanks to Marc Zyngier who proposed all the code changes. PATCH[1] fixes the kernel crash by extending __TLBI_RANGE_NUM() so that the TLBI RANGE on the area with MAX_TLBI_RANGE_PAGES pages can be supported PATCH[2] improves __TLBI_VADDR_RANGE() with masks and FIELD_PREP() PATCH[3] allows TLBI RANGE operation on the area with MAX_TLBI_RANGE_PAGES pages in __flush_tlb_range_nosync() v2: https://lists.infradead.org/pipermail/linux-arm-kernel/2024-April/917432.html v1: https://lists.infradead.org/pipermail/linux-arm-kernel/2024-April/916972.html Changelog ========= v3: Improve __TLBI_RANGE_NUM() and its comments. Added patches to improve __TLBI_VADDR_RANGE() and __flush_tlb_range_nosync() (Marc) v2: Improve __TLBI_RANGE_NUM() (Marc) Gavin Shan (3): arm64: tlb: Fix TLBI RANGE operand arm64: tlb: Improve __TLBI_VADDR_RANGE() arm64: tlb: Allow range operation for MAX_TLBI_RANGE_PAGES arch/arm64/include/asm/tlbflush.h | 53 ++++++++++++++++++------------- 1 file changed, 31 insertions(+), 22 deletions(-) -- 2.44.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel