Received: by 10.192.165.156 with SMTP id m28csp480462imm; Wed, 11 Apr 2018 02:19:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/c3HOy9QoZR3i+etpdjsMIAAt4QCMu723dAza64ggMJywzhbT81VT7elhbU/96ekXghsn2 X-Received: by 2002:a17:902:8342:: with SMTP id z2-v6mr524350pln.311.1523438369991; Wed, 11 Apr 2018 02:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523438369; cv=none; d=google.com; s=arc-20160816; b=yybp/d/UAZH5eq0yLPLFm31pjbihEcl5wxToqFfEOI0qlUm3Iw3nrNPsbyTSE9IuG/ LvW8tViqV6RJN4SdmBueCO58XNsdV8mug+MjGavVw548Tsaoe8jL71qhFCtBs3B/n9lM 9ZsUeHpQOykVxSKQzqQTDg7gDMOTLikNlDdpiXU7kemBkvC6C5qbqHcON/Wv1KM0CECG WSfBtDqfi6pIBla5w/7v755BVHpg5XY90eiaYdMuuFwwqdi9tt41N7aPr4vvErQdwn96 nD9Cbcpac7ID5Blwa0mcbQrOYxwyX0bnPEG0OXKI6Bp8Ru2OPl+Bmffy1u2lTMAy8p1x DkPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=uaSWDskzMdNzRBaCpvNb1hd9vT8TzFGGGUEsXZYqEqY=; b=J3YYPaU+DkleGGYZOtgvoeqShN+ta7N2fHplj+aCQb6ehoTkFxgg8mSdGRE4jLFTj3 /5SVaNz/x2uvXTM0Gehs9tPqQUsVxmknJwXYQSFHgixvcYlqC0IJW2aayMwd5ZERh0t7 mh3aQLbS72fPAESlcdft/cQrXsPslAPLTpas+y5DN5BEVPpWkLG/2R7pAN9yU5z7fDQH c6+FE4ZPV2pDGMQxkdFP7tZhIch35OX21Zanh7TGvB6aNPKQyL9BK9Gfa1Q5pzIqv9AD 91QUIXqoAwKv0mI33ZsCCYbEKMRY/qiCDXWknragGtz7pBMevaj2875cuQuqgEa6GLHI 5aqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si555616pff.205.2018.04.11.02.18.53; Wed, 11 Apr 2018 02:19:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbeDKJP6 (ORCPT + 99 others); Wed, 11 Apr 2018 05:15:58 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:39588 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752181AbeDKJPy (ORCPT ); Wed, 11 Apr 2018 05:15:54 -0400 Received: from ayla.of.borg ([84.194.111.163]) by baptiste.telenet-ops.be with bizsmtp id YxFs1x00R3XaVaC01xFsfy; Wed, 11 Apr 2018 11:15:52 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1f6Br6-0002Cr-89; Wed, 11 Apr 2018 11:15:52 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1f6Br6-0004I8-6s; Wed, 11 Apr 2018 11:15:52 +0200 From: Geert Uytterhoeven To: Baptiste Reynal , Alex Williamson Cc: Philipp Zabel , Rob Herring , Mark Rutland , kvm@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v3 0/2] vfio: platform: Improve reset support Date: Wed, 11 Apr 2018 11:15:47 +0200 Message-Id: <1523438149-16433-2-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523438149-16433-1-git-send-email-geert+renesas@glider.be> References: <1523438149-16433-1-git-send-email-geert+renesas@glider.be> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This patch series improves reset support for vfio-platform: - The first patch fixes a bug I ran into while working on this. - The second patch implements generic DT reset controller support, for devices that are connected to an SoC-internal reset controller and can be reset in a generic way. This avoids having to write/change a vfio-specific reset driver for each and every device to be passed-through to a guest. Changes compared to v2: - Add Reviewed-by, - Merge similar checks in vfio_platform_has_reset(). Changes compared to v1: - Add Reviewed-by, - Don't store error values in vdev->reset_control, - Use of_reset_control_get_exclusive() instead of __of_reset_control_get(), - Improve description. This has been tested on R-Car H3/Salvator-XS by exporting a GPIO module to a QEMU+KWM guest: the GPIO module is reset before QEMU opens the vfio device, and reset again after QEMU has released it, as can be witnessed by the LEDs connected to the GPIOs. Thanks! Geert Uytterhoeven (2): vfio: platform: Fix reset module leak in error path vfio: platform: Add generic DT reset support drivers/vfio/platform/vfio_platform_common.c | 35 +++++++++++++++++++++------ drivers/vfio/platform/vfio_platform_private.h | 1 + 2 files changed, 29 insertions(+), 7 deletions(-) -- 2.7.4 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds