Re: [PATCH 7/9] nvme/core: add mdev interfaces

2019-03-20 Thread Maxim Levitsky
On Wed, 2019-03-20 at 11:46 +, Stefan Hajnoczi wrote: > On Tue, Mar 19, 2019 at 04:41:14PM +0200, Maxim Levitsky wrote: > > +int nvme_core_register_mdev_driver(struct nvme_mdev_driver *driver_ops) > > +{ > > + struct nvme_ctrl *ctrl; > > + > > + if (mdev_driver_interface) > > +

Re: [PATCH 7/9] nvme/core: add mdev interfaces

2019-03-20 Thread Stefan Hajnoczi
On Tue, Mar 19, 2019 at 04:41:14PM +0200, Maxim Levitsky wrote: > +int nvme_core_register_mdev_driver(struct nvme_mdev_driver *driver_ops) > +{ > + struct nvme_ctrl *ctrl; > + > + if (mdev_driver_interface) > + return -EEXIST; > + > + mdev_driver_interface = driver_ops;

[PATCH 7/9] nvme/core: add mdev interfaces

2019-03-19 Thread Maxim Levitsky
This adds infrastructure for a nvme-mdev to attach to the core driver, to be able to know which nvme controllers are present and which namespaces they have. It also adds an interface to nvme device drivers which expose the its queues in a controlled manner to the nvme mdev core driver. A driver