From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794271982; b=JnvSZFeirS83eJlYQmJudpY4+whZ3ZHuihja9Sdw2cbDUiG8rokd5cFdCiOTidfwuRVb OrPrreB8mwgs/A51J1B7Hgsn2wNDi7YPBRh/ReC4+vPJTsNBSx+b6Cw1v+6AegIwt/mH9 YFzVv3WPiQGRwCnV8iB/VGB3EITN5vwn3tQb9L9/dcxEviXFU2Yf2N8pZoTZJfGy5laDL 6Lgh+LXKiVmquhHERFsUyfkEuskCqDh/DzS5rZG5RBKfHT6GY0GjSKKLjqQJw3aMxHdru GfuktnCE9qgwqxr0TJnVzWdUqe2ep3kJoPjNWB8O/qqVJhpz2ZA4b5L+63IawuuiIhQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794271982; 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=JyWOo/pOtk62GRS0TgSKLCUeZbYObiIcnLDqhYuX4P0=; b=VU8pHDMm6ABisFXtYv2CdVRwU/jPm61Qmy9SoL1KE5UH2KaWvSs23W74DQpEjsPRJH+9 neSFDfq4383simSJq3H53mU8sfVc7BeZbQOG4Ig0WY6iSOVyoA6cjlvBfOzuLw6QG7G5n W1a+2vkp11mJPWTaQUlXMhsAz9xpxATUUQLE8z7i9u1XgGdMIGhmeehpyXu12qZ+qxNGU UAkWZ4IUSd+vupr1hVNNanBjTWTW8e7u9GaQ6wPUn3hifI+ar6cgJpXfHd6M4Tew28WEK WvNlTdLpQkCD4p920CLCWuJJjrkLUO2awUVaWbI6NsvbomXFj6lOLseFOJFkXQHNAow== 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=UI0lGOzP; arc=none smtp.remote-ip=209.85.219.54 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (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 CE1AE606A331 for ; Tue, 10 Nov 2026 00:53:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CE1AE606A331 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=UI0lGOzP Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-91ecbdf5343so18016126d6.0 for ; Mon, 09 Nov 2026 16:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1794271981; x=1794876781; 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=JyWOo/pOtk62GRS0TgSKLCUeZbYObiIcnLDqhYuX4P0=; b=UI0lGOzPtjGGCWSl7C0++xvsyw4k27fssP2LH8P51PpkthjkaHj5KRci44EFlllRA2 22mb0xN7sJ21C61B8NklSQ49XXlif29hkmARn6nYF7ZTHmI2dGgaI2OVUU89vCT4eFP5 5LRJCqwTtBD6CfuWQsVz9x2+d/i+0bWwCFTQYtukBdoRFozTXPcKkrE92YIokJW3IncK GGkMlIDvhWpv5fU5ST0icLmUqNHsc7ncipYaVB16Nj5PkFTFvA5JpSp2xVQ429NppEbO 5Cth1s0167K9uRdROxWZQJQiE0pbL9Pumg/2EUhQIg3Xg7iKMPVZ3xgsqRirOQTNWFqX eFRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794271981; x=1794876781; 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=JyWOo/pOtk62GRS0TgSKLCUeZbYObiIcnLDqhYuX4P0=; b=oEpgFk6mCAK760iAfFgNmUyfhHSDSzWjQc/I6mYpVUSbTci31nwOQBEVt3GZCRpIwp G2cfcwqfEp5+SU9K/GuGovTaQyAznJd8llm+jnljvVuYOy8CCSFkqwScg3yhwhWlzj5j PXEkHfKzYbhTHr2fdXvLgXWKfb+7/GSE+1AJxgrxDWVmO8//Cl/+0xlf1sBbjp0FHIIu H6pdZQTnQ24eWUlXXzP5w8zCYNqf7aPbKlKj0qNfS5kf5dTf00NA6+gVX2glZjCfwPDR k9z/TO32hqw/zPL52M6tJlHA2lzl4VaaEEt5fEnGOMXClTG6oxDv/DvMa889g5Pw/Ba1 yOPw== X-Forwarded-Encrypted: i=1; AL+hErE9MrnO7+usP3NDUTKREVB/G847aYK2fRxhrxcEj6zxyXqsgFVDWZjjTripBUGEQ10Lyeq1jTH7HfOeh18=@vger.kernel.org X-Gm-Message-State: APuU4Z8KPW8bealS1sZJRmvxEnFepxEQ1i1U9oNHbAiJddvQ478yC8HD rYLYZkE2co+xMTzHkM1cq5tMzor8n6wAz+cQ475tdIZiMM11zYWUC8DUU9icZR+Em0I= X-Gm-Gg: AYBFou2iC8BDST97FA6tUIKglYKzEchSXVGIkTnLZ65Xrc2ocApazRsVDagY8KnTIPn TQFwseaIU4wumiDJknzDfI73GekSysc5maFQ7D2lMALoAESw9gF0t03cjV3RGPE/ih3KyCt0a09 gtwSCJROFzJhR0BkrH8PdoQX5l3wXMPoodQrMBjB4UaSkEyP5kDf6SZAYIbj3v6q1u315sswIHW h1NQH6AOpXRF1sGOOV1JSRwVesALTf3bXHcYGFfeK2wHEudDHMn6GI/A+q8i2MoTc4UCppwHZHI wVpeEux2HJdYVMJa4xgwApHOFj798gCh6eF91NDiqQBnbWqWKPd5/GlhJcXGfxSAUlkDPE5Rt7f bJJ74a2gRoCPAhitxr+aM5vFCISxBjF01ymEmkKpbe7+PWa540vo4hs+0o6DZYiDERrARbu3x9C MDt9MXNBj/ycA8b8S3VzTnH09fYZxXext2Lwif1D/qmcCHpf2RYdDdBUCYNH0ZSAOvG6IDymGcV 9tnrcDFNWyWBREfWx93g4nzkbG4S7O/4s4PL5dXY/miFeTstpjW5scuVYSwoQaIsGuKkecWwZc4 bywlSEWiERL8Bm5OjDEnoCdH4kZ+nD1Bvnsw/wiGx1IyroKWzJWs1laQS6ieNAo6UYjMLhkYmyy s94/7YgxZQg== X-Received: by 2002:a05:6214:411e:b0:91e:972b:ad99 with SMTP id 6a1803df08f44-91ef027a678mr17759746d6.25.1794271980522; Mon, 09 Nov 2026 16:53:00 -0800 (PST) Received: from ziepe.ca (hlfxns010zw-159-2-239-150.pppoe-dynamic.high-speed.ns.bellaliant.net. [159.2.239.150]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-91ef0543c8esm8667106d6.40.2026.11.09.16.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2026 16:52:59 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xQa6d-00000003NZr-1IKz; Mon, 09 Nov 2026 20:52:59 -0400 Date: Mon, 9 Nov 2026 20:52:59 -0400 From: Jason Gunthorpe To: Jacob Pan Cc: Mostafa Saleh , iommu@lists.linux.dev, Nicolin Chen , Kevin Tian , Will Deacon , Robin Murphy , Wei Liu , "K . Y . Srinivasan" , Haiyang Zhang , Dexuan Cui , Long Li , linux-hyperv@vger.kernel.org, Joerg Roedel , Suravee Suthikulpanit , Vasant Hegde , Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, "Aneesh Kumar K . V" , Mukesh Rathor , John Starks , Souradeep Chakrabarti , Yu Zhang , Easwar Hariharan , Alex Williamson Subject: Re: [PATCH RFC 1/9] iommu: Introduce external attach domain type Message-ID: <20261110005259.GU663069@ziepe.ca> References: <20260925190742.1575380-1-jacob.pan@linux.microsoft.com> <20260925190742.1575380-2-jacob.pan@linux.microsoft.com> <20261026161003.00003b71@linux.microsoft.com> <20261104170816.GS3889730@ziepe.ca> <20261106130352.0000638d@linux.microsoft.com> X-Mailing-List: linux-kernel@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: <20261106130352.0000638d@linux.microsoft.com> On Fri, Nov 06, 2026 at 01:03:52PM -0800, Jacob Pan wrote: > I am not stating that it will break UAPI because of blocking domain is > used. What I am trying to say is that with the blocking domain -> > external transition, we do not need a new UAPI for external attach for > non-CC. It will just reuse the existing UAPI. > VMM: > do_ioctl(vfio_cdev_fd, VFIO_DEVICE_ATTACH_IOMMUFD_PT, &attach, > "VFIO_DEVICE_ATTACH_IOMMUFD_PT"); > hv-iommu-root: external_domain.attach_dev() will do the hypercall. You've basically described a wonky NESTING domain. I think you should just use nested domains for this. Even though there is no S2 make it possible to create a nested domain through the viommu.. If hyperv ever learns to support VIOMMU you will need this anyhow to pass vSTE/vDTE/etc to hyperv. For now the nesting domain creation can just accept an empty struct or something which means identity? Jason