From nobody Fri Feb 13 15:41:31 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED30CCE7A89 for ; Sat, 23 Sep 2023 17:07:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232105AbjIWRHf (ORCPT ); Sat, 23 Sep 2023 13:07:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232124AbjIWRH3 (ORCPT ); Sat, 23 Sep 2023 13:07:29 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77C3E194 for ; Sat, 23 Sep 2023 10:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695488794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5JLc/gcAH7DqQQF3pLiWnqXoje3Kz4Ompug0RZFEuno=; b=gqNQ7XU52rlFNyl3JZVL8fqeRWFGaCgSrvBn9le9iIT5mt+aAkIGIkHHys3D6BozjYfOci RZE9HXDx+HyoxUh3l6/OZRQDsuAq2gnOypZ0S1NpPsbIivBiZ2uW+ELUMx7QI33nAXPtUb EhlUq0QCCEtAp54+jFMAB7dR0xgWZv8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-20-r5i6n1P3PIacCZt-mrDfdQ-1; Sat, 23 Sep 2023 13:06:31 -0400 X-MC-Unique: r5i6n1P3PIacCZt-mrDfdQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0EFE13C025B6; Sat, 23 Sep 2023 17:06:31 +0000 (UTC) Received: from server.redhat.com (unknown [10.72.112.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD11E2156701; Sat, 23 Sep 2023 17:06:27 +0000 (UTC) From: Cindy Lu To: lulu@redhat.com, jasowang@redhat.com, mst@redhat.com, yi.l.liu@intel.com, jgg@nvidia.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org Subject: [RFC 6/7] vdpa_sim :Add support for iommufd Date: Sun, 24 Sep 2023 01:05:39 +0800 Message-Id: <20230923170540.1447301-7-lulu@redhat.com> In-Reply-To: <20230923170540.1447301-1-lulu@redhat.com> References: <20230923170540.1447301-1-lulu@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add new vdpa_config_ops to support iommufd Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_= sim.c index cb88891b44a8..55e6f45bb274 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -727,6 +727,10 @@ static const struct vdpa_config_ops vdpasim_config_ops= =3D { .dma_map =3D vdpasim_dma_map, .dma_unmap =3D vdpasim_dma_unmap, .free =3D vdpasim_free, + .bind_iommufd =3D vdpa_iommufd_emulated_bind, + .unbind_iommufd =3D vdpa_iommufd_emulated_unbind, + .attach_ioas =3D vdpa_iommufd_emulated_attach_ioas, + .detach_ioas =3D vdpa_iommufd_emulated_detach_ioas, }; =20 static const struct vdpa_config_ops vdpasim_batch_config_ops =3D { @@ -759,6 +763,10 @@ static const struct vdpa_config_ops vdpasim_batch_conf= ig_ops =3D { .set_group_asid =3D vdpasim_set_group_asid, .set_map =3D vdpasim_set_map, .free =3D vdpasim_free, + .bind_iommufd =3D vdpa_iommufd_emulated_bind, + .unbind_iommufd =3D vdpa_iommufd_emulated_unbind, + .attach_ioas =3D vdpa_iommufd_emulated_attach_ioas, + .detach_ioas =3D vdpa_iommufd_emulated_detach_ioas, }; =20 MODULE_VERSION(DRV_VERSION); --=20 2.34.3