Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp205908pxb; Wed, 18 Nov 2020 02:18:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPNVZ35IFXxjmUGQ4W7dRTQ5XxIljh0Rv8X9e8GRxmohEhbQMFZtTGVSQ3S1/+GVVVZXMr X-Received: by 2002:a05:6402:22d8:: with SMTP id dm24mr25476319edb.69.1605694710594; Wed, 18 Nov 2020 02:18:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605694710; cv=none; d=google.com; s=arc-20160816; b=RrsrIrKajJSE9GUX7rFKDr3IjFC6nEanf7ZOnlAr2nUWkKEg9QTfjEuWImnkxkyBJk 7lSstvVzrsJT7jRPfyYjgSp2l2Kj5ejyPTYVtWv8nyKB54mhu2UQo/am4+h/xbAOE1Dc yL+ajgd0LimjGNQfjYwRCzaCUr1uU4YkB7NBLcdWwbSSn+l3mScTMFH6mJtzGlshG7lE +ukHw5ZwWV6l30yDDXQyonxN9STPF5jIjAE8ZkaqbRyic4Lzq0v3wXNrR95cR21ldW+L wLj2Uiz/rZEm7324R+yrNc87qKIIUXaeRW9KCckR6gXlyViPQzQgzUpdEdB45gW4WdZr g0XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Yed5/d7vK7YdqC5lhdZVNcPCr3eQRtrjIPPe/s03Tno=; b=feJFCxAmoijSJnnYIDOYJ4FIgX2BsdMbKE1ZCix5z8tYC5sgf8X7rnaTkmafEBKy4z 5DVd6OsPyEmdP8hVm73/OYq0xbp0Ntq+mEe5R410ze6Osnl4wMQZ3zw2VTDdvc1l1SYr QJFM3pF1oLh+GqXHrB81TxDc3goIxEi6eXW6THR6F4zlMrpoEej3IdxWvi1LAivdQzkw 5VG8GErVO+MUlW0I+T5tPMC+o4pbZrmBQremeuVYrRHdBn+bNPcdcStMhyjnvcHUJScB Scx66NO0O1mqe2HZjhHBij5jcH02/4d3Gto30xrwTk+SYqw7mEw59WJOqClO23GfDA66 BB0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hMbsrJHn; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si15534435edy.201.2020.11.18.02.18.07; Wed, 18 Nov 2020 02:18:30 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=hMbsrJHn; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725832AbgKRKQ0 (ORCPT + 99 others); Wed, 18 Nov 2020 05:16:26 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:24806 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgKRKQ0 (ORCPT ); Wed, 18 Nov 2020 05:16:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605694585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Yed5/d7vK7YdqC5lhdZVNcPCr3eQRtrjIPPe/s03Tno=; b=hMbsrJHnaxDO+CNXu3IbasSaJL08s4tqsIaqyuLP62IHwV5maJY3XNxpcdqsu//XkHX8pR OKzsLiwzrAEaxl2g5+NGvF9kedH311vNs8muptBqtnp5GP5CtWHH2ReZYn0h0eE8yPxYB+ bPSPp6N9gD2+XA/XdiJBIJnpc9inOn8= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-Z-IaRSNSNXqDhzyuY5NxUw-1; Wed, 18 Nov 2020 05:16:23 -0500 X-MC-Unique: Z-IaRSNSNXqDhzyuY5NxUw-1 Received: by mail-wr1-f70.google.com with SMTP id h13so723128wrr.7 for ; Wed, 18 Nov 2020 02:16:22 -0800 (PST) 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; bh=Yed5/d7vK7YdqC5lhdZVNcPCr3eQRtrjIPPe/s03Tno=; b=lWaz6QOl2fTxa32Zgb16jEQ1OhDX5cDH9IBU1SstaSJ7DT+8ABcSwlV/gaiJ7KJ3P4 wO7rAmIxSBs3zGKX+izPwBySXK9KNN3qKMYbpn/CqmEyEnBjtA0svteHNA3H8x/U8p24 mKEl7IuyJee+AhF5MjTmj9jmV0ZAwAdgtzlK35GSnS9QO56RjAmOL9rBNYqXI4ObapTb iHcs2sWIM8TsNaMMBImd93kuDNz+GaPPOcUvoaunthhPdK6as+E3+DmyumWc6gvT/APl ny3evQOz2IJBQcoEvRl7PaAulJ75Th+tFzX/pX+KwMdWGk8zWYRCi/2HXNMaIm9uy0+C vaWA== X-Gm-Message-State: AOAM5315iu6LEsFizthppJceRZfMVc6PcI2BWZwpj/jb018SeRX5QyRy 22JhF7O0j1TPOGEKtkW1hEYRdCYCMpSGWR/bdm68Zj/JDTHW0bF9FkQDlYbSsXeWYZIzIiouglo 0r7aZV8Z4IYJMUlk7oHzcl7FS X-Received: by 2002:a1c:3c04:: with SMTP id j4mr3793827wma.105.1605694581817; Wed, 18 Nov 2020 02:16:21 -0800 (PST) X-Received: by 2002:a1c:3c04:: with SMTP id j4mr3793798wma.105.1605694581613; Wed, 18 Nov 2020 02:16:21 -0800 (PST) Received: from redhat.com (bzq-109-67-54-78.red.bezeqint.net. [109.67.54.78]) by smtp.gmail.com with ESMTPSA id b4sm2360517wmc.1.2020.11.18.02.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 02:16:20 -0800 (PST) Date: Wed, 18 Nov 2020 05:16:15 -0500 From: "Michael S. Tsirkin" To: Christoph Hellwig Cc: Arnaud POULIQUEN , Alexander Lobakin , Amit Shah , Arnd Bergmann , Greg Kroah-Hartman , Suman Anna , Mathieu Poirier , Bjorn Andersson , Ohad Ben-Cohen , Jason Wang , "virtualization@lists.linux-foundation.org" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial Message-ID: <20201118042039-mutt-send-email-mst@kernel.org> References: <20201116091950.GA30524@infradead.org> <20201116162844.GB16619@infradead.org> <20201116163907.GA19209@infradead.org> <79d2eb78-caad-9c0d-e130-51e628cedaaa@st.com> <20201117140230.GA30567@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201117140230.GA30567@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 17, 2020 at 02:02:30PM +0000, Christoph Hellwig wrote: > On Tue, Nov 17, 2020 at 03:00:32PM +0100, Arnaud POULIQUEN wrote: > > The dma_declare_coherent_memory allows to associate vdev0buffer memory region > > to the remoteproc virtio device (vdev parent). This region is used to allocated > > the rpmsg buffers. > > The memory for the rpmsg buffer is allocated by the rpmsg_virtio device in > > rpmsg_virtio_bus[1]. The size depends on the total size needed for the rpmsg > > buffers. > > > > The vrings are allocated directly by the remoteproc device. > > Weird. I thought virtio was pretty strict in not allowing diret DMA > API usage in drivers to support the legacy no-mapping case. Well remoteproc is weird in that it's use of DMA API precedes standartization efforts, and it was never standardized in the virtio spec .. > Either way, the point stands: if you want these magic buffers handed > out to specific rpmsg instances I think not having to detour through the > DMA API is going to make everyones life easier.