From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQRm0-0004YC-3a for qemu-devel@nongnu.org; Mon, 01 Feb 2016 22:37:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQRlw-0002tw-U8 for qemu-devel@nongnu.org; Mon, 01 Feb 2016 22:37:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQRlw-0002ts-OS for qemu-devel@nongnu.org; Mon, 01 Feb 2016 22:36:56 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 901738535A for ; Tue, 2 Feb 2016 03:36:55 +0000 (UTC) From: Alex Williamson Date: Mon, 01 Feb 2016 20:36:54 -0700 Message-ID: <20160202032145.29810.7483.stgit@gimli.home> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC PATCH 0/7] vfio: capability chains, sparse mmap, device specific regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: alex.williamson@redhat.com Cc: qemu-devel@nongnu.org, kraxel@redhat.com This is the QEMU compliment to the vfio kernel capability chain series. This is RFC since it depends on those non-upstream kernel changes. Patch 1/ will be posted separately, it's somewhat unrelated, but is in my build tree so I include it here for anyone that wants to build this series. This series includes sparse mmap support for avoiding mmaps over the MSI-X vector table and device specific memory regions for IGD OpRegion support. MemoryRegions are significantly generalize for the former, to make it really easy for each vfio region to be backed by none or more mmap MemoryRegion. The MSI-X vector table then either adds an mmap region, or not via a legacy quirk or explicit sparse mmap support. IGD OpRegions are exposed as new device specific region, which simply entails searching regions past those known for matching type and sub-type regions that we know how to handle. Writes to the OpRegion register (ASL storage) pop the host OpRegion into VM system memory. This isn't exactly like how real hardware works, but it makes for a convenient implementation. Alternatively we could pass the entire OpRegion table via fw_cfg, but this makes write through to the host impossible (if that's even useful). This is certainly something that I'm looking for comments about in this series. Thanks, Alex --- Alex Williamson (7): vfio: Add sysfsdev property for pci & platform 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 vfio/pci: Find and expose Intel IGD OpRegion hw/arm/sysbus-fdt.c | 2 hw/vfio/common.c | 249 +++++++++++++++++-- hw/vfio/pci-quirks.c | 62 ++--- hw/vfio/pci.c | 535 ++++++++++++++++++++++------------------- hw/vfio/pci.h | 11 - hw/vfio/platform.c | 126 +++------- include/hw/vfio/vfio-common.h | 29 ++ linux-headers/linux/vfio.h | 98 +++++++- trace-events | 12 + 9 files changed, 719 insertions(+), 405 deletions(-)