All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: sebott@linux.ibm.com, mst@redhat.com, airlied@linux.ie,
	joonas.lahtinen@linux.intel.com, heiko.carstens@de.ibm.com,
	dri-devel@lists.freedesktop.org, oberpar@linux.ibm.com,
	kwankhede@nvidia.com, rob.miller@broadcom.com,
	linux-s390@vger.kernel.org, kvm@vger.kernel.org,
	pasic@linux.ibm.com, borntraeger@de.ibm.com,
	zhi.a.wang@intel.com, farman@linux.ibm.com, idos@mellanox.com,
	gor@linux.ibm.com, intel-gfx@lists.freedesktop.org,
	jani.nikula@linux.intel.com, xiao.w.wang@intel.com,
	freude@linux.ibm.com, zhenyuw@linux.intel.com,
	rodrigo.vivi@intel.com,
	virtualization@lists.linux-foundation.org,
	intel-gvt-dev@lists.freedesktop.org, lingshan.zhu@intel.com,
	akrowiak@linux.ibm.com, pmorel@linux.ibm.com,
	linux-kernel@vger.kernel.org, maxime.coquelin@redhat.com,
	daniel@ffwll.ch, zhihong.wang@intel.com
Subject: Re: [RFC PATCH 1/2] mdev: device id support
Date: Wed, 18 Sep 2019 13:52:17 +0800	[thread overview]
Message-ID: <e53b38be-bc2a-785f-12d2-951805f3395f__37383.7375942216$1568785977$gmane$org@redhat.com> (raw)
In-Reply-To: <20190917140720.3686e0cc.cohuck@redhat.com>


On 2019/9/17 下午8:07, Cornelia Huck wrote:
> On Thu, 12 Sep 2019 17:40:11 +0800
> Jason Wang <jasowang@redhat.com> wrote:
>
>> Mdev bus only support vfio driver right now, so it doesn't implement
>> match method. But in the future, we may add drivers other than vfio,
>> one example is virtio-mdev[1] driver. This means we need to add device
>> id support in bus match method to pair the mdev device and mdev driver
>> correctly.
> Sounds reasonable.
>
>> So this patch add id_table to mdev_driver and id for mdev parent, and
>> implement the match method for mdev bus.
>>
>> [1] https://lkml.org/lkml/2019/9/10/135
>>
>> Signed-off-by: Jason Wang <jasowang@redhat.com>
>> ---
>>   drivers/gpu/drm/i915/gvt/kvmgt.c  |  2 +-
>>   drivers/s390/cio/vfio_ccw_ops.c   |  2 +-
>>   drivers/s390/crypto/vfio_ap_ops.c |  3 ++-
>>   drivers/vfio/mdev/mdev_core.c     | 14 ++++++++++++--
>>   drivers/vfio/mdev/mdev_driver.c   | 14 ++++++++++++++
>>   drivers/vfio/mdev/mdev_private.h  |  1 +
>>   drivers/vfio/mdev/vfio_mdev.c     |  6 ++++++
>>   include/linux/mdev.h              |  6 +++++-
>>   include/linux/mod_devicetable.h   |  6 ++++++
>>   samples/vfio-mdev/mbochs.c        |  2 +-
>>   samples/vfio-mdev/mdpy.c          |  2 +-
>>   samples/vfio-mdev/mtty.c          |  2 +-
>>   12 files changed, 51 insertions(+), 9 deletions(-)
> (...)
>
> The transformations of the vendor drivers and the new interface look
> sane.
>
> (...)
>
>> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
>> index 5714fd35a83c..f1fc143df042 100644
>> --- a/include/linux/mod_devicetable.h
>> +++ b/include/linux/mod_devicetable.h
>> @@ -821,4 +821,10 @@ struct wmi_device_id {
>>   	const void *context;
>>   };
>>   
>> +/* MDEV */
>> +
> Maybe add some kerneldoc and give vfio as an example of what we're
> matching here?


