From nobody Wed Dec 31 13:06:10 2025 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 4EF7BC4332F for ; Fri, 3 Nov 2023 17:18:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377590AbjKCRS0 (ORCPT ); Fri, 3 Nov 2023 13:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377249AbjKCRSX (ORCPT ); Fri, 3 Nov 2023 13:18:23 -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 05517D48 for ; Fri, 3 Nov 2023 10:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699031859; 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=qZcijrBkenJpJgKIh5nn77fb44ksEJ9Uwp/HPtluVaY=; b=FLhpaRJ43evcLk4oVC0416wghzrtz+4oiTFODPMtRG8iQfwyB7zPuQfxnyy6KYi+SSeWyI zbSz3P9jRVj1Iv5pMknBHfBdWwkudzpl1DDdNJW3zanzRTbPmCCLsgdrXVFORxp1v1Rl1P 4fuvJo33hpdky5V1MDBmAnLphGI+uhI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-396-WVF19FtuOU6EB2xsKppuQQ-1; Fri, 03 Nov 2023 13:17:34 -0400 X-MC-Unique: WVF19FtuOU6EB2xsKppuQQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B31B6101389C; Fri, 3 Nov 2023 17:17:28 +0000 (UTC) Received: from server.redhat.com (unknown [10.72.112.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A0CFC15983; Fri, 3 Nov 2023 17:17:25 +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 v1 5/8] vdpa_sim :Add support for iommufd Date: Sat, 4 Nov 2023 01:16:38 +0800 Message-Id: <20231103171641.1703146-6-lulu@redhat.com> In-Reply-To: <20231103171641.1703146-1-lulu@redhat.com> References: <20231103171641.1703146-1-lulu@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add new vdpa_config_ops function 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 76d41058add9..9400ec32ec41 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -762,6 +762,10 @@ static const struct vdpa_config_ops vdpasim_config_ops= =3D { .bind_mm =3D vdpasim_bind_mm, .unbind_mm =3D vdpasim_unbind_mm, .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 { @@ -799,6 +803,10 @@ static const struct vdpa_config_ops vdpasim_batch_conf= ig_ops =3D { .bind_mm =3D vdpasim_bind_mm, .unbind_mm =3D vdpasim_unbind_mm, .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