Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1081851pxb; Fri, 20 Nov 2020 00:05:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1X5hrapTTl/eueqJ+hB+5UzcQb32A1SknrD+kMI5CYH6ZwojxL9e1qXkQ8SnY9o/Iyd+v X-Received: by 2002:a17:906:2452:: with SMTP id a18mr4136617ejb.66.1605859555050; Fri, 20 Nov 2020 00:05:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605859555; cv=none; d=google.com; s=arc-20160816; b=IQKz92feTnQMzH0PwlZ6SWHI2xBnLXPJ+q406fw1kyDbhR9c2m0P6el5zQzysnU0B5 MpJhwN3MvrpNwtw0BVkeaJ4qImPy+G+1lMKahW2AMj+vlXjPhFAYsYp1cX0wJRw2nHwY 06gRqDLINKN3vJ9iuQ40K/IN96ubzHnGUiZ2hRvAglapHymzkcexouNFdAHbAs23Tr6B 1d63mOOOi51yLnghneighkqeDrzAyck68rHGwdTQ9M/kk/Ti6jUdt3/J8TDItLCAtuI1 zhOb4RVX2a1YlFu25CiY5GRkFOzJZ3BPWPmZm+gXbT2MYaqQgNCXmPUSYxgSoxOSPw1U qTVw== 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; bh=33NkiPWTYAeUlwG1Y96AUCDHijbxvLIyDpR4mF2L1+c=; b=hnCxM6VMr6cmizbBhS1peFNATvu9J44p/sD96u0xLft855lkDRVuxebSYx04i1bjps Y1ibMXDhWw0/mQHbeo3XP6wpPALxeVY/rmVGlGY3+rh85+/7oJnDTT/9fSrP4h2mKLrh zShN09/TkBOkpg5/78JW8xh2FGyiiW+5KY4L8xHX4g5p9/xNnnJJxs7esX3WAY22gW6I 56za8gahgcbH5Ce/vBjjRnHdJj5Nd0xjx8ESGMsq69/NNJ7usR97mdqTfW8o7QOv4ie7 fglmGZGYLem0Bm87jZhx1+YtEhM+e6OsmT3t+8rxB+Bs+nX6mE5OGGr5Rl8oHaD3I5I0 /k1A== 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 e4si1337201edr.585.2020.11.20.00.05.31; Fri, 20 Nov 2020 00:05:55 -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; 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 S1726420AbgKTICr (ORCPT + 99 others); Fri, 20 Nov 2020 03:02:47 -0500 Received: from verein.lst.de ([213.95.11.211]:41816 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725797AbgKTICr (ORCPT ); Fri, 20 Nov 2020 03:02:47 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id D6FE467373; Fri, 20 Nov 2020 09:02:43 +0100 (CET) Date: Fri, 20 Nov 2020 09:02:43 +0100 From: Christoph Hellwig To: Tom Roeder Cc: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Peter Gonda , Marios Pomonis , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] nvme: Cache DMA descriptors to prevent corruption. Message-ID: <20201120080243.GA20463@lst.de> References: <20201120012738.2953282-1-tmroeder@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201120012738.2953282-1-tmroeder@google.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2020 at 05:27:37PM -0800, Tom Roeder wrote: > This patch changes the NVMe PCI implementation to cache host_mem_descs > in non-DMA memory instead of depending on descriptors stored in DMA > memory. This change is needed under the malicious-hypervisor threat > model assumed by the AMD SEV and Intel TDX architectures, which encrypt > guest memory to make it unreadable. Some versions of these architectures > also make it cryptographically hard to modify guest memory without > detection. I don't think this is a useful threat model, and I've not seen a discussion on lkml where we had any discussion on this kind of threat model either. Before you start sending patches that regress optimizations in various drivers (and there will be lots with this model) we need to have a broader discussion first. And HMB support, which is for low-end consumer devices that are usually not directly assigned to VMs aren't a good starting point for this.