From: Alex Williamson Subject: [RFC post-2.5 PATCH 0/5] VFIO: capability chains 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 Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: alex.williamson@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46925 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754717AbbKWVNo (ORCPT ); Mon, 23 Nov 2015 16:13:44 -0500 Sender: kvm-owner@vger.kernel.org List-ID: 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(-)