Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1460645rdb; Tue, 30 Jan 2024 21:46:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IESvvhWUf/zw0FEo9pZvLbArHFMDR+rUJOYes/hJAxZVXlzTSxhtCByXJvq9wcuCxdOqvLk X-Received: by 2002:ac8:5cd1:0:b0:42a:894d:8dd8 with SMTP id s17-20020ac85cd1000000b0042a894d8dd8mr591260qta.21.1706680012355; Tue, 30 Jan 2024 21:46:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706680012; cv=pass; d=google.com; s=arc-20160816; b=l+fHKHUKP4TotTeA706lpLKalbX4MzZaiG7OFrjGp68cVSK/S9qM/pq2CP/O6e5nKy FjtmjxXE/zjBahQJLyKFC70o+fAxKAbJ9lB34gVmEeN7QqhafowdN9jkyEG2QO+Jit0U KV2SXamnsI+ieVPoPERp2WHyne9thlCNVN+IcY9om1ViDHNGHrdrn99T4fL/heXAXq3c wm6guHt427aoQQR/+7YlAt1pfGpRGskiof60sx8qowAaexPuCQTczvkN8aWYUPwCpFMa Z17bABSOSQfZ3dVmnWWaozwNMohcWEZKot/K90zb/mYlg2j3OhuAZbshN0LhMmxbmqOg LX/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Kbn9VFPNtCb88iAEfSOZHiGcP6TxcTkolHdBhZq7pjc=; fh=8U1slDGj9idcUifOqawJEsX8Taq4aCTakHk/qs76/pY=; b=QT1DRNsGfmB0Tnc6fUP4H7j8NLhqNQtYeJDR8vk97vEj/KEXXGvXKYnCjDmQkQrpZn eSBfJs4pLcIT2jefvhQxNDRWmqrdiR7Dmc2lOtJ/JJDZlfPZteEh8Wn1gVFbF5VkEOLp LmRHRFBkW7XQcb1iw26A8Q3+Q1zYHBormWyc+HvX0wtshiUJjI3YLy2lFGPcC/vHH7lI osIOzV9Rk+q7bvlmlLqQnlWZZcS2+Yh2FKCvXrnZ9imYzwLGOrcHqDfCle3+Bu23bkEW vH0VNANnNe8IzURjuWoRAv2MzIiMBa+oQvxRpf++vIofjkAN6hiKf95fRGsXIFZ6yqPP qa+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nLy1WTDj; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-45781-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45781-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCXBkl9tdnGdEdvdTrwSmDuRrrco0m07HrdF0lEihqSCz9tcivlYPl0F5oqxIdtrfPHzxrSG5Gqqrxj881JkSjA3f25tefB6fVI15GqD/A== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t21-20020a05622a149500b0042aa8321cb0si5424878qtx.556.2024.01.30.21.46.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 21:46:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45781-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nLy1WTDj; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-45781-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45781-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 21CB91C26194 for ; Wed, 31 Jan 2024 05:46:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B02953DB8B; Wed, 31 Jan 2024 05:46:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nLy1WTDj" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AF943D986; Wed, 31 Jan 2024 05:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706680004; cv=none; b=XWIabctwAGOo//vFCaDojLmpL8Av9fCgDSnNzjen8yfKH4qriy3ULkbMdsgCErkW7gjfXaLxzsymm3uI+NpFeWEB6wozKP6xsMOsbqshZ4KtvFvpt9QkpxLz0Rov7o5MibI8rDu2QaJKUkZsFjl1m68TUpfVrYrFHFKdXE5RKKQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706680004; c=relaxed/simple; bh=zYKdxbeD/BiYZ6iSuprMc52VLxxA+Qn+5DDM5o6EiaE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bv05S0pNskxdeXXmzHSnT4GfvV/EveRWFypCOlQNZ2WfhpUEmhmXbeogVlEqVDvcORDwibYNcRSOve+JkAvMbs5C35AJKEnTAwkrMQek3oFDvFAvYx9/5h5engkxkHGsoAUbnMxbdTT3NipKUXRL9s3ykLu+1TAEk5LCyXWEu2g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=nLy1WTDj; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706680003; x=1738216003; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zYKdxbeD/BiYZ6iSuprMc52VLxxA+Qn+5DDM5o6EiaE=; b=nLy1WTDjof/2gGaS1fsyrCgvgBV1f+Up/Cvuypg2Qefh2hwURWdo/+q6 nMwqNxUeOHUXkmLzGtA23hf1hhoR/pNStFo0ucWlOY+8wycefNd3dPuT9 NvDvFWwAcl92OoRGfVGigVMzlgHBklNhF2L2gKLMECtz2MIUr6dLCg44v wZbYgRPlWAUZrQ+q/lOWCs0+5GrnG1TeYAXVgwEvGWYG2KpRL7aDKOn77 ShB3wpvRwm3JT0s26kRe1ZyO05GlL8jefCRD0nW9zb2LT1WZQNbY3bOgR RvYooBRIcWDlk8OQmRB4eLe0xBFGMPDIWkWMIESDdIyRKYGM6mr/lZwuS g==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="17030298" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="17030298" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2024 21:46:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="961512432" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="961512432" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.165]) by orsmga005.jf.intel.com with ESMTP; 30 Jan 2024 21:46:40 -0800 Date: Wed, 31 Jan 2024 13:43:13 +0800 From: Xu Yilun To: matthew.gerlach@linux.intel.com Cc: hao.wu@intel.com, trix@redhat.com, mdf@kernel.org, yilun.xu@intel.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] fpga: dfl: afu: support Rev 2 of DFL Port feature Message-ID: References: <20240125233715.861883-1-matthew.gerlach@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jan 30, 2024 at 10:00:16AM -0800, matthew.gerlach@linux.intel.com wrote: > > > On Tue, 30 Jan 2024, Xu Yilun wrote: > > > On Thu, Jan 25, 2024 at 03:37:15PM -0800, Matthew Gerlach wrote: > > > Revision 2 of the Device Feature List (DFL) Port feature > > > adds support for connecting the contents of the port to > > > multiple PCIe Physical Functions (PF). > > > > > > This new functionality requires changing the port reset > > > behavior during FPGA and software initialization from > > > revision 1 of the port feature. With revision 1, the initial > > > state of the logic inside the port was not guaranteed to > > > be valid until a port reset was performed by software during > > > driver initialization. With revision 2, the initial state > > > of the logic inside the port is guaranteed to be valid, > > > and a port reset is not required during driver initialization. > > > > > > This change in port reset behavior avoids a potential race > > > condition during PCI enumeration when a port is connected to > > > multiple PFs. Problems can occur if the driver attached to > > > the PF managing the port asserts reset in its probe function > > > when a driver attached to another PF accesses the port in its > > > own probe function. The potential problems include failed or hung > > > > Only racing during probe functions? I assume any time port_reset() > > would fail TLPs for the other PF. And port_reset() could be triggered > > at runtime by ioctl(). > > Yes, a port_reset() triggered by ioctl could result in failed TLP for the > other PFs. The user space SW performing the ioctl needs to ensure all PFs > involved are properly quiesced before the port_reset is performed. How would user get an insight into other PF drivers to know everything is quiesced? I mean do we need driver level management for this? Thanks, Yilun > > Do you want me to update the commit message with this information? > > Thanks, > Matthew