Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp370536pxj; Thu, 17 Jun 2021 04:49:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEMdur2SCpiYrVLcgPA0GHSIol03kJZfyCm42Uni+qqNZF28gK9i24AOGRFT34J8KBHIfU X-Received: by 2002:a02:a30d:: with SMTP id q13mr4194415jai.101.1623930577032; Thu, 17 Jun 2021 04:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623930577; cv=none; d=google.com; s=arc-20160816; b=aI8aLYW2re9ZM96DQcJ+/x9D+CtTvTbFdwlz3lgG1+hm9fhDBl9Naj3+RsucRvYAcA jnZ5vIJQ3EKFt2goCGImTKyZbkSgEbUa0De2XH0Z/SwLB7l2/PD18Z+xOx9QIREtM5BN MsT0oTt8MRYWeVPwofIDXOAD0vSvnOVLgiwiuQEXTRbcPuJju11e7RbjOBwQMWAOyusk Qp5UFF7EfTFEJbgB2ejvQAvRzpKk5dlgyd37exarbPt15ARGKUbVKZK34lCLewKxmtgt BTkF1pURRYIjXbbvohZsGS2l4Sbsfre16zClB6d7JUA5HvBk6YEZNTJnaiLUAMrUXboW P1Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=QasMKCIaT47MEF+OQcq8zCDU70HNznQ46OZY6zak3V8=; b=g1TdHK7HywqN5UaXWV+6Cy/FamNRBryeiULGi7kWFH+EoVuSW8grjL2Idzjq6hJi3K h0eBkUvhW/530DWogiPOnG6c+tK6FrDQ15zzd6DMXiDJVPbb+Nkmu6WtkrbC57FIjiO0 M0+WPnLuKtuD6+N6+H9/aPiZJYLUffhW/v7aV68GmEKMJTjGMnZFJ5N/O9uI5AiMZbRe 4ZFfeYit5xGCMC7E/yPzKpFSTjMDnHFsli6rs4x7urQTXf002Abx2iQ8qabDrP/5PFlq HVsb5sRSVZ1rCgaoKlBJqVFT7PBSBSxFx681zq9VEyywGNTLTceOh4mxZ9NOIQ+bMtMH GwiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YjZuzJ+N; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q4si5789003jas.57.2021.06.17.04.49.24; Thu, 17 Jun 2021 04:49:37 -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; dkim=pass header.i=@linaro.org header.s=google header.b=YjZuzJ+N; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232350AbhFQLuB (ORCPT + 99 others); Thu, 17 Jun 2021 07:50:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230269AbhFQLuB (ORCPT ); Thu, 17 Jun 2021 07:50:01 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37451C061574 for ; Thu, 17 Jun 2021 04:47:53 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id c15so2707420pls.13 for ; Thu, 17 Jun 2021 04:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QasMKCIaT47MEF+OQcq8zCDU70HNznQ46OZY6zak3V8=; b=YjZuzJ+NWs/14eFKW5mhz42xgNpTsEoV8oZ4cGMsIt9+TzUz1kdmMAfO7xXHgkQq0g Ia52JM8iI2whXeKXN/2K6F02pd30D8emps0Jz+/nxWU8zMyroF/HKtyZs5qCYlzNmEFJ m1yVj/8f0dsS3m91UPPLrJbA2NkmqZvlrMmaw9lNTbI7VTp9n0jNRu9BOOijGr2AEU18 UDj8Jdz3wNufxBoaVID02yn3JU9Jx6JugUxGJy8fvS3DFGr1i+L/IPXOWIzR9TlnRoRh 9r23X01QaTcw9X0haydqFp7C96joqt3lzre2lMeS5hILGfLAh249oeK4Yi6TA9AHtQlQ VIOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QasMKCIaT47MEF+OQcq8zCDU70HNznQ46OZY6zak3V8=; b=XXoDUfu4zS+YsjykIuN52fj04GnYlLr1E5o5QqWIDGxlBSavACoNS1qj3oiaqPGpXv F7IfWhcCEaHtt47QALdG8Ts54Dxmb5UygCSUxHjJwpnMyzaltKB2N+67niBN+WOsGfh8 jHPeTVkdYbXNFdl3XsqwxQaMdQPjehg2vY2qLBx301aUeC3yC4K5pDxk2q35+VLtWPe6 FH7lnQqwOHXz00+vcszg1KxCMDV860pcHcEUkj2oaD5l49Y5vsnkQtiHawSt6o6uSX3B lTvQ4cy6dI66dy7auBfYMaGVhRB6gWnGIcrOmOx2Rqe7V8O73uTvYVtu8rggqNHRGugw 5qSA== X-Gm-Message-State: AOAM530nj+icfydmAmpRbFK1De65/dduZHTgmu5zPPYruSiGE8+ufudP lNJ3940gSBIxgBd1NRuCtfgXiw== X-Received: by 2002:a17:90a:6b42:: with SMTP id x2mr5108905pjl.16.1623930472719; Thu, 17 Jun 2021 04:47:52 -0700 (PDT) Received: from localhost ([136.185.134.182]) by smtp.gmail.com with ESMTPSA id u23sm6288551pgk.38.2021.06.17.04.47.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 04:47:51 -0700 (PDT) Date: Thu, 17 Jun 2021 17:17:49 +0530 From: Viresh Kumar To: "Enrico Weigelt, metux IT consult" Cc: Linus Walleij , "Enrico Weigelt, metux IT consult" , linux-kernel , Jonathan Corbet , Bartosz Golaszewski , "Michael S. Tsirkin" , Jason Wang , Kees Cook , Anton Vorontsov , Colin Cross , Tony Luck , Linux Doc Mailing List , "open list:GPIO SUBSYSTEM" , virtualization@lists.linux-foundation.org, linux-riscv , Vincent Guittot , Bill Mills , Alex =?utf-8?Q?Benn=C3=A9e?= Subject: Re: [PATCH] drivers: gpio: add virtio-gpio guest driver Message-ID: <20210617114749.uueu2v63duepfunb@vireshk-i7> References: <20210616114934.n3grzuh6c64wlaj6@vireshk-i7> <5cffb354-0d00-5ace-260d-61ac0c4c7491@metux.net> <20210617035901.kfzps6kg2emthjf4@vireshk-i7> <116f8135-4ddf-e8fc-6838-94093702ec3d@metux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <116f8135-4ddf-e8fc-6838-94093702ec3d@metux.net> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17-06-21, 11:54, Enrico Weigelt, metux IT consult wrote: > Actually, I am subscribed in the list. We already had debates on it, > including on your postings (but also other things). Right. > And the ascii > version of the spec actually landed on the list last year, we had > discussions about it there. I tried to search for it earlier, but never found anything on virtio list. Maybe I missed it then. > I've just had the problem that my patches didn't go through, which is > very strange, since I actually am on the list and other mails of mine > went through all the time. I'm now suspecting it's triggered by some > subtle difference between my regular mail clients and git send-email. > > > Since you started this all and still want to do it, I will take my > > patches back and let you finish with what you started. I will help > > review them. > > Thank you very much. > > Please don't me wrong, I really don't wanna any kind of power play, just > wanna get an technically good solution. If there had been any mis- > understandings at that point, I'm officially saying sorry here. Its okay, we are both trying to make things better here :) > Let's be friends. > > You mentioned you've been missing with my spec. Please come foreward and > tell us what exactly you're missing and what your use cases are. I have sent a detailed review of your spec patch, lets do it there point by point :) > Note that I've intentionally left off certain "more sophisticated" > functionality we find on *some* gpio controllers, eg. per-line irq > masking, pinmux settings for several reasons, e.g.: > > * those are only implemented by some hardware > * often implemented in or at least need to be coordinated with other > pieces of hw (e.g. in SoCs, pinmux is usually done in a separate > device) > * it shall be possible to support even the most simple devices and > have the more sophisticated things totally optional. minium > requirements for silicon implementations should be the lowest possible > (IOW: minimal number of logic gates) > > >> You sound like a politician that tries to push an hidden agenda, > >> made by some secret interest group in the back room, against the > >> people - like "resistance is futile". > > > > :) > > Perhaps I've been a bit overreacting at that point. But: this is really > that kind of talking we hear from politicians and corporate leaders > since many years, whenever they wanna push something through that we the > people don't want. Politicians use that as a social engineering tool for > demotivating any resistance. Over heare in Germany this even had become > a meme, and folks from CCC made a radio show about and named by that > (the German word is "alternativlos" - in english: without any > alternative). No idea about other countries, maybe it's a cultural > issue, but over here, those kind of talking had become a red light. > > Of course, I never intended to accuse you of being one of these people. > Sorry if there's been misunderstanding. It sounded strange yesterday to be honest, but I have gone past it already :) > Let's get back to your implementation: you've mentioned you're routing > raw virtio traffic into userland, to some other process (outside VMMs > like qemu) - how exactly are you doing that ? > > That could be interesting for completely different scenarios. For > example, I'm currently exploring how to get VirGL running between separate > processes running under the same kernel instance (fow now we > only have the driver side inside VM and the device outside it), means > driver and device are running as separate processes. > > The primary use case are containers that shall have really GPU generic > drivers, not knowing anything about the actual hardware on the host. > Currently, container workloads wanting to use a GPU need to have special > drivers for exactly the HW the host happens to have. This makes generic, > portable container images a tuff problem. > > I haven't digged deeply into the matter, but some virtio-tap transport > could be an relatively easy (probably not the most efficient) way to > solve this problem. In that scanario it would like this: > > * we have a "virgl server" (could be some X or wayland application, or > completely own compositor) opens up the device-end of an "virtio-tap" > transport and attaches its virtio-gpio device emulation on it. > * "virtio-tap" now creates a driver-end, kernel probes an virtio-gpu > instance on this (also leading to a new DRI device) > * container runtime picks the new DRI device and maps it into the > container(s) > [ yet open question, whether one DRI device for many containers > is enough ] > * container application sees that virtio-gpu DRI device and speaks to > it (mesa->virgl backend) > * the "virgl-server" receives buffers and commands from via virtio and > sends them to the host's GL or Gallium API. > > Once we're already there, we might think whether it could make sense > putting virtio routing into kvm itself, instead of letting qemu catch > page faults and virtual irqs. Yet have to see whether that's a good > idea, but I can imagine some performance improvements here. We (at Linaro) work on software enablement normally and not end products (rarely that happen though), like framework level work in the kernel which can later be used by everyone to build their drivers on. There are many companies like Qualcomm, ST Micro, etc, who want to use Virtio in general for Automotive or other applications / solution. The purpose of Project Stratos [1], an initiative of Linaro, is working towards developing hypervisor agnostic Virtio interfaces and standards. The end products and applications will be worked on by the members directly and we need to add basic minimum support, with all the generally required APIs or interfaces. -- viresh [1] https://linaro.atlassian.net/wiki/spaces/STR/overview