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 B93D1606A33C for ; Thu, 3 Dec 2026 02:07:46 +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=0MzmjLQ+; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=g/PbjkhY 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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:Cc:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=l7C77yGlBckIhUOPwKufQu+i+nlAYlkUzwhWcDT9LAU=; b=0MzmjLQ+2qdjRq o/kZUO1ri+HKJkrPOShdq16NKTLGOEvku7CC9G5RmfkeLIjGsLlHYvN5X2ns1nZ2XvsCIZaq4PGEl 6Pt/LmH+cXMykKwrNOVDXAfX1iavKxmBre/m4+GUswQaQG4Zqgt89iW77HYzztX/45JF7sq1HI6tG K7BQ7OfTeFmARaumlmBBvx94IHx+DYEO8raApHQUy35zOQoMYzky5PoIkA+rySv2sgVQls8eK2vV/ q/FlfW3jR+12+bcEjDFG5q9X+kuUzjO7lR9dq38Mt3ScJQa4MEq5c6h/MGRD17piWwYpztur7kawL mIbA/APlQwrnsVF6T6vw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYwEW-0000000DBwJ-03qF; Thu, 03 Dec 2026 02:07:40 +0000 Received: from mgamail.intel.com ([192.198.163.13]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYwES-0000000DBvo-3uQV for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 02:07:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796263656; x=1827799656; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=l7C77yGlBckIhUOPwKufQu+i+nlAYlkUzwhWcDT9LAU=; b=g/PbjkhYxqPwG5m5W9xhxcQtfbvAXuEV3+Qe/Gxh8kOraBM2bU+Ia8im t5NI0t0HEb9CkjFlSU1N/lm/XU2nG+7y4UJtbocLSfpBp+aMfKv75l0Kt RH/8aj9mauKZ0X4tEYwcFxiiXmpGIhXDJi1YH534amTDBPozfYMwqu/Wf dn3nHeiwQFmbDAajsy/zl8k1eluq5cFLUL6oMlp0NS0z2v4xczg9nd2Gw z1JuUEBA/8RKkZ8PO394fL2GnSOatMcJwr9ehlO5BZjdji0/Zx05QDZUD 9Tb8zWP8BI76IMa8e7KW8L9fvuUlLQNdqw/p3uUycbYFYIK9CLpd3TZcr A==; X-CSE-ConnectionGUID: MxPLAnc+RwaHu6h1v3/eFg== X-CSE-MsgGUID: IoC1pPrsStahRxTPbqSYDQ== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5177129" X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="5177129" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 18:07:35 -0800 X-CSE-ConnectionGUID: d/uWn6prRmWg67abXhtIVA== X-CSE-MsgGUID: 7dcHHSZOT6a84aiO5OHssQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="13557596" Received: from unknown (HELO [10.238.1.144]) ([10.238.1.144]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 18:07:28 -0800 Message-ID: Date: Thu, 3 Dec 2026 10:07:26 +0800 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: baolu.lu@linux.intel.com, Alex Williamson , Alexey Kardashevskiy , Bjorn Helgaas , Catalin Marinas , Jacob Pan , Jason Gunthorpe , Joerg Roedel , Jonathan Cameron , Jonathan Hunter , Kevin Tian , 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, Jason Gunthorpe Subject: Re: [PATCH v10 06/18] iommufd/device: Associate KVM file pointer with iommufd_device To: "Aneesh Kumar K.V (Arm)" , linux-coco@lists.linux.dev References: <20261125081121.379481-1-aneesh.kumar@kernel.org> <20261125081121.379481-7-aneesh.kumar@kernel.org> Content-Language: en-US From: Baolu Lu In-Reply-To: <20261125081121.379481-7-aneesh.kumar@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_180736_991516_3B328362 X-CRM114-Status: GOOD ( 13.35 ) X-Spam-Score: -4.2 (----) 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=-15.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 11/25/2026 4:11 PM, Aneesh Kumar K.V (Arm) wrote: > From: Shameer Kolothum > > TSM vDevice support needs access to the KVM associated with a VFIO device > after the device has been bound to iommufd. > > Extend iommufd_device_bind() to accept the device's KVM file and store it > in the iommufd_device. The KVM file reference is owned by VFIO and is > already held for the duration of the device open path. > > Reviewed-by: Kevin Tian > Reviewed-by: Jason Gunthorpe > Signed-off-by: Shameer Kolothum > [nicolinc: fix build error in iommufd_test_mock_domain()] > Signed-off-by: Nicolin Chen > [aneesh.kumar: Switch to use kvm_file] > Cc: Jason Gunthorpe > Cc: Kevin Tian > Cc: Joerg Roedel > Cc: Will Deacon > Cc: Robin Murphy > Cc: Alex Williamson > Cc:iommu@lists.linux.dev > Signed-off-by: Aneesh Kumar K.V (Arm) > --- > drivers/iommu/iommufd/device.c | 7 ++++++- > drivers/iommu/iommufd/iommufd_private.h | 2 ++ > drivers/iommu/iommufd/selftest.c | 2 +- > drivers/vfio/iommufd.c | 3 ++- > include/linux/iommufd.h | 4 +++- > 5 files changed, 14 insertions(+), 4 deletions(-) Reviewed-by: Lu Baolu