From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (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 7175F3612D5 for ; Tue, 28 Apr 2026 07:39:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777361943; cv=none; b=lqdiWgrVSkwYgZMEITQZnzR0LgtAUU0de91j0uWj13WpuM4rrmmXTm52cMd1Zlx/6vYE5yr4Rx7A5fSyQVJ4uTmaZU/aRjRZ9KEYVz82eNw3mHxev8GeyPFxRCcGC8y/E4gRk6Lgk3oB8HlYVsKvA8e0KimhGVu7yArOVkjw6YM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777361943; c=relaxed/simple; bh=LOmVa5HEYXAhxFxX5dmA5ibLhZjG/rAPjw3EsQuigAE=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=oH0DYR3FDraFllL1zsnwM+FpDJIHnwaW0NVURpKlawj8SbtKdofpbFobOfP/q3SDirjZpVQFR6OFOVRtndB9cB7rme0+L08rwszGGkECcpDGAKSHNeLVCTfUCdNExTXG4EAwvYlB/y91T5lF4NZE8BnNCyqDrI3bBvqaU5VIRSA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ifEV0iWN; arc=none smtp.client-ip=209.85.210.201 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=flex--joonwonkang.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ifEV0iWN" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-82f6b0a7164so14664531b3a.0 for ; Tue, 28 Apr 2026 00:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777361942; x=1777966742; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=LOmVa5HEYXAhxFxX5dmA5ibLhZjG/rAPjw3EsQuigAE=; b=ifEV0iWNwo429B9UIIPWg57oBNkDD9TaKZxCQ2j55t1PKdE7xDHMRESFplQpg6KmUD gOHSfbXjf84R8ByqkPZE7TMCnbuaHxa9Jlpy6kI9i/Q7fIZ1g6r2Dm/dRKI52GZzdtJc /ao/uWUVBTMTlnGKTeAxeSuULRxzsjg4YqTKW1ENaDQcLLKqo0bRb+LNhzVA3eiArKQW ap1rI5K46Y2mM10nKOSbW5L1n6OWueg5C17YMChEIczUbKxLBtX9nF+VbkBAPGcRZJbx aS5bXR9TxH0NBi2HaMg6Vpz4JMSPzDwQi2N/QP7uPNXo8mg6Glr7i2pOx8R2Mj1fqvM9 Mcxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777361942; x=1777966742; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LOmVa5HEYXAhxFxX5dmA5ibLhZjG/rAPjw3EsQuigAE=; b=feBQnYyeqKe1M5o5JsWoiB3uwJnt0EHPspIVmPmXsaoL9AToU8F7dQmnfyRe4ipATm ScyGg64S27KgV22YUEwBtkAD/rX/jMXSvC77m7BNSB30WR+BSvMcXsjdcko00Dhby0zU iKs+mAolRDJPvzwn8jzg6hBuVta++4nEhtFBdQU88frZVu4MEoQlru5IvMW1y+0nZwHP uT8muOEGTFFFCJJP7wx8egLnfn5ddNlhFGcA0wxMhFsUUMrtVOiQXG/b0fSIKk9aRKnT kzMD+Rg2f23T49yjb2EGvGRIaerTC84Ury+RqciSXnle1i5zz/O6lhSCgQFIJ2v5Xd6z SrJQ== X-Forwarded-Encrypted: i=1; AFNElJ+LUCFvWGCpru7oEpmRdMlGfTvKjxDqZKQT0muq6dU0WLnX1M7DRMBWTRGzVCRjZ7gd1UhiQR1TfWbkHyo=@vger.kernel.org X-Gm-Message-State: AOJu0YyFS78Ep2efozthU0DOtPrnjFVxgss3HXAVLKlUsSQdYefQCQxx CAgp/pqFSLLIiv9LJR+pNHMBCWyhcIbxeDW4gu9oXh/tX/7Ugf+OzHjfifZZfcavBT52HxXirIl cSYJYc7IsQJFvoxM5RCEUza6kOA== X-Received: from pfwy28.prod.google.com ([2002:a05:6a00:1c9c:b0:82f:a201:42c7]) (user=joonwonkang job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:2d22:b0:81e:12f1:d8a with SMTP id d2e1a72fcca58-834ddbe707fmr2002397b3a.34.1777361941509; Tue, 28 Apr 2026 00:39:01 -0700 (PDT) Date: Tue, 28 Apr 2026 07:38:59 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.54.0.545.g6539524ca2-goog Message-ID: <20260428073859.1502047-1-joonwonkang@google.com> Subject: [QUESTION] Is the ARM SMMU v3 implementation designed to always ignore SSID when SSID_VALID == 0? From: Joonwon Kang To: will@kernel.org, robin.murphy@arm.com, jpb@kernel.org Cc: joro@8bytes.org, jgg@ziepe.ca, baolu.lu@linux.intel.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, stimim@google.com, cychu@google.com, hhchung@google.com Content-Type: text/plain; charset="UTF-8" Hi team, According to the ARM SMMU v3 spec, I believe that SSID should always be ignored when SSID_VALID == 0 and the current ARM SMMU v3 module implementation in the kernel seems to comply with this without exception. For example, when handling an event from SMMU, the implementation checks SSID_VALID(SSV) first and ignores SSID accordingly. If there is any exception to this rule, I believe it is a bug. Is it true for all the current and future cases? In other words, is it **mandatory** that the ARM SMMU v3 implementation ignores SSID when SSID_VALID == 0? or there might be some cases where the implementation needs to refer to SSID even when SSID_VALID == 0? Asking this question since our HW may not be able to clear SSID when SSID_VALID == 0 and so there might be some garbage value in SSID at some point of time(the HW will have a correct SSID when SSID_VALID == 1, though). If the ARM SMMU v3 implementation is to refer to that garbage value for any reason, the result would be devastating. Thanks, Joonwon Kang