[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e53b38be-bc2a-785f-12d2-951805f3395f@redhat.com>
Date: Wed, 18 Sep 2019 13:52:17 +0800
From: Jason Wang <jasowang@...hat.com>
To: Cornelia Huck <cohuck@...hat.com>
Cc: kvm@...r.kernel.org, linux-s390@...r.kernel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org,
intel-gvt-dev@...ts.freedesktop.org, kwankhede@...dia.com,
alex.williamson@...hat.com, mst@...hat.com,
zhenyuw@...ux.intel.com, zhi.a.wang@...el.com,
jani.nikula@...ux.intel.com, joonas.lahtinen@...ux.intel.com,
rodrigo.vivi@...el.com, airlied@...ux.ie, daniel@...ll.ch,
farman@...ux.ibm.com, pasic@...ux.ibm.com, sebott@...ux.ibm.com,
oberpar@...ux.ibm.com, heiko.carstens@...ibm.com,
gor@...ux.ibm.com, borntraeger@...ibm.com, akrowiak@...ux.ibm.com,
pmorel@...ux.ibm.com, freude@...ux.ibm.com, tiwei.bie@...el.com,
virtualization@...ts.linux-foundation.org,
maxime.coquelin@...hat.com, cunming.liang@...el.com,
zhihong.wang@...el.com, rob.miller@...adcom.com, idos@...lanox.com,
xiao.w.wang@...el.com, lingshan.zhu@...el.com
Subject: Re: [RFC PATCH 1/2] mdev: device id support
On 2019/9/17 下午8:07, Cornelia Huck wrote:
> On Thu, 12 Sep 2019 17:40:11 +0800
> Jason Wang <jasowang@...hat.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@...hat.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 */
Powered by blists - more mailing lists