From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FE2642FC1; Thu, 3 Aug 2023 09:57:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F02742D0C; Thu, 3 Aug 2023 09:57:14 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id C6E1E4161A for ; Thu, 3 Aug 2023 09:57:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691049432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZwWCqXTczkh9FejpHF5qE5feJLUWweZtviSC55AbaUw=; b=BeHgTCyD3j7UxNZ5YH8BFxyqABP9rUK9Li7g9KyPmMIO+uHK4Ps1GF2Rw5C1Idk3fBpIH+ CW3AoeymITEevP7AkKBjEml173dYHAEISY01PHjyxgIdbWuyTzMbs/w2BFdsb7e0KNCSBp KdQqCwJ5LWdmsQw+55R24NzNdvmfDlQ= Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-64-f8O7KvQpMPG_Cq77znvV2A-1; Thu, 03 Aug 2023 03:57:10 -0400 X-MC-Unique: f8O7KvQpMPG_Cq77znvV2A-1 Received: by mail-ot1-f71.google.com with SMTP id 46e09a7af769-6bc9d79cbf6so1081432a34.1 for ; Thu, 03 Aug 2023 00:57:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691049430; x=1691654230; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZwWCqXTczkh9FejpHF5qE5feJLUWweZtviSC55AbaUw=; b=Ec5JgjAd1xrfKGgFNB3P7M73o7HwNtT1VRtfcJF/qrURQz5IW1mA6sMVn2ZY//Xz/c P9NTiQVss5VfYHLnIoA197n0eOl3DzyXN2tNP0GO9+IuwVs/YKjgWqjZH+Lakn+WvIrO qsvsCBeInJurGM+IIb/ChXPSuX7MIvD03CZyUiTPF8Vf3En7KflIYTHwYiQsqMFaUvnR 0OLRNPnN3gbvXMC2kPbpYa2yiVZUmjpgcHRgqLbkZIUVixDYvpvPs1DMAqBaDLXiV/B/ K5a6j/zuEXsRTTfYTF8NpfZDD3v1kBsjAR6RGlxway/6tjkBYqb5FAd8NK3UwAG0+d5r Dm4w== X-Gm-Message-State: ABy/qLZMoVkxQukGrhV1b3lSlNvHYaGkmWEJ5dvUmGsUQSXYL3JYQ1Nh NKptURE8qpgNnQx4mDAXd0+d/phyin4u6PIpTd6TLqATA+I+xRpJMnSe87dZomEuxyYFTF4jqgh 3kT2tuynjjiQvhR1rbTE= X-Received: by 2002:a05:6830:16c1:b0:6bc:a68b:ca44 with SMTP id l1-20020a05683016c100b006bca68bca44mr10681840otr.6.1691049430155; Thu, 03 Aug 2023 00:57:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlFyXSXNQDRPCItpk0Jb4RM7zSDKErOkH0XeU78qXzW4YzTQD79/XsB0kn0joJ0dB9p7FHgLnZ4ENuai3cuAO5o= X-Received: by 2002:a05:6830:16c1:b0:6bc:a68b:ca44 with SMTP id l1-20020a05683016c100b006bca68bca44mr10681823otr.6.1691049429891; Thu, 03 Aug 2023 00:57:09 -0700 (PDT) MIME-Version: 1.0 References: <20230607210050.107944-1-abdullah.sevincer@intel.com> In-Reply-To: From: David Marchand Date: Thu, 3 Aug 2023 09:56:56 +0200 Message-ID: Subject: Re: [PATCH v1] event/dlb2: add support for disabling PASID To: Jerin Jacob , Abdullah Sevincer , mike.ximing.chen@intel.com Cc: Gaetan Rivet , Thomas Monjalon , dev@dpdk.org, jerinj@marvell.com, "Xia, Chenbo" , Nipun Gupta X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Jun 8, 2023 at 9:28=E2=80=AFAM David Marchand wrote: > > On Thu, Jun 8, 2023 at 7:38=E2=80=AFAM Jerin Jacob wrote: > > > > On Thu, Jun 8, 2023 at 2:31=E2=80=AFAM Abdullah Sevincer > > wrote: > > > > > > vfio-pci driver in Linux kernel 6.2 enables PASID by default. > > > In DLB hardware, enabling PASID puts DLB in SIOV mode. This > > > breaks DLB PF-PMD mode. For DLB PF-PMD mode to function properly > > > PASID needs to be disabled for kernel 6.2. > > > > > > In this commit this issue is addressed and PASID is disabled > > > by writing a zero to PASID control register. > > > > > > Signed-off-by: Abdullah Sevincer > > > > > + /* The current Linux kernel vfio driver does not expose PASID= capability to > > > + * users. It also enables PASID by default, which breaks DLB = PF PMD. We have > > > + * to use the hardcoded offset for now to disable PASID. > > > + */ > > > + pasid_cap_offset =3D DLB2_PCI_PASID_CAP_OFFSET; > > > + > > > + off =3D pasid_cap_offset + DLB2_PCI_PASID_CTRL; > > > > +++ additional folks. > > > > Is make sense to move this helper function to PCI common for disabling > > PASID for a PCI device so that other driver can use if needed > > as the implementation is not specific to DLB2. > > Yes, having a helper sounds like a first step (and we probably have > more helpers to add seeing how drivers tend to redefine non vendor > specific pci configs, but that's another story). About this other story, I sent a cleanup series: https://patchwork.dpdk.org/project/dpdk/list/?series=3D29101&state=3D%2A&ar= chive=3Dboth Comments/reviews welcome. > > Now, about PASID being enabled by default with Linux 6.2, is this > breaking of dlb PF something special? Or can we expect many (all?) > other devices to break too? > If so, maybe we should disable it in the pci common code. Is anybody looking into reworking this proposal and moving this code to the pci bus driver? Cc: pci bus maintainers. --=20 David Marchand