linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] vfio/mdev: Improve vfio/mdev core module
@ 2019-03-22 23:20 Parav Pandit
  2019-03-22 23:20 ` [PATCH 1/8] vfio/mdev: Fix to not do put_device on device_register failure Parav Pandit
                   ` (7 more replies)
  0 siblings, 8 replies; 49+ messages in thread
From: Parav Pandit @ 2019-03-22 23:20 UTC (permalink / raw)
  To: kvm, linux-kernel, kwankhede, alex.williamson; +Cc: parav

As we would like to use mdev subsystem for wider use case as
discussed in [1], [2] apart from an offline discussion.
This use case is also discussed with wider forum in [4] in track
'Lightweight NIC HW functions for container offload use cases'.

This series is prep-work and improves vfio/mdev module in following ways.

Patch-1 and 2 Fixes releasing parent dev reference during error unwinding
of mdev create and mdev parent registration.
Patch-3 Simplifies mdev device for unused kref.
Patch-4 Drops redundant extern prefix of exported symbols.
Patch-5 Returns right error code from vendor driver.
Patch-6 Fixes to use right sysfs remove sequence.
Patch-7 Fixes removing all child devices if one of them fails.
Patch 8 Brings improvements to mdev in following ways.

1. Fix race conditions among mdev parent's create(), remove() and
mdev parent unregistration routines that leads to call traces.

2. Setup vendor mdev device before placing the device on mdev bus.
This ensures that vfio_mdev or any other module that accesses mdev,
is rightly in any of the callbacks of mdev_register_driver().
This follows Linux driver model now.
Similarly follow exact reverse remove sequence, i.e. to take away the
device first from the bus before removing underlying hardware mdev.

This series is tested using
(a) mtty with VM using vfio_mdev driver for positive tests.
(b) mtty with vfio_mdev with error race condition cases of create,
remove and mtty driver.
(c) mlx5 core driver using RFC patches [3] and internal patches.
Internal patches are large and cannot be combined with this
prep-work patches. It will posted once prep-work completes.

[1] https://www.spinics.net/lists/netdev/msg556978.html
[2] https://lkml.org/lkml/2019/3/7/696
[3] https://lkml.org/lkml/2019/3/8/819
[4] https://netdevconf.org/0x13/session.html?workshop-hardware-offload


Parav Pandit (8):
  vfio/mdev: Fix to not do put_device on device_register failure
  vfio/mdev: Avoid release parent reference during error path
  vfio/mdev: Removed unused kref
  vfio/mdev: Drop redundant extern for exported symbols
  vfio/mdev: Avoid masking error code to EBUSY
  vfio/mdev: Follow correct remove sequence
  vfio/mdev: Fix aborting mdev child device removal if one fails
  vfio/mdev: Improve the create/remove sequence

 drivers/vfio/mdev/mdev_core.c    | 164 +++++++++++++++++++--------------------
 drivers/vfio/mdev/mdev_private.h |   8 +-
 drivers/vfio/mdev/mdev_sysfs.c   |   8 +-
 include/linux/mdev.h             |  21 +++--
 4 files changed, 98 insertions(+), 103 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2019-03-29 14:49 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 23:20 [PATCH 0/8] vfio/mdev: Improve vfio/mdev core module Parav Pandit
2019-03-22 23:20 ` [PATCH 1/8] vfio/mdev: Fix to not do put_device on device_register failure Parav Pandit
2019-03-25 11:48   ` Maxim Levitsky
2019-03-25 18:17   ` Kirti Wankhede
2019-03-25 19:21     ` Alex Williamson
2019-03-25 21:11       ` Parav Pandit
2019-03-22 23:20 ` [PATCH 2/8] vfio/mdev: Avoid release parent reference during error path Parav Pandit
2019-03-25 11:49   ` Maxim Levitsky
2019-03-25 18:27   ` Kirti Wankhede
2019-03-22 23:20 ` [PATCH 3/8] vfio/mdev: Removed unused kref Parav Pandit
2019-03-25 11:50   ` Maxim Levitsky
2019-03-25 18:41   ` Kirti Wankhede
2019-03-22 23:20 ` [PATCH 4/8] vfio/mdev: Drop redundant extern for exported symbols Parav Pandit
2019-03-25 11:56   ` Maxim Levitsky
2019-03-25 19:07   ` Kirti Wankhede
2019-03-25 19:49     ` Alex Williamson
2019-03-25 21:27       ` Parav Pandit
2019-03-22 23:20 ` [PATCH 5/8] vfio/mdev: Avoid masking error code to EBUSY Parav Pandit
2019-03-25 11:57   ` Maxim Levitsky
2019-03-25 19:18   ` Kirti Wankhede
2019-03-25 21:29     ` Parav Pandit
2019-03-22 23:20 ` [PATCH 6/8] vfio/mdev: Follow correct remove sequence Parav Pandit
2019-03-25 11:58   ` Maxim Levitsky
2019-03-25 20:20   ` Alex Williamson
2019-03-25 21:31     ` Parav Pandit
2019-03-22 23:20 ` [PATCH 7/8] vfio/mdev: Fix aborting mdev child device removal if one fails Parav Pandit
2019-03-25 11:58   ` Maxim Levitsky
2019-03-25 19:35   ` Kirti Wankhede
2019-03-25 20:49     ` Alex Williamson
2019-03-25 21:36       ` Parav Pandit
2019-03-25 21:52         ` Alex Williamson
2019-03-25 22:07           ` Parav Pandit
2019-03-22 23:20 ` [PATCH 8/8] vfio/mdev: Improve the create/remove sequence Parav Pandit
2019-03-25 13:24   ` Maxim Levitsky
2019-03-25 21:42     ` Parav Pandit
2019-03-25 23:18   ` Alex Williamson
2019-03-25 23:34     ` Parav Pandit
2019-03-26  0:05       ` Alex Williamson
2019-03-26  1:43         ` Parav Pandit
2019-03-26  2:16           ` Alex Williamson
2019-03-26  3:19             ` Parav Pandit
2019-03-26  5:53               ` Parav Pandit
2019-03-26 15:21                 ` Alex Williamson
2019-03-26  7:06   ` Kirti Wankhede
2019-03-26 15:26     ` Alex Williamson
2019-03-27  3:19       ` Parav Pandit
2019-03-26 15:30     ` Parav Pandit
2019-03-28 17:20       ` Kirti Wankhede
2019-03-29 14:49         ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).