From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796313266; b=PP8fA4bso9fy4CGIMAdGsuGze4JBiRUJrDAxgzwzNO8WG6GIwG0//0DGPFKUyQEZF4k/ 4VcO5FJFvDJI5OpcoyZRwwhkLrEJZHw7kIf5r5qnnj91TyiMtasZVzlsKqE9wM358SM0p 0uTx+Ub+90nqZl3XNm944lX+daASVnlzgqChtlk31weyBKfFXATvtIXEFrPgTbPCNcu/V tlB4Sifi7Cp17ceXjVPAmH1AO90c9Ebvw1oY0XTEiTNoEfxMU6gqq6cWHEimivTi0Icen ufbB9TjgfiEgS0BDE1nLahYYpyNMHqWRG3Bj9m6U7EMHDr+nSA+cKCR8Nn1wuT/Olow== 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=VD9eBKy+GMNrVIlh2IMXEAK5WfDl9wwv3mcg2YF/pesXx4tH1j5jHts2aeFi24RlAzIw 606ayZ0S0vgWL+f5V3r6/g0rCHlmQGQpulnBumnACxJgVX/YNhC9tCjPDTxxmcXapV6e8 HKu3VuFvlKE61RIpAIArfJn7mZyAgBQcuukh029YK+V6IrRPWK+NPcSPMvICQQHBSv0Hz 0yT9NMzpVxKraC5G9jpda9nnIGvWGRt8b0u5wHXZhDqb2qXT8dGw2j8ipBuWwUzYRZshQ oVK9pEQIAssUEjOehEYZSEogDDwyS7G2oJRlaXouka/pNJHKDe0rk9MoVkti78ChXWA== 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=Vmu66CtZ; arc=none smtp.remote-ip=209.85.161.51 Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (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 B144B606A330 for ; Thu, 3 Dec 2026 15:54:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B144B606A330 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=Vmu66CtZ Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-6e560e00a86so8658703eaf.1 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.linux.dev; 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=Vmu66CtZAgprwmsYlPq2/VuYuXL6844wFVAUHTRWljqBJZ+bwdFmrttMiaQMWJcYbH fH3T6HnHix/oK9mMsgaFWAJklQxS3Y5hNCnm8jMQBaZQKBFQnfsg9t7/uzFLhyyhbsny YunEMWe9D/80vSTPfo0pZowbwNv4YiUE6QL5lfZj4mto5b6zBTs16afEVsd8jYBpMuzc 348AMugvBw0v0qgw2sEVnSFz79wbmGLQ71m7owNFLqrPK83O6Xy2vR9m1/IkVkP/SQyJ 8tSndRrtsTA1U+ZLvT1UIsJ1P9JV5xDk+BOg1C2OLjURSF6+JatxzmgcqdD1HRo6jsYd QsRw== 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=dWRWUwcfEsd0ooMM36w2sdQs28Z4KMHGD48rma8s63iFZYbCbmwBhvvlpbqW45lN2Q 8nJCuK7ELjNb7LlgGfqR7Q79bk5u04d2MqjGjIqv2vb2+AeQ5PYZHr4cQ1hvIwgSTKrt yFrwiWySnFU3YPKKqWMlaAaB1sen4/HaAKrTjHVkjjYKmZLV0iwS+Pvb+CMGFPYH0wKl KQ2bl1Zh0Ph87MYjqQDdaU9BpC2DbJs71VHaLubgBevZbO/ZfwuhSD4xtVNx0VIhv5+v p+s0Q3sGXTV82wdJieYMhuffEbDYo4+9ya13j0b2NnKUslttmMAfMXpDSIfYbqxtl9xL awSw== X-Forwarded-Encrypted: i=1; AL+hErFEzRS5VEu9SaXlp1GFtxexF+DdqJZUJdcj63Ci5jgAGLE/WdHkCMEmPxMz6YjlI8hmNQg9PCCpCkMX@lists.linux.dev X-Gm-Message-State: APuU4Z8eGY0rJQ/0xtcjdI+YGLoRKDdat0qX8EKgRRrDP/LlylGP0B1q WF62HexjHFV7veDO3uJ95LFhMGf+a1o1X5s8/Di5o2rt8ertaeSmSrBgAW1sbOJWqwA= X-Gm-Gg: AZFdTZd+TBqAtQfdmCAAkCpAr4+fiDv1tr8zoIbqOgg2mqoxYfbvqn919/c9r+hTmPk zaolvN8HS81gJL9FcN2f7puhCMdXvrG8nE4g16p85D0IueF85tzsHpSMuhqk+yqX/gcxbfhkCvc lnPKaYJgbAov8CSOcf9xON2S2ie4TMGWDUKWZuP9gOJQ7UD/7MNczGCZAKeoALIUA8Fl7Q71XU7 MeYkKFw6RqwvR7WiVq6PkwmCajoutXsEVcV80lWqG0yha/TT5Ra57wUJ376XZ27vBlvuYryVXxs 3atZDtBVVtlBje/4CLjCqqZu0jXClY5bTWwGrcPna9mvBl9CclsS56nP5lIrABEGoY2NtuI1mpW cu//UFO2NTYyYUgcmg295PMD5yya69rtTU95em+iWFNiy5Bg6k6khFjHfx2Shg0ZPJjNnv2MDkr 8st+JYA1ujfZAXsmOpwHBo5Ahnhm/WsaB2nOHwPx+IQoi7p5IC2LygU7lmAZgoyPU7E9TX+B1/A usCa+QIj1BEtJtzcGP/pYyTXcnvjg25aJ2KmM1v+TSUwdtRnYD+vBYHb/udG4gYsA7kBT+mtcwa sWk= 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-coco@lists.linux.dev 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