Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2084127ybv; Fri, 21 Feb 2020 08:35:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwwgqxbWNVRvkFpWN2TkVcGCLjK3ntD6nCvT4NyUfkFCpLkCPkEB4qlh5UXc9n7CeiqwBYl X-Received: by 2002:a9d:7590:: with SMTP id s16mr27282213otk.89.1582302949277; Fri, 21 Feb 2020 08:35:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582302949; cv=none; d=google.com; s=arc-20160816; b=NgvTggNOdZBKF0FtVpdfsOoG//MdwnhnhE4SN5/Q69SLGnmMYqUg5xQ/8g72WbRqZm WUqho89kA8rliEmJaka+Ehgzj9JWL+Nwjehy9+CHdh3R0jU4dcG25QOwLlSBXcDQYz/M 2CEuXHxxFOBLzez9L7BcfGg2R40ornocUDEXuiiCA2wXJ97H7o12PdatT7X8Ie7qg6a1 S2xYR2JosD152gnq1rJG65fAKIHXTZsobq7jaBWOoyab7tIfaTRMX6Q0B6toiBoJl+ta phhgSRIUG+hjwNisjU6zmAbLjgPgLiwJawqvFjccgFOUU3hsrwJLxuFUk0aCm3q3YgeP 8jzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=tew7zfwTNAunDjVoYTsS+6+Z4NZA5RKcId5ebozavU8=; b=IDoinM01ePahK97UCG7k19gAiYl0jafcOzhn/WX0E9tNEeYnN3Tno+Xuo5B3nTGOJT s6Gvh2JUiK5Vgsr4J4jCgFM6UK+VMAoT1ascejvRF4kXF5qqP10blwCsINAXAiI57f2F gG2zek+lSeR0JNVdusdFknYKvddFRFEJlEb0MLmUeTbA0QvSpQbZZF0FXMnI6VyiZbA+ tZ8wawe7mEj4vq1J6En+3JkSOv2CymWgF17zLa68bgzOjfTBZrabccRbYodC12TBPDDA TuePtk7PvCMOPgrkro/DZbxTwPXaTEL9hentNvUzEe06GTwiZdRCVLr7nlnproMXMmkq PbHg== 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 e9si1641215otk.318.2020.02.21.08.35.36; Fri, 21 Feb 2020 08:35:49 -0800 (PST) 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 S1726550AbgBUQf1 (ORCPT + 99 others); Fri, 21 Feb 2020 11:35:27 -0500 Received: from verein.lst.de ([213.95.11.211]:56364 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbgBUQf1 (ORCPT ); Fri, 21 Feb 2020 11:35:27 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 1B84A68BFE; Fri, 21 Feb 2020 17:35:24 +0100 (CET) Date: Fri, 21 Feb 2020 17:35:23 +0100 From: Christoph Hellwig To: "Michael S. Tsirkin" Cc: Halil Pasic , Jason Wang , Marek Szyprowski , Robin Murphy , Christoph Hellwig , linux-s390@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Christian Borntraeger , Janosch Frank , Viktor Mihajlovski , Cornelia Huck , Ram Pai , Thiago Jung Bauermann , David Gibson , "Lendacky, Thomas" , Michael Mueller Subject: Re: [PATCH 2/2] virtio: let virtio use DMA API when guest RAM is protected Message-ID: <20200221163523.GA10054@lst.de> References: <20200220160606.53156-1-pasic@linux.ibm.com> <20200220160606.53156-3-pasic@linux.ibm.com> <20200220154904-mutt-send-email-mst@kernel.org> <20200221141230.13eebc35.pasic@linux.ibm.com> <20200221104901-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200221104901-mutt-send-email-mst@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2020 at 10:56:45AM -0500, Michael S. Tsirkin wrote: > > > - DMA API is giving us addresses that are actually also physical > > > addresses > > > > In case of s390 this is given. > > I talked with the power people before > > posting this, and they ensured me they can are willing to deal with > > this. I was hoping to talk abut this with the AMD SEV people here (hence > > the cc). > > We'd need a part of DMA API that promises this though. Platform > maintainers aren't going to go out of their way to do the > right thing just for virtio, and I can't track all arches > to make sure they don't violate virtio requirements. There is no way the DMA API is going to promise that you. All kinds of platforms have offsets to DMA, and they are communicated through interfaces like the device tree or ACPI. But the good thing is that your hypervisors is in control of that, neither the DMA API nor virtio have any business to interfer with that. In fact for harware virtio device we might need such an offset for them to work on lots of SOCs.