From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BF1D44D01C for ; Mon, 29 Jun 2026 16:28:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782750510; cv=none; b=LPwQgD6MD2G8X6FfIr6B0vEFZHToAOJsB2fYXsTjjjjZUpI+NwZdQl461RCwmOjV9zoILPf7IxNh5tEdEQNTbAovVvzTSvl4vM5iNYy+WegG3gTF3cw89/PcIvIOjYfGUEp96l8TQPGLBevkwIBe5cqE8JPIsOwoXMqcY+sG/6I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782750510; c=relaxed/simple; bh=HoZdwkQCUZWVoOYy4+KgRStt8L7Oi0ubrdBnrNiil7s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ao4zy9O0ccM4JttvhCrJz20AWFoScQXEyA+R+Kf3ii1wTxc9flokfjpJBCiTnS3eYu5BktBdFURP8on/zvPb4s//dXn7M2iJoQbXUPdg18xtIphkoW+BxXfJdurHePUbED0Ls6NnKDGox3TqRsiWBeq6AbLMGoyLAL2pHdVqals= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=sxurUiQn; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sxurUiQn" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2c9b2ac97cdso61855ad.1 for ; Mon, 29 Jun 2026 09:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782750508; x=1783355308; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=bio6F01mW1uhzjb2Qp+Xy8h4WP35qzyJOdcn1fRlVDM=; b=sxurUiQnI9UrZmpGSrWpIpElvIk4/xzCDirQB3bCrmPHTaWZZ9JD+w65DMqMCoGHCj DtDHu9c4TGa2nxC5sVD+bt/WGvLCU0jspXd2WCg2bF6MNVFaeY5luSJugdGEWqYJYGpk mY5wWao2FYFVKgQmmF2KVzCvCMpa7h5TzcJTA1JfwnB/aIv8iMfcRtjCSGFQiWTbbTKY FsGCWSbUysHX3pJWTwHBaW8OUdqOSI8Df5Y/BLS/AcD4Z0rp/1/kPdi9t96CvXw4RQnk A05oh3Y2cdPJWnl7ykFrrb5Hhk4tjkWBDnSgxxPJIakfCO9QZUP1yVulhgRSwsa37uTO l3xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782750508; x=1783355308; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=bio6F01mW1uhzjb2Qp+Xy8h4WP35qzyJOdcn1fRlVDM=; b=Ndc3u9srKkq2E9AWExZuUvpW9Mchw2WlPE8HQfZh9ALEXRe174FkcLMo9lgme7d1KW BJnENkmNpeXMvKF956VeUbVX/P4KffBwx4ylFLitu+o4DVjKKtvYRc+uWy6hea1Kbi2p qnkpC4JJzwk1Vdpyh3q9vyEVRR0MQblthFUoRlEVl+dLhac5vy7MNejj+cueMBI37Hh2 HZUOKAH6LEnM0tpV2J6h6F9N4npb/yoWJFVOpQLOEnPJKF0pDQEU/4esiO+9bc2Feg5R gd1MT0YTHxc1p/2e2Mh5ozHYS1Rh/2DsD3BsA+PPX2USibeqOOOXEfKoM2O0srsyuyq7 oabQ== X-Forwarded-Encrypted: i=1; AHgh+RruyLp648f0Ybr31VmrZnAqbSo+UF8z39xv8soIXzIeyYXbwS4e1wwYZUl0WV2m/nJ6/ED6tFco3SHZpYQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yw4ioqp0Pj5/IhtjjXH22dmRAZV3Tv4vc41ZK0uOTGX5zUSWVHa QXOFw7dQCWWVOmXZmV5vQp1N0uVK9/cp/DqVrV1kcxtseMc4w4aies68VVB0wUmhRQ== X-Gm-Gg: AfdE7ckawbYyFlcSVU2iTSmhGVNYp2BQs1ICsa41TdasSbJ/cMx2uOzN6Q0k+PTT23t byNzRXEaLfVe4Vcg2fGM4OxEuvcXEC8oSGsaqlAkOmI1oN41bLnQsjYIxzxnqDdJ9+x7CEAVIps v7QpR0GeJ6fXmqMyQjoju0hrVFZjhplTPrXo1iv0GMeBD0s8ncZzFzr8O9fo0kFhtrJmftYviTG FgpnFE4G/aYN/YfhIi9gHUKHvbMsifgRMoyxDZlMNfS+iDs/PeSt1e9Pjn/lzzQSeOCitwvMRjW BV/uogDN4P+oDpfqFdB1zrD8Zv2/St5Urrvs2n99Kft2q5oBL8NWU2l4oYN+4VGRZlCwve57enD KaPp+ch0QuEDyR4iFDxqlSEgUUtzAsfn+/UW4Hp49t/0Ar/iZ1quUz/4rYGC2lzbFnOcMei43LG Yl1mUOLOhqlGT7251RLKmdEyD13BDScuSpgM+pmGHvDQ8aiTM= X-Received: by 2002:a17:902:fdaf:b0:2c7:debf:2146 with SMTP id d9443c01a7336-2ca2cf9c2c1mr251595ad.9.1782750507162; Mon, 29 Jun 2026 09:28:27 -0700 (PDT) Received: from google.com (10.129.124.34.bc.googleusercontent.com. [34.124.129.10]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38052f4789dsm10213a91.14.2026.06.29.09.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2026 09:28:26 -0700 (PDT) Date: Mon, 29 Jun 2026 16:28:20 +0000 From: Pranjal Shrivastava To: Nicolin Chen Cc: will@kernel.org, robin.murphy@arm.com, jgg@nvidia.com, joro@8bytes.org, kees@kernel.org, baolu.lu@linux.intel.com, kevin.tian@intel.com, miko.lenczewski@arm.com, smostafa@google.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org, jamien@nvidia.com Subject: Re: [PATCH rc v6 6/7] iommu/arm-smmu-v3: Skip RMR bypass for kdump adoption Message-ID: References: <88e75018e94adc2eb3db8c1fd97c3cc738c170bb.1779265413.git.nicolinc@nvidia.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: <88e75018e94adc2eb3db8c1fd97c3cc738c170bb.1779265413.git.nicolinc@nvidia.com> On Wed, May 20, 2026 at 10:03:23AM -0700, Nicolin Chen wrote: > RMR bypass STEs are installed during SMMUv3 probe for StreamIDs listed by > IORT RMR nodes. A normal boot switches the driver to a fresh stream table > whose initial STEs abort, so those RMR SIDs need bypass entries before it > becomes live. This preserves firmware/guest-owned traffic, including vSMMU > guest MSI cases built around RMR-described SIDs. > > ARM_SMMU_OPT_KDUMP_ADOPT is the opposite case: the driver keeps SMMUEN set > and adopts the crashed kernel's stream table, so RMR SIDs already have the > only translation state known to be safe for active in-flight DMA. Replacing > an adopted STE with bypass can turn translated DMA into physical DMA, then > point it at the wrong memory. > > arm_smmu_make_bypass_ste() also rewrites the STE in place after clearing it > first. While the table is live, a concurrent hardware STE fetch can observe > V=0 or mixed old/new state. > > Leaving the adopted STE unmodified keeps the kdump kernel using the crashed > kernel's translation. That gives the endpoint driver a chance to probe and > quiesce the device. > > If the old STE was already abort or invalid, installing bypass would create > new DMA permission; leaving it alone is a safer failure mode. Later domain > setup still gets the RMR direct mappings through the reserved-region path. > > Fixes: b63b3439b856 ("iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel") > Cc: stable@vger.kernel.org # v6.12+ > Assisted-by: Codex:gpt-5.5 > Signed-off-by: Nicolin Chen Reviewed-by: Pranjal Shrivastava Thanks, Praan