From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.8bytes.org (mail.8bytes.org [85.214.250.239]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30EDF78F2A for ; Mon, 6 Jan 2025 11:39:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.214.250.239 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736163579; cv=none; b=MZegOukCUkwP1BLp4pprQP67SVKFLinwn0hU8GrEhRoWXv5d8OEZXXHZ73l4WEXO8Jh/2QH6sP6Jxk+GXSbD2aG4Z6sObndPNONLAUBunOMGBe7GFg1Poz6EcMLBpmw/Z5Tj96NitbSjH9Yv/1+yGGjeR8G0aFlMD9oZL2rMGW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736163579; c=relaxed/simple; bh=QcL3nPR2Mg+y/+kLjqriTIYQaCgkXcbBs07WimY99OQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d7bOG/NugPGwwoC4WtZJYMObLVFRbDjUZqskAHvEj/L8TgJPHmyVPJni6XkSFXGZaPfVQLxHXTGTtGkKiGPfbwYAWtt/zNX1YApFIFT4RvNfG3yJ/yhhngC6l1nouKF+C7QIoy30KbmxUzbEY+AcX0QVrlzBFokQP997cjzVGBM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=8bytes.org; spf=pass smtp.mailfrom=8bytes.org; dkim=pass (2048-bit key) header.d=8bytes.org header.i=@8bytes.org header.b=VySX6RNm; arc=none smtp.client-ip=85.214.250.239 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=8bytes.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=8bytes.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=8bytes.org header.i=@8bytes.org header.b="VySX6RNm" Received: from 8bytes.org (p200300f6af348600d06e0009f19b6c7e.dip0.t-ipconnect.de [IPv6:2003:f6:af34:8600:d06e:9:f19b:6c7e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.8bytes.org (Postfix) with ESMTPSA id 11B072E0016; Mon, 6 Jan 2025 12:39:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=8bytes.org; s=default; t=1736163576; bh=QcL3nPR2Mg+y/+kLjqriTIYQaCgkXcbBs07WimY99OQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VySX6RNmaZv0h0Bz25vkMgMU8mIX6G8EU5a/NnGDDkUYj6AOlZW4u79UsRJwzqhG8 rSX90D2MelK07hDWBi/21+YHQlWyaf720+tEJcTTCm5TlPkFPo2SG0XkNEaqNz3JHg dBQvPE9WYxLj9OmMhgh9XJH4RQQHx2IWNHszZV2CZ/hR5lxbdfeoekxBQZNHIsD1PU LBeBVKpQBGpGQ6oKVLPIm/Zae8TY2nOwd2MkmP/c6uTIb24cwJMCz7hkeJxPIhV5hP vgWZTBQ5/tGhUxirMIKEgHoAxMfg9s6hhUUvC2vNJpRa1PhkvzeqbRLpg4Ji5Hoy5E vNAaln+sX8sbw== Date: Mon, 6 Jan 2025 12:39:34 +0100 From: Joerg Roedel To: Xu Lu Cc: tjeznach@rivosinc.com, will@kernel.org, lihangjing@bytedance.com, xieyongji@bytedance.com, guojinhui.liam@bytedance.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND 0/2] riscv: iommu: Add shutdown callback for kexec Message-ID: References: <20250103093220.38106-1-luxu.kernel@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250103093220.38106-1-luxu.kernel@bytedance.com> On Fri, Jan 03, 2025 at 05:32:18PM +0800, Xu Lu wrote: > After kexec, the newly booted kernel can not initialize iommu driver > successfully as no one resets iommu state before kexec. > > This patch series supplies shutdown callback for iommu driver. The shutdown > callback resets necessary registers so that newly booted kernel can pass > riscv_iommu_init_check() after kexec. > > Xu Lu (2): > iommu/riscv: Empty iommu queue before enabling it > iommu/riscv: Add shutdown function for iommu driver > > drivers/iommu/riscv/iommu-pci.c | 8 ++++++++ > drivers/iommu/riscv/iommu-platform.c | 6 ++++++ > drivers/iommu/riscv/iommu.c | 12 ++++++++++-- > drivers/iommu/riscv/iommu.h | 1 + > 4 files changed, 25 insertions(+), 2 deletions(-) Applied, thanks.