Will add when posting a non RFC patch.


>
>> +struct mdev_device_id {
>> +	__u8 id;
> I agree with the suggestion to rename this to 'class_id'.
>

Let me change it.

Thanks


>> +};
>> +
>>   #endif /* LINUX_MOD_DEVICETABLE_H */
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  parent reply	other threads:[~2019-09-18  5:52 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12  9:40 [RFC PATCH 0/2] Mdev: support mutiple kinds of devices Jason Wang
2019-09-12  9:40 ` [RFC PATCH 1/2] mdev: device id support Jason Wang
2019-09-12  9:40 ` Jason Wang
2019-09-17  7:55   ` Tian, Kevin
2019-09-17  7:55     ` Tian, Kevin
2019-09-17  7:55     ` Tian, Kevin
2019-09-17 10:14     ` Jason Wang
2019-09-17 10:14     ` Jason Wang
2019-09-17 10:14       ` Jason Wang
2019-09-17 10:14       ` Jason Wang
2019-09-17  7:55   ` Tian, Kevin
2019-09-17 12:07   ` Cornelia Huck
2019-09-17 12:07     ` Cornelia Huck
2019-09-18  5:52     ` Jason Wang
2019-09-18  5:52       ` Jason Wang
2019-09-18  5:52     ` Jason Wang [this message]
2019-09-17 12:07   ` Cornelia Huck
2019-09-12  9:40 ` [RFC PATCH 2/2] mdev: introduce device specific ops Jason Wang
2019-09-12  9:40 ` Jason Wang
2019-09-12  9:51   ` Michael S. Tsirkin
2019-09-12  9:51     ` Michael S. Tsirkin
2019-09-12  9:51   ` Michael S. Tsirkin
2019-09-17  8:09   ` Tian, Kevin
2019-09-17  8:09     ` Tian, Kevin
2019-09-17  8:09     ` Tian, Kevin
2019-09-17 10:16     ` Jason Wang
2019-09-17 10:16       ` Jason Wang
2019-09-17 10:16       ` Jason Wang
2019-09-18  2:57       ` Tian, Kevin
2019-09-18  2:57       ` Tian, Kevin
2019-09-18  2:57         ` Tian, Kevin
2019-09-18  2:57         ` Tian, Kevin
2019-09-18  6:15         ` Jason Wang
2019-09-18  6:15           ` Jason Wang
2019-09-18  6:15           ` Jason Wang
2019-09-18  6:15         ` Jason Wang
2019-09-17 10:16     ` Jason Wang
2019-09-17 12:42   ` Cornelia Huck
2019-09-17 12:42   ` Cornelia Huck
2019-09-17 12:42     ` Cornelia Huck
2019-09-18  5:54     ` Jason Wang
2019-09-18  5:54       ` Jason Wang
2019-09-18  5:54     ` Jason Wang
2019-09-12 11:46 ` ✗ Fi.CI.CHECKPATCH: warning for Mdev: support mutiple kinds of devices Patchwork
2019-09-12 12:07 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-12 21:12 ` ✓ Fi.CI.IGT: " Patchwork
2019-09-17 17:31 ` [RFC PATCH 0/2] " Alex Williamson
2019-09-17 17:31   ` Alex Williamson
2019-09-18  1:54   ` Tian, Kevin
2019-09-18  2:23     ` Alex Williamson
2019-09-18  1:54   ` Tian, Kevin
2019-09-17 17:31 ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='e53b38be-bc2a-785f-12d2-951805f3395f__37383.7375942216$1568785977$gmane$org@redhat.com' \
    --to=jasowang@redhat.com \
    --cc=airlied@linux.ie \
    --cc=akrowiak@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=farman@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=idos@mellanox.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=oberpar@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=rob.miller@broadcom.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sebott@linux.ibm.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xiao.w.wang@intel.com \
    --cc=zhenyuw@linux.intel.com \
    --cc=zhi.a.wang@intel.com \
    --cc=zhihong.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.