From patchwork Fri Feb 9 15:17:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 871509 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=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zdN1l4qdZz9s7M for ; Sat, 10 Feb 2018 04:52:27 +1100 (AEDT) Received: from localhost ([::1]:49879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekCqX-0004jv-Ju for incoming@patchwork.ozlabs.org; Fri, 09 Feb 2018 12:52:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekBDa-0007M6-7X for qemu-devel@nongnu.org; Fri, 09 Feb 2018 11:08:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekBDW-0001EO-RD for qemu-devel@nongnu.org; Fri, 09 Feb 2018 11:08:06 -0500 Received: from leibniz.telenet-ops.be ([2a02:1800:110:4::f00:d]:33978) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ekBDW-0001DG-JW for qemu-devel@nongnu.org; Fri, 09 Feb 2018 11:08:02 -0500 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 3zdJwj240GzMqftG for ; Fri, 9 Feb 2018 16:32:53 +0100 (CET) Received: from ayla.of.borg ([84.194.111.163]) by xavier.telenet-ops.be with bizsmtp id 8fHm1x02u3XaVaC01fHmhG; Fri, 09 Feb 2018 16:17:50 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1ekAQs-0003Rs-M9; Fri, 09 Feb 2018 16:17:46 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1ekAQs-0000lB-LL; Fri, 09 Feb 2018 16:17:46 +0100 From: Geert Uytterhoeven To: Peter Maydell , Alex Williamson Date: Fri, 9 Feb 2018 16:17:31 +0100 Message-Id: <1518189456-2873-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a02:1800:110:4::f00:d X-Mailman-Approved-At: Fri, 09 Feb 2018 12:38:16 -0500 Subject: [Qemu-devel] [PATCH/RFC 0/5] R-Car Gen3 GPIO Pass-Through Prototype (QEMU) 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: Geert Uytterhoeven , Arnd Bergmann , Wolfram Sang , Magnus Damm , Alexander Graf , qemu-devel@nongnu.org, linux-renesas-soc@vger.kernel.org, Auger Eric , qemu-arm@nongnu.org, Laurent Pinchart , Xiao Feng Ren Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Hi all, This RFC patch series is the QEMU side of a GPIO Pass-Through prototype for Renesas R-Car platforms using vfio-platform. Together with its counterpart for Linux, it provides direct access from a QEMU+KVM guest to a GPIO controller in an R-Car Gen3 SoC. This allows the guest to control the LEDs on a Renesas Salvator-X(S) board. This patch series is not meant to be upstreamed as-is. Indeed, for various reasons (e.g. security, as the different GPIOs on the same GPIO controller may control different parts of the system) access to GPIOs is better not implemented using Device Pass-Through, but by paravirtualization. Yet, this is still a simple and valuable proof-of-concept, which can serve as a basis for the future development of Pass-Through support for more complex platform devices on R-Car Gen3 SoCs. - 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 sysbus devices again, without needing to create device-specific vfio types for each and every new device. - Patch 4 (submitted before by Xiao Feng Ren) adds support for the VFIO No-IOMMU mode, which was added to Linux two years ago (in v4.4). - Patch 5 adds code to instantiate device nodes for Renesas R-Car Gen3 GPIO controllers. Several questions and TODOs are appended to the individual patches. Please see https://elinux.org/R-Car/Virtualization/VFIO for full usage instructions of this prototype. Thanks for your comments! Auger Eric (2): vfio/platform: make the vfio-platform device non abstract hw/arm/sysbus-fdt: Allow device matching with compat string Geert Uytterhoeven (2): hw/arm/virt: Allow dynamic sysbus devices again hw/arm/sysbus-fdt: Enable rcar-gen3-gpio dynamic instatiation Xiao Feng Ren (1): vfio: No-IOMMU mode support hw/arm/sysbus-fdt.c | 108 +++++++++++++++++++++++++++++++++++----- hw/arm/virt.c | 1 + hw/vfio/common.c | 61 ++++++++++++++++++----- hw/vfio/platform.c | 20 +++++++- include/hw/vfio/vfio-common.h | 2 + include/hw/vfio/vfio-platform.h | 2 + 6 files changed, 166 insertions(+), 28 deletions(-)