From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C508606A322 for ; Thu, 3 Dec 2026 15:54:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=0va4prl1; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=ndLfcCLL DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=sz+pQscpCDbXO8ZpHWmdGt+UMRpv6qg2VFIcgi7eIwU=; b=0va4prl1yjCrvlmZFCaz+ml4b7 RUfLY7OfN7ezOgXQ5zSWb0OJ/aYQGC4/oPgMKyeSFJx59QJVO8P/AkZCkVjUEBDpjSgIHSHzU/H3X g1m0hgpF1snmcntGocYkqIjyzY/JkCTshptS5vDZ6ZQidqKox93kUirLvxGt7yA94h4mStZ37MjMJ tJax0e2YfX//2GAX53nyC4ls2B1+72Yh8q75Y5VTPveNPur802XwcAR1Cz1PaczS3UJtj5dKkI18o bhuqUwwIfrGthi2Vd1b81Tsljoty2hXsLNiJKXSlf8W1ig7k/UYWVSK3B/oQcTzZh4PMDz1o/Na7z G9lZVS6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ98e-0000000FCko-23Tu; Thu, 03 Dec 2026 15:54:28 +0000 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ98b-0000000FCkS-3V2I for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 15:54:27 +0000 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-6df5e315bd1so11944330eaf.2 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=lists.infradead.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=ndLfcCLLCph2WNzyi2t7wrefGeQIYeQnV25i9Di9y0KIuh2zqGDJn1VoISdcuAVbeB ark6UzKvez/Iq7TyOX4qZe7B1voFBjYP0B3asjDQT3xg08sAVZ3c8KZd1I7Add2Ggbod 7f0f8bHV8LEB8ap5kz6R7nbqPmR0V1SmUh5T+w4pgyQ/ac+O2BI1P3wsmzEw8nbTLNjx kJWNaXlIG0x6py+CQHsGfqzaiNsLduB0oXc+H8Hz6zXaKwDOz4Ww7fpp0yhejSJiGFUX m8WQ75ksUvWxoNkpWjc5aiPTRICEJ5PiXV+rwy57eWbPqHmZ5zcClMQpC9NoiQVVDocS hV0Q== 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+UM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5T7NR0r3+6UitKRLudfVOa2mU z2LL5IHA90s7VJRVC0cmc1qNiAfzWox7PjSb9bK4Fe7p66vVpXREmaWEKSqfi+31zZbXE36RRL8 ar5aBI7L0GW6yyjl2Dl7XJbPJQTMGHIcTwNo9qJqKgk4HW2+v1ESzv33DzNUYGRPa+PvZzSQIc9 Lq8= 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-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_075425_877075_64D9ADD5 X-CRM114-Status: GOOD ( 17.34 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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