From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1C2BC4320A for ; Tue, 24 Aug 2021 21:05:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC2AA610FD for ; Tue, 24 Aug 2021 21:05:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235104AbhHXVGW (ORCPT ); Tue, 24 Aug 2021 17:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235160AbhHXVGV (ORCPT ); Tue, 24 Aug 2021 17:06:21 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3D37C061796 for ; Tue, 24 Aug 2021 14:05:36 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id g184so2490614pgc.6 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=Arbe5HtTvX0xzRLiW8jj624L5HcAU49DsT2bakgcz5NmRUtqc6uHgSrMemR6s/2hhW 4m47oGFNL8Bvc6ZFTpBQQ0iEBSMZGGU3YK6+jOupWylZEa8x+S2UyONInyB8xNQlwt0m t2yHgl1UsicPMEz0izlJcI7h98cNJScshGbq3syqeRmI2r8JC2WVYAe5EFcWfXWxlGwM qczcpeJssrLTTp/VJjpWQDag4q+2DGEvTYqwjdvtpjKVH09bAcS+xFWwKl4JGZa4jcVI NT6exDatvs44iUpjlpewF/6XkMtLUQYFeesmFMp/m4Y987dtk8KIYL49/QN1uLcNO2Zd YIuQ== X-Gm-Message-State: AOAM530obM7BYL8Q66E7XP7i6VPHVgg3JssnHreirVxpT26QWfQIu+5H nomRNTHtgrqWnC/5fPAFDjNRIDNj9MhI8G2xnb2ofQ== X-Google-Smtp-Source: ABdhPJwkzMtO2gq/o/NUrPl5vjkkiQPqJ23InKpT9YHvAxhia00+dsPd0+b1/fg0fqEO9y3ko1JQOVp9Vu81LPNo08o= 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-doc@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?