From patchwork Thu Sep 27 11:54:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10617895 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A104614BD for ; Thu, 27 Sep 2018 11:55:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91FB72785D for ; Thu, 27 Sep 2018 11:55:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 866082B1D5; Thu, 27 Sep 2018 11:55:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15AE42785D for ; Thu, 27 Sep 2018 11:55:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727118AbeI0SM6 (ORCPT ); Thu, 27 Sep 2018 14:12:58 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:56624 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727187AbeI0SM5 (ORCPT ); Thu, 27 Sep 2018 14:12:57 -0400 Received: from ramsan.of.borg ([84.194.111.163]) by andre.telenet-ops.be with bizsmtp id gbux1y00A3XaVaC01bux0o; Thu, 27 Sep 2018 13:54:58 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1g5Usj-0001cj-5P; Thu, 27 Sep 2018 13:54:57 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1g5Usj-0008CO-3N; Thu, 27 Sep 2018 13:54:57 +0200 From: Geert Uytterhoeven To: Peter Maydell , Alex Williamson Cc: Eric Auger , Magnus Damm , Laurent Pinchart , Wolfram Sang , Kieran Bingham , qemu-arm@nongnu.org, qemu-devel@nongnu.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH qemu v5 0/3] vfio/sysbus-fdt: Prepare for Generic DT Pass-Through Date: Thu, 27 Sep 2018 13:54:51 +0200 Message-Id: <20180927115454.31471-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 ("vfio/sysbus-fdt: Prepare for Generic DT Pass-Through", http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg01672.html): - Add Reviewed-by, Tested-by, - Fix path leak on error, - s/instantiatable/instantiable/, - Drop reference to commit 6f2062b9758ebc64 ("hw/arm/virt: Allow only supported dynamic sysbus devices"). Changes compared to v3 ("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. This (plus the postponed "hw/arm/sysbus-fdt: Add support for instantiating generic devices") 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 | 25 +++++++++++++- include/hw/vfio/vfio-platform.h | 3 +- 6 files changed, 76 insertions(+), 16 deletions(-)