qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/3] Mediated device Core driver


From: Jike Song
Subject: Re: [Qemu-devel] [PATCH 1/3] Mediated device Core driver
Date: Thu, 30 Jun 2016 15:12:48 +0800
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

On 06/29/2016 09:51 PM, Xiao Guangrong wrote:
> On 06/21/2016 12:31 AM, Kirti Wankhede wrote:
>> +    mutex_unlock(&parent_devices.list_lock);
>> +    return parent;
>> +}
>> +
>> +static int mdev_device_create_ops(struct mdev_device *mdev, char 
>> *mdev_params)
>> +{
>> +    struct parent_device *parent = mdev->parent;
>> +    int ret;
>> +
>> +    mutex_lock(&parent->ops_lock);
>> +    if (parent->ops->create) {
>> +            ret = parent->ops->create(mdev->dev.parent, mdev->uuid,
>> +                                    mdev->instance, mdev_params);
> 
> I think it is better if we pass @mdev to this callback, then the parent driver
> can do its specified operations and associate it with the instance,
> e.g, via mdev->private.
> 

Just noticed that mdev->driver_data is missing in v5, I'd like to have it back 
:)

Yes either mdev need to be passed to parent driver (preferred), or 
find_mdev_device to
be exported for parent driver (less preferred, but at least functional).

--
Thanks,
Jike




reply via email to

[Prev in Thread] Current Thread [Next in Thread]