Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp919155ybb; Thu, 28 Mar 2019 15:05:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmrohsvasr6Spepf/VFlev8YRD4i0YkqKvz5BmFbYHS21UWWQrKTysY9SGJnMgRloSstNj X-Received: by 2002:a17:902:b618:: with SMTP id b24mr42808607pls.73.1553810742556; Thu, 28 Mar 2019 15:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553810742; cv=none; d=google.com; s=arc-20160816; b=W35b7CqHEDvAOaPQ+FlcwzOHUaN9xxj3PSsJZSDiTo/qzheIMR3y5+5eQ/FdvAoJQf xzCJdaZN8MpI2qhIONjIkUd9IHZcZuzq7MwLIQrq1Y9mm+Xudw0cJOs+mdkkxdhYIPkM 4vL6BPjQzgzWsQsH6pZlnb3dRIwHvjdsH91i0zz7aDA1sMlcq5ooyZLnmhCCsvUAQYtS CrwAR4SHUDbQlw/j+K49ZHKL8pVS82xW/sGqeo5gRuAysRVHQs+ixiBwHxxReCKMek/Q DytYFTPOhVfyvzEcCQ4gEVILXSdVdNlFf3k6GKkUnEKD2Uaq4EldIK6Fs4KmrAxMP9ul ZrZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RKlI+bIqZ7I5BjFe5tH8aS4sqUkznnbkGwj/NclQe9U=; b=edd6k1yZsGUn+K2eKivjyDhJsigqU+WoYaQEkQezfiNnYi/dA5VVGfWTvdRbd9RhAp K6m0jSSkOlRYKZipRQHpzu/DJkDTeUv0r/A7erZh5So/HNZk3cS4yIIePTSkL+fHtg7j L3r7vo+0OAJjtSqs0DPcli++7+Zoy8dDxThwM+LxcIF0ldXmcAtDunQe+ODuD960v+59 HZ2nB0AlaJ24xj7VMJ5uo0pnSFrSgWP9H16any77onsrx6aP8kzZGNofu03k7o0MuI1f SffYcbf2VaU8Eh07mPdEglxvDk8rK2YieKXv3QjswWO25P/YezIavi/E4904JJlQMpYv cGTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c0vuwFWR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65si242303plf.288.2019.03.28.15.05.27; Thu, 28 Mar 2019 15:05:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c0vuwFWR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728054AbfC1WET (ORCPT + 99 others); Thu, 28 Mar 2019 18:04:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:33310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727089AbfC1WET (ORCPT ); Thu, 28 Mar 2019 18:04:19 -0400 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 22CFA21850; Thu, 28 Mar 2019 22:04:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553810658; bh=vcdrYxHXX97GvWcGJEFDNLmKdjI/FuaYGS/SKVsowuQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=c0vuwFWR66/pHGYJwr7tZPerCVPKfqydjOYYicLyLlnFId3oBaP/PuLuMy7uMQpQ6 EWB5zB2JHNQ7BZEQkGr1rnUqkeAgT0BJS6s2CYgqKzhGTOLbIzJiPWFTvaOgu+FSX+ /M7yxp89H7AYQF5ii16jUeEz5jkEvaeH00VjjrUs= Received: by mail-ed1-f54.google.com with SMTP id v21so358306edq.4; Thu, 28 Mar 2019 15:04:18 -0700 (PDT) X-Gm-Message-State: APjAAAVAs8UTzasRIAfy5ukszXjjejMMFzcOph3w/Lc9fxSHsdwaLJGj tY8ZgDihx+g9Wv17JQREWAZZMcNkZhUwZc7b4RI= X-Received: by 2002:a50:eb4d:: with SMTP id z13mr22391287edp.200.1553810656714; Thu, 28 Mar 2019 15:04:16 -0700 (PDT) MIME-Version: 1.0 References: <1553483264-5379-1-git-send-email-hao.wu@intel.com> <1553483264-5379-6-git-send-email-hao.wu@intel.com> In-Reply-To: <1553483264-5379-6-git-send-email-hao.wu@intel.com> From: Alan Tull Date: Thu, 28 Mar 2019 17:03:39 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 05/17] fpga: dfl: fme: add DFL_FPGA_FME_PORT_RELEASE/ASSIGN ioctl support. To: Wu Hao Cc: Moritz Fischer , linux-fpga@vger.kernel.org, linux-kernel , linux-api@vger.kernel.org, Zhang Yi Z , Xu Yilun Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 24, 2019 at 10:23 PM Wu Hao wrote: > > In order to support virtualization usage via PCIe SRIOV, this patch > adds two ioctls under FPGA Management Engine (FME) to release and > assign back the port device. In order to safely turn Port from PF > into VF and enable PCIe SRIOV, it requires user to invoke this > PORT_RELEASE ioctl to release port firstly to remove userspace > interfaces, and then configure the PF/VF access register in FME. > After disable SRIOV, it requires user to invoke this PORT_ASSIGN > ioctl to attach the port back to PF. > > Ioctl interfaces: > * DFL_FPGA_FME_PORT_RELEASE > Release platform device of given port, it deletes port platform > device to remove related userspace interfaces on PF, then > configures PF/VF access mode to VF. > > * DFL_FPGA_FME_PORT_ASSIGN > Assign platform device of given port back to PF, it configures > PF/VF access mode to PF, then adds port platform device back to > re-enable related userspace interfaces on PF. > > Signed-off-by: Zhang Yi Z > Signed-off-by: Xu Yilun > Signed-off-by: Wu Hao Acked-by: Alan Tull