From patchwork Thu Sep 13 15:44:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 969447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42B30j5BGYz9s3x for ; Fri, 14 Sep 2018 01:46:29 +1000 (AEST) Received: from localhost ([::1]:43148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Tp5-0007Lg-Ca for incoming@patchwork.ozlabs.org; Thu, 13 Sep 2018 11:46:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0To3-00079I-90 for qemu-devel@nongnu.org; Thu, 13 Sep 2018 11:45:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0To2-0002w4-3a for qemu-devel@nongnu.org; Thu, 13 Sep 2018 11:45:23 -0400 Received: from laurent.telenet-ops.be ([2a02:1800:110:4::f00:19]:41002) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0To1-0002ji-Au for qemu-devel@nongnu.org; Thu, 13 Sep 2018 11:45:21 -0400 Received: from ramsan.of.borg ([84.194.111.163]) by laurent.telenet-ops.be with bizsmtp id b3l51y00N3XaVaC013l50M; Thu, 13 Sep 2018 17:45:07 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1g0Tnl-00018K-7h; Thu, 13 Sep 2018 17:45:05 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1g0Tnl-0006Et-5P; Thu, 13 Sep 2018 17:45:05 +0200 From: Geert Uytterhoeven To: Peter Maydell , Alex Williamson Date: Thu, 13 Sep 2018 17:44:55 +0200 Message-Id: <20180913154458.23939-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2a02:1800:110:4::f00:19 Subject: [Qemu-devel] [PATCH v4 0/3] vfio/sysbus-fdt: Prepare for Generic DT Pass-Through X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Pinchart , Geert Uytterhoeven , Wolfram Sang , Kieran Bingham , Magnus Damm , qemu-devel@nongnu.org, linux-renesas-soc@vger.kernel.org, Auger Eric , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Hi all, This patch series prepares for exporting generic devices in DT using vfio-platform, providing direct access from a QEMU+KVM guest to the exported devices. - Patches 1-2 (submitted before by Eric Auger) make the vfio-platform device non-abstract, incl. matching using a compatible string. - Patch 3 allows dynamic vfio-platform devices again, without needing to create device-specific vfio types for each and every new device. This will avoid having to write device-specific instantation methods for each and every "simple" device using only a set of generic properties. Devices that need more specialized handling will still be able provide their own instantation methods. Note that this series no longer contains "[PATCH 4/4] hw/arm/sysbus-fdt: Add support for instantiating generic devices", following advice from Eric Auger, as that patch needs more safeguards. Hence this series now contains only preparative work. Changes compared to v4 ("hw/arm/sysbus-fdt: Generic DT Pass-Through"), http://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg05006.html): - Propagate g_file_get_contents() errors through errp, - Add Tested-by (with amd-xgbe), - s/From now on/Soon/ in patch description, - s/sysbus/vfio-platform/ in patch description, - Postpone "[PATCH 4/4] hw/arm/sysbus-fdt: Add support for instantiating generic devices". Changes compared to v2 (not submitted to the mailing list): - Use the compatible values from sysfs instead of user-supplied manufacturer and model options, - Replace "hw/arm/sysbus-fdt: Enable rcar-gen3-gpio dynamic instatiation" by generic "hw/arm/sysbus-fdt: Add support for instantiating generic devices", - Reword patch descriptions, - Drop RFC state, - Drop "vfio: No-IOMMU mode support". Changes compared to v1 ("R-Car Gen3 GPIO Pass-Through Prototype (QEMU)", https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02716.html): - Restrict dynamic sysbus devices to TYPE_VFIO_PLATFORM, as suggested by Eric Auger. Thanks! For testing, this patch series, and the postponed "hw/arm/sysbus-fdt: Add support for instantiating generic devices" are available in the topic/rcar3-virt-gpio-passthrough-v4 branch of my git repository at https://github.com/geertu/qemu.git. This has been tested on a Renesas Salvator-XS board with R-Car H3 ES2.0 with SATA: -device vfio-platform,host=ee300000.sata and GPIO (needs VFIO No-IOMMU support): -device vfio-platform,host=e6055400.gpio Thanks for applying! Auger Eric (2): vfio/platform: Make the vfio-platform device non-abstract hw/arm/sysbus-fdt: Allow device matching with DT compatible value Geert Uytterhoeven (1): hw/arm/virt: Allow dynamic vfio-platform devices again hw/arm/sysbus-fdt.c | 61 +++++++++++++++++++++++++-------- hw/arm/virt.c | 1 + hw/vfio/amd-xgbe.c | 1 + hw/vfio/calxeda-xgmac.c | 1 + hw/vfio/platform.c | 24 ++++++++++++- include/hw/vfio/vfio-platform.h | 3 +- 6 files changed, 75 insertions(+), 16 deletions(-)