From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 130D744D686 for ; Tue, 14 Jul 2026 13:00:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784034049; cv=none; b=Goz1FO+FJLOdL0h5Mmu6lE249RZcx7hILwvAFFMWm8RvaTBD915Ad//AeydHBRDTiJEoBJmVSPVCUbCnTeM/y+FPH6xwitQCCq2ROgNU0q71nhoUdC+2w00qcUF+T27/TxttzqVH53+eo6q7vtwKc/FBoTuX9FaqloddbHAsh3Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784034049; c=relaxed/simple; bh=6JVdvVNVt572PUZ7EuMOb+NxVezh363Z8fGIp8Tm+bw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pkMxUh5IsxzJxUO25ZbKYmSOgmB9ovaACmPWbKZmyqISE6BMGGPzb9vqvz43hdqSFBSy/KXWTiUK2c1cYQonWOaN2Nh4yWlas1gcYQkH2kUVKadB8w48F8g1X5JbuBjiW4wTNdQrkmjI+b+hdk1YQuArIBWn21+NVcthfDeIf9M= 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=FotJ/XAq; arc=none smtp.client-ip=209.85.160.173 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="FotJ/XAq" Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-51c10ed63c0so274411cf.1 for ; Tue, 14 Jul 2026 06:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784034047; x=1784638847; 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=uIGZ/z4hY5ZNRt8p1qIWG745rMH9lv/GU7QvdqB/JiE=; b=FotJ/XAqQVYacWwe4Ky57UUxA1A6QIUUsWnnVHtnTKKDlYFmUS0fLxGAzsDeI1gZv1 /6xtygTuVBxsD0GehlESKZIeE0UHuEGxcd8w79GT74LyVahxJxVjQ878N8V/IDlKkZHb //fUoaYflkhD4dBWfh34yE+e+7gqzU6K9i0s22V0OwGhKGP2l0NwZ9TpovXwWFv/nNmF QhooEiB9pWtVSYkJxJGT67Lx0QyZ4ALxm1I1P/VTR1N/ba7X7Eptq4+W+bbVfxa2btj/ C7g2Vy3arWJ8MZuTDO9K9IV1irk3/qUQATWwwUHyHoyl6BgWq2XNoBNnkCC4V8dtrumq SR2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784034047; x=1784638847; 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=uIGZ/z4hY5ZNRt8p1qIWG745rMH9lv/GU7QvdqB/JiE=; b=XOoNMLxWP8JlR+a0bt7vRuUMtgDYAFQjdBxnyPMA/qfC3SvywxvtoTifN5H1gp2LwY XVq/SGx8GYKa2S6Sj8IlEk6jOmrPWoVXu9WjBKYwwNeUR0BWmODLH32K9YhSqMRWUmL6 okrJb5jS136FD8FghubkXt+2gepvCW5KfCZQ94sQ8w7ZD55RS5GoP4q5fdrgszqan+s+ 67t/xPkjAiY9dj6YitOR48B3zWbwy7ZOq7L+dstBxosr2xmDbDKyU5D9kRiqwtGmlbDQ HhHdX7f/KhgHOxdgX8hyX9PaT8HIDLUyFMIHunNMA4XOAr59/dtctbUthfws97wh6+Ig dUdQ== X-Forwarded-Encrypted: i=1; AHgh+Rripc3LoRl3XNIAhogqQ7HpfFuLT+D0amDdaeD6yYGOOCjIzOF0Be9Va6mr9deoAvo+9LLSEtiepJ4z4Rk=@vger.kernel.org X-Gm-Message-State: AOJu0YxfNCfHuKbDj5vHQOuc7ou5HkFVDGl3E4rsTXNrfOnkef7CfhKj rJ8CxR9dxplzYyXH5EtPteWMx03wRrYl/LCK4XD1KflNv6R0MxGstkoKZDcREoFSOffft5N3pan jNnP6uw== X-Gm-Gg: AfdE7clHIzOHXe34U85XMZzWEHSF2vxoAHGwvtfikwFFtQjF5ndpGfXVSfIojqOVoDW Bzhf6rvaW+SAdbxUTKunCswAGupQy4/1QOpx5ejmtEBeLEkB6md+CxB3wiTIPmuLdfhcNiOLV91 eb9NC/4ytriTKtLrWaQyQQhSoomiSxCSHXLqgHSy028EvSrc3F/gx4oVCpH+uqUpAxEuti05Ul2 ddZQzFUPlYz3MJwStB3N0SvYf4anMIGbktlxuo5SdPvRTDPjrRmwHJuMVNdjfCubuiXQXD45eYB ZdMK5tdoGuqjrgWkGohKdsYJxeYdpKx/iuFT7iSfyNGEZ5jd4FIqEs8BZFQBnrXlCHznSGd8QzQ UUC3A+4qpwjtOxKMCjg7tcMkqhmXSPGEuar5eTatVMhrkDtKQim+92kamOHVB4/qxbDQMwv8nOI 0Qz09oT5ySQuS23CkRIialIzj2mqdGO11Il+X9A4gzumZKrSs= X-Received: by 2002:ac8:5d56:0:b0:517:5c70:46bd with SMTP id d75a77b69052e-51d7bc73cecmr14531951cf.11.1784034043910; Tue, 14 Jul 2026 06:00:43 -0700 (PDT) Received: from google.com (10.129.124.34.bc.googleusercontent.com. [34.124.129.10]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5bface91766sm6434972e0c.10.2026.07.14.06.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2026 06:00:43 -0700 (PDT) Date: Tue, 14 Jul 2026 13:00:36 +0000 From: Pranjal Shrivastava To: Jason Gunthorpe Cc: Nicolin Chen , Will Deacon , Kevin Tian , Lu Baolu , Robin Murphy , joro@8bytes.org, David Woodhouse , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/5] iommu/arm-smmu-v3-iommufd: Reject unsupported bits in invalidation commands Message-ID: References: <194fec44b30b7b4233d218686cd76d63208932ff.1783539724.git.nicolinc@nvidia.com> <20260714121451.GJ674038@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: <20260714121451.GJ674038@nvidia.com> On Tue, Jul 14, 2026 at 09:14:51AM -0300, Jason Gunthorpe wrote: > On Tue, Jul 14, 2026 at 09:35:25AM +0000, Pranjal Shrivastava wrote: > > > + u8 ttl = FIELD_GET(CMDQ_TLBI_1_TTL, cmd->cmd.data[1]); > > > + u8 tg = FIELD_GET(CMDQ_TLBI_1_TG, cmd->cmd.data[1]); > > > + > > > + /* NUM, SCALE and TTL are RES0 when TG == 0 */ > > > + if (!tg) > > > + return (range || ttl) ? -EIO : 0; > > > + /* TTL == 0b01 with a 16KB TG requires SMMU_IDR5.DS */ > > > + if (tg == 2 && ttl == 1 && !(smmu->features & ARM_SMMU_FEAT_DS)) > > > > I agree we must check this but I'm a little confused, How is a user / > > VMM depending on the IDR5.DS bit today? The IDR5 is exposed to the user > > via hw_info AND in the uAPI documentation block we explicitly mention > > for struct iommu_hw_info_arm_smmuv3 the following valid fields for IDR5: > > > > idr[5]: VAX, GRAN64K, GRAN16K, GRAN4K > > Probably soon we will add DS to that comment and it will be fully > backwards compatible so a new VMM following the new guidance can just > read DS. > > Thus we can't have any kernel release that doesn't work with a VMM > following DS... > Ack. Understood. Praan