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

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

 



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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux