Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2328232ybl; Sat, 10 Aug 2019 22:59:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5IZfqC90UpwhPYGYrEgqkCfHCdHUvwXaFR2+e48LECudE3QzORqVPbrxjlqDZq9UcMvev X-Received: by 2002:a63:c0d:: with SMTP id b13mr24716584pgl.420.1565503148359; Sat, 10 Aug 2019 22:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565503148; cv=none; d=google.com; s=arc-20160816; b=Va3vO1cDAe81uV1Wpyqa04QGV8HXLdK09IP6SjYH/qVpGOpZ+/V52Nbl5tmV+Vab2e 498qgXPu74h/rF/nF5mTjMq6sFr+OvCr++fZiNAcc3uFj/BhxwXwEDOvsi5/yy7wFkzt 0qH/wvou7ZTBAQ5K4Lb1B8bCYSjk6J5GUkHdjLX+NZnCVY8jUekr+8geKtQUWzPzweBr QRpKte8PxkkxDX/yTN//GtmDzumFOV5nJFd8VUlpx8eHCdrdYeVPPaK5+m9TnBHqgf1G PnWjjXxZqt5/4RNtZUXNYBStCmaLZa+47ISRCxAX8TKNUYBHLstPKG/yu1rXCpg3D7CB zdHA== 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=UV6OaByK8BsQXQiPpin3eLyFZmaY0SvzzjQcWkjbYaY=; b=ZMHZbiVPlu7hGH8ewykmRq71uNM+BYo+RRtbjRKFzCasSmdEdTEBLZguGhwGxhqqIQ T2VMjNVhKnsSPHA1Rky5rZHbHQsWssdHiSFpGvMxMF0vYyE4JEpKuJ79BCr2UHSQJ4s6 dT+SAs0MBJumSZQVh3ZaESLm7jK66pO7fbcVFsK3KXfhqr7ojNurFgPMnZpQNVx7AIuV KTlsenRrNhdXwiCzohAeip8+v2VUK2N4rOYcYPHTvsO1igItSahNej7H+hQrW2AAykDm KBpfwrihgRXlXbGMBZbNvx5JksZuC8itLuKsAv4JVvNpxhIfm+S6HHbSwikuYAPZEFkM cmxA== 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 q13si6781598plr.158.2019.08.10.22.58.51; Sat, 10 Aug 2019 22:59:08 -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 S1726014AbfHKF4M (ORCPT + 99 others); Sun, 11 Aug 2019 01:56:12 -0400 Received: from verein.lst.de ([213.95.11.211]:38698 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725813AbfHKF4L (ORCPT ); Sun, 11 Aug 2019 01:56:11 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 0328568BFE; Sun, 11 Aug 2019 07:56:07 +0200 (CEST) Date: Sun, 11 Aug 2019 07:56:07 +0200 From: Christoph Hellwig To: Ram Pai Cc: "Michael S. Tsirkin" , Thiago Jung Bauermann , virtualization@lists.linux-foundation.org, linuxppc-devel@lists.ozlabs.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Jason Wang , Christoph Hellwig , David Gibson , Alexey Kardashevskiy , Paul Mackerras , Benjamin Herrenschmidt Subject: Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted Message-ID: <20190811055607.GA12488@lst.de> References: <87zhrj8kcp.fsf@morokweng.localdomain> <20190810143038-mutt-send-email-mst@kernel.org> <20190810220702.GA5964@ram.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190810220702.GA5964@ram.ibm.com> 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 sev_active() is gone now in linux-next, at least as a global API. And once again this is entirely going in the wrong direction. The only way using the DMA API is going to work at all is if the device is ready for it. So we need a flag on the virtio device, exposed by the hypervisor (or hardware for hw virtio devices) that says: hey, I'm real, don't take a shortcut. And that means on power and s390 qemu will always have to set thos if you want to be ready for the ultravisor and co games. It's not like we haven't been through this a few times before, have we?