Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966968AbcLVUV5 (ORCPT ); Thu, 22 Dec 2016 15:21:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48058 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756897AbcLVUVx (ORCPT ); Thu, 22 Dec 2016 15:21:53 -0500 Subject: [PATCH v2 0/4] vfio-mdev: Fix remove race, clean namespace and better define ABI From: Alex Williamson To: alex.williamson@redhat.com Cc: jike.song@intel.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kwankhede@nvidia.com Date: Thu, 22 Dec 2016 13:21:51 -0700 Message-ID: <20161222201809.15541.22506.stgit@gimli.home> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 22 Dec 2016 20:21:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1369 Lines: 31 Cleanup the namespace a bit by prefixing structures with mdev_ and also more concretely define the mdev interface. Structs with comments defining which fields are private vs public tempts poor behavior, especially for an interface where we expect out of tree vendor drivers. Additionally in v2, the patch removing the next field from mdev_device is dropped, instead using it to fix a remove race, my From address is fixed, and Documentation is updated. Jike, I left your R-b on the patches that didn't change only. If I've missed any relevant doc updates, please let me know. Thanks, Alex --- Alex Williamson (4): vfio-mdev: Fix remove race vfio-mdev: de-polute the namespace, rename parent_device & parent_ops vfio-mdev: Make mdev_parent private vfio-mdev: Make mdev_device private and abstract interfaces Documentation/vfio-mediated-device.txt | 27 +++++---- drivers/gpu/drm/i915/gvt/kvmgt.c | 22 ++++--- drivers/vfio/mdev/mdev_core.c | 100 +++++++++++++++++++++++++++----- drivers/vfio/mdev/mdev_private.h | 29 ++++++++- drivers/vfio/mdev/mdev_sysfs.c | 8 +-- drivers/vfio/mdev/vfio_mdev.c | 12 ++-- include/linux/mdev.h | 54 ++++------------- samples/vfio-mdev/mtty.c | 28 +++++---- 8 files changed, 173 insertions(+), 107 deletions(-)