From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.49 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796313266; b=VwaXBmkvDg2XLStKtbQuuKjGqt1PxPGKea0gWp64bja/B5WDI5ZdBaGAzBc/7c6YiQNf rTJWb0CqrxF7mXJzRD6Q/qTrykHYwxXjReApFfW20Z/Y3L9D5E7gwly2lMrUlSY1lMyFC TIJVdi3wfMbx39zhurLFN1hiKti9Qt2ugm+jtl3Qk2gdqO5guh33AE/670w5pCsLML2ER aRU1Cxa2z/5Eo42ynBRYirNeXqHoXjty0P8gMU9hT7wnHX1sE18gmWearUdjz2Yt9GGXG Ge7QkF4kxLb/X48lLKdHVAQtXAHnQL8MALpNMFBgxWquR1Ak4OdyGEWMkuQU0Nyb0SQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796313266; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=sz+pQscpCDbXO8ZpHWmdGt+UMRpv6qg2VFIcgi7eIwU=; b=mK/Sf7rs9wLDEVxSxawGZxZ4PXBodHWpvNLbj26f8ACCs7O7kjiXN2SEoSGtBKB02lDo Lk4KS29fDeg50r+kGXdWutKCUoRs8ZjP2d2ZJXkTzXHZRCJX2L8YRW3SNys84sQmUgJs4 +qV+xMCg9u6R53Amu1uV9gWfAe3xw3enbKUJKOARYVkssmAebN7IDNFo0DFNIl3womklr crG1fq+A/0aoBX+APVuqN6NMVnycn9JhW8Hk1oQnXULjf/v+k//XpU0TE303iRKudsl6p PMixycDKSib9JcrUzEdJ32U+HRyHUh5Yym+HB03uK9cBIO6mG0IPkMHaigJPE9yRgig== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=AGM6g5DZ; arc=none smtp.remote-ip=209.85.210.49 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFF94606A32D for ; Thu, 3 Dec 2026 15:54:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AFF94606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=AGM6g5DZ Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-84a248254f4so11777a34.0 for ; Thu, 03 Dec 2026 07:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1796313265; x=1796918065; 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=sz+pQscpCDbXO8ZpHWmdGt+UMRpv6qg2VFIcgi7eIwU=; b=AGM6g5DZUxVyXwFAz1YF25HBq+tnwXzyeg2w869ZMeGfDye+jvCnu5h43+iOy9H0z/ nRLfNHUB5VcVIbULijiHrscGBG1EuiM0CRl/fv+JqE2bQCuTr1DpXd932+MavHJXMDZh Zs6ejR94ElEGVUtFEF79MwQGJ5KzP3HnIKp39IgniHLlwf2A7kNy6bF6OMXEXM9i5nIU cvdmSLuKIu5AW5ttXTRL0Ik0nvOhrxKXfsrxZvStcQ3wSjhaYzPT7wmvn28owGUjoY3o kdSPWygyeqAYFkgtDKC0XjSe3Y6bcuy0wT/dEzG9Dck5D+r9B99eGVzrvHUt9ys3dATF wbEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796313265; x=1796918065; 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=sz+pQscpCDbXO8ZpHWmdGt+UMRpv6qg2VFIcgi7eIwU=; b=r4/52EHv9igknf0MDgLHH3VhmNkyOMt4ADwEXFrl8oeoZ6nSybY0xCvbTwpoExIiNK INICik1plW+dMoCpoW67CLCQqh0vMNssgUnXYjDZe57zPntNuj/fe8XQw9Ws4JsLIxGY RxTjEFmyZgEUS+8DH1otcPAUtYRO4TfylFjtO1DSpN8CXXGcFSJ7c9RVRozO6in9UrVW 1oWQTQWksEqX+oVfKGUv+kyWiBo6+lJgHSZSRRaDLnw3cmgJX4UURdh0ZnQgcxoVdi0w Hqc3yM2077x//8i2p2X/yRFA60+l84Br6GHVINzFeH9416lcW/rQdENsoOA5OMCWVcIV oorg== X-Forwarded-Encrypted: i=1; AL+hErFun8TmdiMscL8m8Jydami4DHL2NeVoO0+qWhDhKqX7c3tyM4Itv3kmL9U1qri5A655PEqSlLHwyDF0CA==@vger.kernel.org X-Gm-Message-State: APuU4Z94EWcUdv8hD+zvjQOdJZjbJGIi3JkOASV8hF+NSBmzBEI5VFxa ODTJb46QO2LRKk6YWxHrwFPEjlnKnVhfs4AVK0M2VcL4ORyHrcPwOp5gRXOCJIsOOT8= X-Gm-Gg: AZFdTZePvP4RDq7Ky6XQLtm1qtC6KgazIKywRok9vyUN7+PlPARG+llyuWL05CfudEv HKGerxlWE7Z4q9+9skCjFUkFU2hT8pODlVZyaX0SufK6HjKjeVElJtIhr6f0lswR4OOUMQMbQvA imkCecydPEd3SoBTtM6e6OyBtiP7SGp86a+lq/mlot8936LjokwWhq7gso3moxkdknz28Gqw7x3 g2tpsbO1HSxtt+0Kam5DGmBrvvrqj095R20w3mQz6tBxWXOom4kR47lh6slnsVBbHCuawIg6dle JYUV2w0TLy792OFEfT9KmyzcN+SPfvsXrH8YYwyZqum3BI7FdDfVHsynvCu7h+kYPnwSEr1nxpT wel4fvfLhDKyYbJgEhNeWa7FPkO5f/fXGRXg/VyA6rYEDAt7h43BFTyoClwhCE/umkL8/R2aQZH +2FJDZPESaEW9ldEeV5qLQik5HJfb5KN8yFoX2PmqqUuWnUL/uDzBRcC0nNd1F+Gnb+YTNo11NH NwIuip52Qw6IDxD4TjdbQyBwHt9QMpv1ImnR41H0tm+vutw5EeROqgojZo6vuUWg5qYh3CM7Gq8 Ji8= X-Received: by 2002:a05:6820:f02b:b0:71b:8238:4e2a with SMTP id 006d021491bc7-71b82385497mr25678773eaf.6.1796313264674; Thu, 03 Dec 2026 07:54:24 -0800 (PST) Received: from ziepe.ca ([140.209.225.78]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-71b3806fc45sm30723607eaf.8.2026.12.03.07.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 07:54:23 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xZ98Y-00000006nM8-2ptm; Thu, 03 Dec 2026 11:54:22 -0400 Date: Thu, 3 Dec 2026 11:54:22 -0400 From: Jason Gunthorpe To: "Tian, Kevin" Cc: "Aneesh Kumar K.V (Arm)" , "linux-coco@lists.linux.dev" , Alex Williamson , Alexey Kardashevskiy , Bjorn Helgaas , Catalin Marinas , Jacob Pan , Joerg Roedel , Jonathan Cameron , Jonathan Hunter , Krishna Reddy , Lukas Wunner , Nicolin Chen , Robin Murphy , Samuel Ortiz , Shameer Kolothum , Steven Price , Suravee Suthikulpanit , Suzuki K Poulose , Thierry Reding , Vasant Hegde , Will Deacon , Xu Yilun , Ashish Kalra , Herbert Xu , Jonathan Cameron , Tom Lendacky , "kvm@vger.kernel.org" , "iommu@lists.linux.dev" , "linux-arm-kernel@lists.infradead.org" , "linux-pci@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "patches@lists.linux.dev" Subject: Re: [PATCH v10 14/18] iommufd/viommu: Identify physical IOMMU backing with a tag Message-ID: <20261203155422.GE1074888@ziepe.ca> References: <20261125081121.379481-1-aneesh.kumar@kernel.org> <20261125081121.379481-15-aneesh.kumar@kernel.org> X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Dec 03, 2026 at 06:42:51AM +0000, Tian, Kevin wrote: > this patch and next intend to put that constraint only on the legacy usage, > probably based on the observation that there is only one tsm in a platform > so one tsm viommu can support all kinds of devices behind different physical > IOMMUs. That won't be true for ARM or AMD. Any viommu that has a direct bypass command queue to the guest must have viommu 1:1 with piommu. For these tsm cases the viommu driver should be selecting if it is compatible And maybe that is the proper generalization, make all the drivers work that way and the physical drivers simple always require 1:1 > We have two options here. One is to inherit the current uapi definition > for tsm then abandon this patch. otherwise to not break the existing uapi > we'd better introduce a new viommu_alloc flag to explicitly mark the > viommu as CC type which then can be defined with a different semantics > from legacy. Not sure I see the uAPI issue? The VMM basically needs to know the rules for the viommu it selected when it selects it. If it is a 1:1 with physical or not is baked into the selection, I Think, or should be returned by one of the driver's GET_INFOs ? Jason