From patchwork Fri Mar 11 16:00:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 8567111 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 18C36C0553 for ; Fri, 11 Mar 2016 16:00:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E5662026F for ; Fri, 11 Mar 2016 16:00:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42357201F4 for ; Fri, 11 Mar 2016 16:00:52 +0000 (UTC) Received: from localhost ([::1]:56091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aePUh-0002CL-8r for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Mar 2016 11:00:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aePUW-0002CB-J4 for qemu-devel@nongnu.org; Fri, 11 Mar 2016 11:00:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aePUQ-0001GB-Nj for qemu-devel@nongnu.org; Fri, 11 Mar 2016 11:00:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aePUQ-0001Er-9z for qemu-devel@nongnu.org; Fri, 11 Mar 2016 11:00:34 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 11CC164D33 for ; Fri, 11 Mar 2016 16:00:33 +0000 (UTC) Received: from gimli.home (ovpn-113-206.phx2.redhat.com [10.3.113.206]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2BG0WnG030052; Fri, 11 Mar 2016 11:00:32 -0500 From: Alex Williamson To: qemu-devel@nongnu.org Date: Fri, 11 Mar 2016 09:00:32 -0700 Message-ID: <20160311155841.30825.6907.stgit@gimli.home> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 11 Mar 2016 16:00:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL v3 0/8] VFIO updates 2016-03-11 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The following changes since commit a648c137383d84bc4f95696e5293978d9541a26e: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160309-1' into staging (2016-03-10 02:51:14 +0000) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-update-20160311.0 for you to fetch changes up to 99b88c6d1fc81c9757bb6e116e0adf20b2906629: MAINTAINERS: Add entry for the include/hw/vfio/ folder (2016-03-10 20:50:44 -0700) ---------------------------------------------------------------- VFIO updates 2016-03-11 - Allow devices to be specified via sysfs path (Alex Williamson) - vfio region helpers and generalization for future device specific regions (Alex Williamson) - Automatic ROM device ID and checksum fixup (Alex Williamson) - Split VGA setup to allow enabling VGA from quirks (Alex Williamson) - Remove fixed string limit for ROM MemoryRegion name (Neo Jia) - MAINTAINERS update (Thomas Huth) ---------------------------------------------------------------- Alex Williamson (6): 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 vfio/pci: Fixup PCI option ROMs vfio/pci: Split out VGA setup Neo Jia (1): vfio/pci: replace fixed string limit by g_strdup_printf Thomas Huth (1): MAINTAINERS: Add entry for the include/hw/vfio/ folder MAINTAINERS | 1 + hw/arm/sysbus-fdt.c | 4 +- hw/vfio/common.c | 190 ++++++++++++--- hw/vfio/pci-quirks.c | 62 ++--- hw/vfio/pci.c | 528 +++++++++++++++++++++--------------------- hw/vfio/pci.h | 12 +- hw/vfio/platform.c | 126 ++++------ include/hw/vfio/vfio-common.h | 31 ++- trace-events | 10 +- 9 files changed, 549 insertions(+), 415 deletions(-) Diff from previous pull request: diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 594905a..eb0e1b0 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -25,7 +25,9 @@ #include "exec/memory.h" #include "qemu/queue.h" #include "qemu/notify.h" +#ifdef CONFIG_LINUX #include +#endif /*#define DEBUG_VFIO*/ #ifdef DEBUG_VFIO @@ -144,11 +146,13 @@ VFIOGroup *vfio_get_group(int groupid, AddressSpace *as); void vfio_put_group(VFIOGroup *group); int vfio_get_device(VFIOGroup *group, const char *name, VFIODevice *vbasedev); -int vfio_get_region_info(VFIODevice *vbasedev, int index, - struct vfio_region_info **info); extern const MemoryRegionOps vfio_region_ops; extern QLIST_HEAD(vfio_group_head, VFIOGroup) vfio_group_list; extern QLIST_HEAD(vfio_as_head, VFIOAddressSpace) vfio_address_spaces; +#ifdef CONFIG_LINUX +int vfio_get_region_info(VFIODevice *vbasedev, int index, + struct vfio_region_info **info); +#endif #endif /* !HW_VFIO_VFIO_COMMON_H */ diff --git a/trace-events b/trace-events index c285a6f..bf07a8f 100644 --- a/trace-events +++ b/trace-events @@ -1652,7 +1652,7 @@ vfio_msix_enable(const char *name) " (%s)" vfio_msix_pba_disable(const char *name) " (%s)" vfio_msix_pba_enable(const char *name) " (%s)" vfio_msix_disable(const char *name) " (%s)" -vfio_msix_fixup(const char *name, int bar, off_t start, off_t end) " (%s) MSI-X region %d mmap fixup [0x%"PRIx64" - 0x%"PRIx64"]" +vfio_msix_fixup(const char *name, int bar, uint64_t start, uint64_t end) " (%s) MSI-X region %d mmap fixup [0x%"PRIx64" - 0x%"PRIx64"]" vfio_msi_enable(const char *name, int nr_vectors) " (%s) Enabled %d MSI vectors" vfio_msi_disable(const char *name) " (%s)" vfio_pci_load_rom(const char *name, unsigned long size, unsigned long offset, unsigned long flags) "Device %s ROM:\n size: 0x%lx, offset: 0x%lx, flags: 0x%lx"