Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3056823pxb; Tue, 24 Aug 2021 14:07:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLjo5f0IxcZnaa/SWQhStBoql05vt7VkMqw9d0w+gTkOxXFMwpvWuj5VyQBtikBTGYyfW2 X-Received: by 2002:a05:6402:50c6:: with SMTP id h6mr44756182edb.1.1629839250497; Tue, 24 Aug 2021 14:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629839250; cv=none; d=google.com; s=arc-20160816; b=dPAcK2PsPwz+c5n6LCeGFW/Uocy6tEdm/IyAXgrm2hki134kD6lOmcchXq2TCboVRZ 0p/K/ay3xrMj/+RiQh9fWranvdrfG+KMsCVqbeleFdHjy2QsB8sKFsaBYdoTwder4/DA 81gTXRHEq2jTA1wfJlqTNOhYM2aLICLLpTt0DU92aVLsXJNrIcegBK/s2tuOVZnVk3VH ZEcQeJecpTm1bNaezn4m8QMM9NLNInJSG6HZVZIF96SvJ4OFADyDxUaKlRDkuQZusGsw gu1pM8mvslN9YnltVnJF+2BwbS00NDV19A4Zqc2qbZaMF2+Ct1ZsANGUFSshgfkW/EX5 oxfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=50KgIimgoHn2hLRecJ9xsYP+KbZzb8N9bfDIuPfzvjQ=; b=v6KEIUEon/iWezei2pFGL+CH/TB2HrdG34LDB+rJnfK6J1ZcRgJJjkYGoN6FfMWEwq yIRQL07Cj9GD1EOjdUf8BHChfvLsmgB3hFEYY00yu4SidDorUzfZD9nJebu5QxFHzD1T srmikHA6tslq7dmHj4aiaiRj3z0odgXERRmrATPRHhi3p6vhXwR1Akv6bBjwzhseYk5j /a11UZS5vGS7a24x/zBxyWXMnYJLbFSy+8bh0Lqbjf9ilNrPzGXVia492UsDqMl/Kr9B rJdvS4PM2PXlmcmmKiC0t4s360McAAwm7Gc08nny0kIsCTCO/CzZH1R0Oh9Fkrwm0Szo FgRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NvAgKb0T; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l9si9533233edq.493.2021.08.24.14.07.06; Tue, 24 Aug 2021 14:07:30 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NvAgKb0T; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235102AbhHXVGW (ORCPT + 99 others); Tue, 24 Aug 2021 17:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234442AbhHXVGV (ORCPT ); Tue, 24 Aug 2021 17:06:21 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 885E1C061757 for ; Tue, 24 Aug 2021 14:05:36 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id q68so3906348pga.9 for ; Tue, 24 Aug 2021 14:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=50KgIimgoHn2hLRecJ9xsYP+KbZzb8N9bfDIuPfzvjQ=; b=NvAgKb0THlkdDUQ0aRx+9mednYqLHP6M3XIYjenGeve36GswyogqqyEtfltG9odhSS sXNl+nzWb/jgjnohkyON1TK0N4HUhwZj7aRcTxvirbX0hPedZ8o7Xo7c5YpxKjNNzQYr zyJiMtdKa9NltLOObRsERtWbUkAqlgZSPFS2egovwI2a4M3yx8YiJOFhAZDgyiFWM4Tr bAb4DagRmpCRfU/tqemlilYyGEtImDNJKoZmeV/8h3FeicEkU17ZO2s8oFIsfzw7ghCP W7IqcpYk1aL3JziP3HtHww5os2Qnu25hR/eXZFgKZ3PqWWua0S27ru9KI2z3Lojktzjy vK+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=50KgIimgoHn2hLRecJ9xsYP+KbZzb8N9bfDIuPfzvjQ=; b=kraaq5m1NyTd6ci5CeilRByfQt0ZVJYfG6tcdb85Qjaa3Ic4mPF8SiKCW/O3D85+6T Yoa2yzheb5mkq4g/pLv6b5XCczOKssBXSyLE+Qxg65cb94YujTU1PsesHGsc87/NLe2v 4oWQdSbi1Tm585ZQS086Jyy7W9F29900XIPpbQWm2S9snoyrtLj3IhTswGcI1O/dWhSQ Z9lk4Uwci2aBHb5OM3uA21hZ6lgTJ7HE1VdLgngYMZrKMvF8dtG+g3l1TVmhnam6Ckem BEGVLjQJvUutZhuZJWo1wqkXQDEhOcIhwVuhYlFhNus+gfgbyyq72UXwUEBDL/qr3zSv eg4Q== X-Gm-Message-State: AOAM530fd8P7gn4ttUAQqbCkMD6QX55E+DXaGNhlGGPmj/FKdqAxBtcP 9FaVKGbZVh4yooPcyWFZOCOGUFoXsmRMOr/BlbfiEA== X-Received: by 2002:a65:6642:: with SMTP id z2mr26349152pgv.240.1629839136081; Tue, 24 Aug 2021 14:05:36 -0700 (PDT) MIME-Version: 1.0 References: <20210824203115.GA3492097@bjorn-Precision-5520> In-Reply-To: From: Dan Williams Date: Tue, 24 Aug 2021 14:05:25 -0700 Message-ID: Subject: Re: [PATCH v4 11/15] pci: Add pci_iomap_shared{,_range} To: Andi Kleen Cc: Bjorn Helgaas , "Michael S. Tsirkin" , "Kuppuswamy, Sathyanarayanan" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , Bjorn Helgaas , Richard Henderson , Thomas Bogendoerfer , James E J Bottomley , Helge Deller , "David S . Miller" , Arnd Bergmann , Jonathan Corbet , Peter H Anvin , Dave Hansen , Tony Luck , Kirill Shutemov , Sean Christopherson , Kuppuswamy Sathyanarayanan , X86 ML , Linux Kernel Mailing List , Linux PCI , linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch , Linux Doc Mailing List , virtualization@lists.linux-foundation.org, Rajat Jain Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 24, 2021 at 1:50 PM Andi Kleen wrote: > > > On 8/24/2021 1:31 PM, Bjorn Helgaas wrote: > > On Tue, Aug 24, 2021 at 01:14:02PM -0700, Andi Kleen wrote: > >> On 8/24/2021 11:55 AM, Bjorn Helgaas wrote: > >>> [+cc Rajat; I still don't know what "shared memory with a hypervisor > >>> in a confidential guest" means, > >> A confidential guest is a guest which uses memory encryption to isolate > >> itself from the host. It doesn't trust the host. But it still needs to > >> communicate with the host for IO, so it has some special memory areas that > >> are explicitly marked shared. These are used to do IO with the host. All > >> their usage needs to be carefully hardened to avoid any security attacks on > >> the guest, that's why we want to limit this interaction only to a small set > >> of hardened drivers. For MMIO, the set is currently only virtio and MSI-X. > > Good material for the commit log next time around. Thanks! > > This is all in the patch intro too, which should make it into the merge > commits. > > I don't think we can reexplain the basic concepts for every individual > patch in a large patch kit. Maybe not the whole cover letter, but how about just a line in this one that says "Recall that 'shared' in this context refers to memory that lacks confidentiality and integrity protection from the VMM so that it can communicate with the VM." Although I think ioremap_noprotect() might be clearer than shared for the protected guest use case?