From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0yQn-0004ce-Su for qemu-devel@nongnu.org; Mon, 23 Nov 2015 16:13:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0yQj-0005ao-Rm for qemu-devel@nongnu.org; Mon, 23 Nov 2015 16:13:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0yQj-0005aU-Ll for qemu-devel@nongnu.org; Mon, 23 Nov 2015 16:13:45 -0500 From: Alex Williamson Date: Mon, 23 Nov 2015 14:13:43 -0700 Message-ID: <20151123210409.20561.3619.stgit@gimli.home> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC post-2.5 PATCH 0/5] VFIO: capability chains List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: alex.williamson@redhat.com Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org This is the matching QEMU changes for the proposed kernel-side capability chains. Unfortunately there's also a lot of churn to get to consistent interfaces involved in this series, which allow us to generically handle multiple mmaps overlapping a region and making the actual step of consuming the new kernel data trivial. The last patch shows the proof of concept for reallocating the info buffer when necessary and finding and using capability data. Apologies for the patches being a little rough, but I hope the concept shows through. As noted above, this is of course post-2.5 material and of course kernel header updates would only be included when accepted upstream. Thanks, Alex --- Alex Williamson (5): vfio: Wrap VFIO_DEVICE_GET_REGION_INFO vfio: Generalize region support vfio/pci: Convert all MemoryRegion to dynamic alloc and consistent functions linux-headers/vfio: Update for proposed capabilities list vfio: Enable sparse mmap capability hw/vfio/common.c | 245 +++++++++++++++++++++++++++---- hw/vfio/pci-quirks.c | 62 ++++---- hw/vfio/pci.c | 329 +++++++++++++++++++---------------------- hw/vfio/pci.h | 10 + hw/vfio/platform.c | 71 ++------- include/hw/vfio/vfio-common.h | 26 ++- linux-headers/linux/vfio.h | 53 ++++++- trace-events | 12 + 8 files changed, 502 insertions(+), 306 deletions(-)