Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3430859ybx; Sun, 3 Nov 2019 18:55:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzlb3wQK53OUbEkcnFEZZEQn/loPPiASrn0THrqcyGUNjFj95qnTwunQ2WW7PFD06TAcLSC X-Received: by 2002:a05:6402:1157:: with SMTP id g23mr27516537edw.260.1572836134858; Sun, 03 Nov 2019 18:55:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572836134; cv=none; d=google.com; s=arc-20160816; b=qmw0nt5HM8iNrN31X0lzeZAhGnKn9rAXZF/ABKi1qnJIQSEjm33DVVubB2LTtFxHHr COtaNk7Qy4zvpL+iLSdlxuX7mCMG/TdDR3q0WS95ZX20EkqAGUoStpYBgwc+MYzvtf4B HTAZabIk8s2HuOxcVLNXb6oWtPeXYjAD4MPJmC4hrQ5y6/7l1owYpqrYSS9HUY9zWuCd Aj9IBf0H46vjgOYfli6B5RCNdniijlF2ieByt1YgB+XxgePErX4pTYaogmzocN1LkF9V 8rQWjH9BkemmD6WhawMZIv9EYdxvFvWj3bnCqw9LnUm+1F+ygEoxxr7X/MRtVB0dIL+F 8orA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=AXjYrGIsHqKdgGAtBr7HEpIjQtsm9UUKtuxj6Twt+UY=; b=kWU/7wPz/i48zJ3sSb7o5h1SA+ECmU/sJ5wA8jzjIa8CukVvO+CQ+x6qMP+wT2CLz6 Hf9l+IZIyL8/yG3cSu3ToOJlMsXgez1WJig24484XGj8N/a354r4kkRFScCcpPlRFcf7 JNcL8QEoLAth9/ofFsBH33jFXvswyZOjbRXGAS19ZnKTFIFK2cEJPWfKZV5TnBBJbJag 4R2p5C8qx55Chaq9kn/byuqRHrFMfgoCyKFZSPHKwOuAjlnE+qgiOc/p2nhzvRColmFO r06cUabOvxJHfPQNSo+tl6LcbY4o+Oxv0YTXgMOb77T0ANf7jvu4720iaWlEbUCNPFtT i70A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RVZRRJU4; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6si5712917edr.194.2019.11.03.18.55.10; Sun, 03 Nov 2019 18:55:34 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=RVZRRJU4; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729023AbfKDCwc (ORCPT + 99 others); Sun, 3 Nov 2019 21:52:32 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:34919 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728437AbfKDCwc (ORCPT ); Sun, 3 Nov 2019 21:52:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572835951; 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=AXjYrGIsHqKdgGAtBr7HEpIjQtsm9UUKtuxj6Twt+UY=; b=RVZRRJU4LWQme1tbNNbzKqlsFPVDGtYGVVV71VhCWd52Px6osGA8AOTDo6RNqO24G6Z7gr EnOgLd2zADDjviY7mwnYsjjb56vxkWrPgjK0zbxgBIqkeF3FAcvNPxnVzJJF/cY55o2hje lbwtc4d3CgwzCJnSvkYhEF617S2vgts= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-215--hfYGEOLOBaATEUH2p7Y3g-1; Sun, 03 Nov 2019 21:52:27 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 58B2B800A1A; Mon, 4 Nov 2019 02:52:23 +0000 (UTC) Received: from [10.72.12.188] (ovpn-12-188.pek2.redhat.com [10.72.12.188]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFF69600C4; Mon, 4 Nov 2019 02:51:55 +0000 (UTC) Subject: Re: [PATCH V6 3/6] mdev: introduce device specific ops To: Parav Pandit , "kvm@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "intel-gfx@lists.freedesktop.org" , "intel-gvt-dev@lists.freedesktop.org" , "kwankhede@nvidia.com" , "alex.williamson@redhat.com" , "mst@redhat.com" , "tiwei.bie@intel.com" Cc: "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "cohuck@redhat.com" , "maxime.coquelin@redhat.com" , "cunming.liang@intel.com" , "zhihong.wang@intel.com" , "rob.miller@broadcom.com" , "xiao.w.wang@intel.com" , "haotian.wang@sifive.com" , "zhenyuw@linux.intel.com" , "zhi.a.wang@intel.com" , "jani.nikula@linux.intel.com" , "joonas.lahtinen@linux.intel.com" , "rodrigo.vivi@intel.com" , "airlied@linux.ie" , "daniel@ffwll.ch" , "farman@linux.ibm.com" , "pasic@linux.ibm.com" , "sebott@linux.ibm.com" , "oberpar@linux.ibm.com" , "heiko.carstens@de.ibm.com" , "gor@linux.ibm.com" , "borntraeger@de.ibm.com" , "akrowiak@linux.ibm.com" , "freude@linux.ibm.com" , "lingshan.zhu@intel.com" , Ido Shamay , "eperezma@redhat.com" , "lulu@redhat.com" , "christophe.de.dinechin@gmail.com" , "kevin.tian@intel.com" , "stefanha@redhat.com" References: <20191030064444.21166-1-jasowang@redhat.com> <20191030064444.21166-4-jasowang@redhat.com> From: Jason Wang Message-ID: <495efacd-4898-fb89-2599-dce3a5a277f0@redhat.com> Date: Mon, 4 Nov 2019 10:51:53 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: -hfYGEOLOBaATEUH2p7Y3g-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/2 =E4=B8=8A=E5=8D=884:11, Parav Pandit wrote: > >> -----Original Message----- >> From: Jason Wang >> Sent: Wednesday, October 30, 2019 1:45 AM >> To: kvm@vger.kernel.org; linux-s390@vger.kernel.org; linux- >> kernel@vger.kernel.org; dri-devel@lists.freedesktop.org; intel- >> gfx@lists.freedesktop.org; intel-gvt-dev@lists.freedesktop.org; >> kwankhede@nvidia.com; alex.williamson@redhat.com; mst@redhat.com; >> tiwei.bie@intel.com >> Cc: virtualization@lists.linux-foundation.org; netdev@vger.kernel.org; >> cohuck@redhat.com; maxime.coquelin@redhat.com; >> cunming.liang@intel.com; zhihong.wang@intel.com; >> rob.miller@broadcom.com; xiao.w.wang@intel.com; >> haotian.wang@sifive.com; zhenyuw@linux.intel.com; zhi.a.wang@intel.com; >> jani.nikula@linux.intel.com; joonas.lahtinen@linux.intel.com; >> rodrigo.vivi@intel.com; airlied@linux.ie; daniel@ffwll.ch; >> farman@linux.ibm.com; pasic@linux.ibm.com; sebott@linux.ibm.com; >> oberpar@linux.ibm.com; heiko.carstens@de.ibm.com; gor@linux.ibm.com; >> borntraeger@de.ibm.com; akrowiak@linux.ibm.com; freude@linux.ibm.com; >> lingshan.zhu@intel.com; Ido Shamay ; >> eperezma@redhat.com; lulu@redhat.com; Parav Pandit >> ; christophe.de.dinechin@gmail.com; >> kevin.tian@intel.com; stefanha@redhat.com; Jason Wang >> >> Subject: [PATCH V6 3/6] mdev: introduce device specific ops >> >> Currently, except for the create and remove, the rest of mdev_parent_ops= is >> designed for vfio-mdev driver only and may not help for kernel mdev driv= er. >> With the help of class id, this patch introduces device specific callbac= ks inside >> mdev_device structure. This allows different set of callback to be used = by vfio- >> mdev and virtio-mdev. >> >> Signed-off-by: Jason Wang >> --- > [ ..] > >> diff --git a/include/linux/vfio_mdev_ops.h b/include/linux/vfio_mdev_ops= .h >> new file mode 100644 index 000000000000..3907c5371c2b >> --- /dev/null >> +++ b/include/linux/vfio_mdev_ops.h >> @@ -0,0 +1,52 @@ >> +/* SPDX-License-Identifier: GPL-2.0-only */ >> +/* >> + * VFIO Mediated device definition >> + */ >> + >> +#ifndef VFIO_MDEV_H >> +#define VFIO_MDEV_H >> + > I should have noticed this before. :-( > APIs exposed are by the mdev module and named with mdev_ prefix. > And file name is _ops.h, > > We should name this file as mdev_vfio_ops.h > > And #define should be MDEV_VFIO_OPS_H > >> +#include >> + >> +/** >> + * struct vfio_mdev_device_ops - Structure to be registered for each > s/vfio_mdev_device_ops/mdev_vfio_device_ops/ > > Similarly for virtio in future patches. > Will fix in V7. > static void mtty_device_release(struct device *dev) > -- > 2.19.1 > With above small nit changes to rename the fields and file, > > Reviewed-by: Parav Pandit Appreciate that, thanks.