Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2550000pxj; Mon, 14 Jun 2021 01:07:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNBfJ3qFqugN4qFJnvKPgKrxOb1Zfxa50xIcKbrdON4E/f6v26bVyGP8VvAF/CE3oRmT3R X-Received: by 2002:a05:6402:1c83:: with SMTP id cy3mr15227600edb.108.1623658043269; Mon, 14 Jun 2021 01:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623658043; cv=none; d=google.com; s=arc-20160816; b=V0/C0qkcdg9nA57P6vRR5J/xuuQdAg+0BCNUHH+U+UxC37B+Opbre8ctLA8v88RDRP WVdH4O8Owc7BlTDRXy25sr7qPckku7tKfAN54lrdIXS99n/72CPLovhHUrhoz5Iicfgv G/JgV6QAicfjepwatEj096g+m8hT4giZ5xhNTaQERPlpZ2Rd97UOX1byso8RIu8heSzD VORM9r41wf50msEGa/4ZXtnX3D35wZ4EOJCf4teVn4BSUtgjFOsPo98HddBwI//jRbQv c+uXPNh856BOWSIfCvxNl214+Cpi8Ghf5FofciAvrVsHP4nEoPCEmreveIH8F1bPUnJR 5khg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=yiM98CvagxGiM1mbAmWyWXzrDHp4G/IsrP/Q+yAcbkI=; b=Nsz/qUTjtXpkninVNKr+CDHSCcfN/vUf+Di4xnJaCz/5N4wh0kuk2BroANd6zXoZn4 r2NngfP9iFd2BIdMyVC20zfySGVCHFDqYTjK1+G+mGjqhnzGX67tCgkbuDp4WZeHFa+W dPMlmBl2kR06aRAQ7GASm6CT2gqnniMb8BHNzbTobZLmHf8zZohJj3yLHeU6O02sj7Ih otdnz2t1+clQ5wBj2CkMR3wEARIezfa4nQrZhyK1XpGd/TFf4BHcBR/0UduZBHianCiu PiCaBGAWy659WA9Hpt2isdgyiqFIP5Y7v/pzYGeYIwsE+mv9vT86ai+cW6dWVrD4VfRU PV0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce5si9845378ejc.305.2021.06.14.01.06.59; Mon, 14 Jun 2021 01:07:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232608AbhFNIGA (ORCPT + 99 others); Mon, 14 Jun 2021 04:06:00 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:60919 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232579AbhFNIF6 (ORCPT ); Mon, 14 Jun 2021 04:05:58 -0400 Received: from [192.168.1.155] ([95.115.71.85]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N2m3G-1lC24S3Wxw-0139xw; Mon, 14 Jun 2021 10:03:45 +0200 Subject: Re: [PATCH V3 1/3] gpio: Add virtio-gpio driver To: Geert Uytterhoeven , Viresh Kumar , Linus Walleij Cc: Bjorn Andersson , Bartosz Golaszewski , "Enrico Weigelt, metux IT consult" , Viresh Kumar , "Michael S. Tsirkin" , Jason Wang , Vincent Guittot , Bill Mills , =?UTF-8?Q?Alex_Benn=c3=a9e?= , stratos-dev@op-lists.linaro.org, "open list:GPIO SUBSYSTEM" , linux-kernel , Stefan Hajnoczi , "Stefano Garzarella --cc virtualization @ lists . linux-foundation . org" , virtualization@lists.linux-foundation.org, Alistair Strachan References: <10442926ae8a65f716bfc23f32339a6b35e51d5a.1623326176.git.viresh.kumar@linaro.org> <20210611035623.z4f2ynumzozigqnv@vireshk-i7> From: "Enrico Weigelt, metux IT consult" Message-ID: Date: Mon, 14 Jun 2021 10:03:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: tl Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:a1TH943iNPJU0DBABn30QUTNQbG26NROFfuw6N6R2mBvsA7XAR7 kEPNOQsE8fSppcP5+xrqfNJzCGc6Kynnici5xXsA+KwIE/NskgFY5mkYbhr9If3dJ5ykPnI GP38GA986wJFdpb2caTCrzIVJ5PrbJYo89RNV/6ygVxomnc5Qu8a9uMN1ipZV99tUeN3ofN wk3OMkryakXWptJFeYBUQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:o8I6iU3YHHE=:hSoiMl1lG1SgsJU1sHl3Oa uT9NCeDq4+mii9kzBqGQlgQ78I+ESdtk1gaIi5ZkErFWrC1uLaJPwkZfZ3GSezu1imPOKk4Z7 cu0EDqa4IzbTeKcrGdk4uEVZpUbhZBR/EclOT43Yd9TApqJA+PrynMXuIo1Wlv7YU1GPurHGZ ZXOOoZYIkqGL+AnhX+x8VxNt1EeVHSWPVIo/Vdc0ZVCv+Dmt1hhsm9O06IKYWGaOl+Rd8GxSS AMTQfYYa8KSRgkVC0AYASrZArSgzDHuORyBIAUSOop081mFfZQ1G6RRNAK+ToCxc/Ldtn8wiS JppP8/L3FjslZXTW2+e+O/xWAHYgJS9Xj3Lzo4qxFa60AB6lxSZVINglqaFGgc3asHw2g/OJl 49CqPgc3Rcc1Tp/78nBrlQXmhGbYlDhrefk4x/M4wa5QVn4I7hCSLUQHH6TYJWIIU3/OCYdW5 F+i6ecjCaXnlY1KKN6MsjTDz9b5fdSpWtujdca7fq9aMX2qAQGLW28dbRniC08OLcGiCV3omv Kk4/tFWUcXadITfKxhQDZI= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.06.21 09:42, Geert Uytterhoeven wrote: hi, > I my PoC "[PATCH QEMU v2 0/5] Add a GPIO backend"[1], I didn't have > a virtio transport, but just hooked into the PL061 GPIO emulation > in QEMU. The PL061 QEMU driver talked to the GPIO backend, which > talked to /dev/gpiochipN on the host. for qemu side you might be interested in my patch queue from last year (including the virtio-gpio implementation) - it also introduces an gpio backend subsys that allows attaching simulation gpio's to various backends. so far just implemented a dummy backend (that can be manipulated by qemu console) and using it just in the virtio-gpio device emulation. https://github.com/oss-qm/qemu/tree/wip/gpio-v2 > So QEMU has to translate the virtio-gpio communication to e.g. > /dev/gpiochipN on the host (or a different backend on non-Linux or > bare-metal HV). For qemu case, yes, depending on your actual configuration. You can attach the virtual device to any gpio backend you like (once it's actually implemented). Yet only implemented the dummy, which doesn't speak to a real hosts gpio, but can be used simulations like HIL. --mtx -- --- Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren GPG/PGP-Schlüssel zu. --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287