Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2302676pxb; Mon, 23 Aug 2021 17:33:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH4pYqo6alsapBDE03wU7k6pcbPPGwzR+j0wdSpXKPapnvDJo7i5+Ipa+Fu0aN9DpSIcqc X-Received: by 2002:a17:906:e85:: with SMTP id p5mr37534171ejf.159.1629765217352; Mon, 23 Aug 2021 17:33:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629765217; cv=none; d=google.com; s=arc-20160816; b=iwCELLHWMCJo6wiIvX2DoxJfnRZyEi6sxR5KmEZm5xCXxWxKsEDKN4eCkHBxHdWNc9 fLcFoH9uD51WpYtTWVSqArElvdV9JtCt+DW+9IRubOO6QZ0IJbL1fTRqZK3RguG8zP2L /FOK9RXbmPJYPnXC00DW49Bd3W48zqEh0QuLyVfZTcrW/NxoaX5FoutC22FbiJp5PrZw lU0M60qqByokPE0jhmeKR//CIPqZahtIRoeLU3xje8P3BoUH4w5N1Ca1ps80vlPbkROl jvNQ9tvtCTWMJO1ynHqzM9oIqq6301/knDmjFSIf11e1RGlGFwHRJzI/9LN59Pggb4+u tVrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=MmrY/NGDD4fy83oIqJoOvf34olcbWOdAXLIw2ZE++54=; b=Cunp/8Ft3YijUNljYiAbXRcgpqOqarBYi10Cb2dZQq800K3rzqaJ1Qvfh5URRkczQX 8Q8wb1Gsx2m72Qi5uzHaAcbTrvAV3cA2GUFZ5AXgi2Eh8CJPD3q/rnsaouFE2AF1EsEk l2IufcliFzl8IxWPx8+1epgqhjyC/hlEhqFfQYkqOgMqhSdu3OnpQ0GVI4/ebRDyPb1B deOOax4ignTF/k/PNEklDpFoArQLGOQAUJzI6iQMMsKrnK4OopKf6N7cpbz4RkRu2l5a nvIdRFb85nC6evBMY/vc5wZbQEwP6I0jBQsIQIk4XN0iJbphQy/eIzlgBruB2X03MdD+ Zoig== 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; 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 z20si16244329edx.292.2021.08.23.17.33.01; Mon, 23 Aug 2021 17:33:37 -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; 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 S233441AbhHXAbn (ORCPT + 99 others); Mon, 23 Aug 2021 20:31:43 -0400 Received: from mga01.intel.com ([192.55.52.88]:58722 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233260AbhHXAbn (ORCPT ); Mon, 23 Aug 2021 20:31:43 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10085"; a="239348571" X-IronPort-AV: E=Sophos;i="5.84,346,1620716400"; d="scan'208";a="239348571" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2021 17:30:59 -0700 X-IronPort-AV: E=Sophos;i="5.84,346,1620716400"; d="scan'208";a="473280486" Received: from arezooho-mobl.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.212.67.66]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2021 17:30:56 -0700 Subject: Re: [PATCH v4 11/15] pci: Add pci_iomap_shared{,_range} To: "Michael S. Tsirkin" Cc: 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 , Dan Williams , Andi Kleen , Kirill Shutemov , Sean Christopherson , Kuppuswamy Sathyanarayanan , x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, virtualization@lists.linux-foundation.org References: <20210805005218.2912076-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210805005218.2912076-12-sathyanarayanan.kuppuswamy@linux.intel.com> <20210823195409-mutt-send-email-mst@kernel.org> From: "Kuppuswamy, Sathyanarayanan" Message-ID: <26a3cce5-ddf7-cbe6-a41e-58a2aea48f78@linux.intel.com> Date: Mon, 23 Aug 2021 17:30:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210823195409-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/23/21 4:56 PM, Michael S. Tsirkin wrote: >> Add a new variant of pci_iomap for mapping all PCI resources >> of a devices as shared memory with a hypervisor in a confidential >> guest. >> >> Signed-off-by: Andi Kleen >> Signed-off-by: Kuppuswamy Sathyanarayanan > I'm a bit puzzled by this part. So why should the guest*not* map > pci memory as shared? And if the answer is never (as it seems to be) > then why not just make regular pci_iomap DTRT? It is in the context of confidential guest (where VMM is un-trusted). So we don't want to make all PCI resource as shared. It should be allowed only for hardened drivers/devices. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer