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 9A96342C5A; Thu, 8 Jun 2023 09:29:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8CC8240A84; Thu, 8 Jun 2023 09:29:03 +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 B0F3940042 for ; Thu, 8 Jun 2023 09:29:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686209342; 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=FQagk9QGB/bqR6kP96oa9LBHIcZERPr+Ftu2yWE+s3g=; b=Pmtdzwm0mYYlHKGA9/xCJ6PSLWcSMRrgGmH1mwx1lCMxksbSpWbd4t2MspIb/ru7cT1aI4 sJOHRt3lMOvCyhSImer5wFoUhlhaotWe1J8w/u2ZAbYXwa3AXHjhqqOFQBBLQnPk5t/pGm mH4on4yfv86PGA8AYJsklF+eqZPKn9A= Received: from mail-oa1-f69.google.com (mail-oa1-f69.google.com [209.85.160.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-444-jbvmzXZvNYm-1059iE5p2A-1; Thu, 08 Jun 2023 03:29:01 -0400 X-MC-Unique: jbvmzXZvNYm-1059iE5p2A-1 Received: by mail-oa1-f69.google.com with SMTP id 586e51a60fabf-1a02fd9fd7eso327514fac.0 for ; Thu, 08 Jun 2023 00:29:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686209340; x=1688801340; 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=FQagk9QGB/bqR6kP96oa9LBHIcZERPr+Ftu2yWE+s3g=; b=WE7eOQtxCAIina5ZEyq0wckwmIPpdjLzIbenvJEX8IWrHKC4RxjxtJ1bIB8P04I4Nv Ycb+RXvw8Iv/n5t2o8GFvabeY7xB6FBc64gP+c/jXTlc2wnH2krhyJ/XJXlLGPRjRWZw 3Q6z69MQDqLYXtCCcMmYWgP68NFKbPoqAzSqOXxj9LHrq/NMKQ5K7JEUcTOQNHCGqgt6 OLkVMSvnYH+FkRBQbv5vHeBi8wcURGVu08FLqkJ4bEJp8+ndwdFF1u6Wq6Vk8H6oq7bT AuZp3ZbVb8slZVGVIvJBw767iQUkzvk20h9k4WtlVglpHP0hr4ZcApXaputW8Yq5wvml /ReA== X-Gm-Message-State: AC+VfDz+67oUQShvilArOTTgI4fs1EJvNx32YHI3FSDM17aKHTv6RkqT 83p50Ro0Id4MRNg77pUd+gdRsz9UbKMePBM3h7S18ttPhccmgaljKxBRtauDEq0wkk6Qbrz7a3R lB/heOKRfpgIavvsjtko= X-Received: by 2002:a05:6808:9a7:b0:398:5b13:e481 with SMTP id e7-20020a05680809a700b003985b13e481mr7190061oig.7.1686209339305; Thu, 08 Jun 2023 00:28:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5PQLx7+xju/ZA1xhEBWLUzTn28Z9MKupa1dDCgZ4fqFhL+bodQrxdCzJZXuDx1sUzKlgHrSoupCJNd+0IC2UE= X-Received: by 2002:a05:6808:9a7:b0:398:5b13:e481 with SMTP id e7-20020a05680809a700b003985b13e481mr7190011oig.7.1686209337601; Thu, 08 Jun 2023 00:28:57 -0700 (PDT) MIME-Version: 1.0 References: <20230607210050.107944-1-abdullah.sevincer@intel.com> In-Reply-To: From: David Marchand Date: Thu, 8 Jun 2023 09:28:46 +0200 Message-ID: Subject: Re: [PATCH v1] event/dlb2: add support for disabling PASID To: Jerin Jacob Cc: Abdullah Sevincer , Gaetan Rivet , Thomas Monjalon , dev@dpdk.org, jerinj@marvell.com, mike.ximing.chen@intel.com 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 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 c= apability 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). 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. --=20 David Marchand