Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2828300pxb; Tue, 12 Oct 2021 14:26:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsTEUUhzJ7J+Js96sAte0ki4S671a9OckbquGWlIyc1KFlsJEVfdkY3NtKys6uriVeSqgj X-Received: by 2002:a17:902:9882:b0:13e:1749:daae with SMTP id s2-20020a170902988200b0013e1749daaemr32158266plp.60.1634073980213; Tue, 12 Oct 2021 14:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634073980; cv=none; d=google.com; s=arc-20160816; b=1KBwFveNv13mY1qwBXUjpE7qrIOf4ua+zD9Ws5BFwfW6q3IRX4eciH2pjDWFPH7aUz m+GO8B3spVbcgT1Mxul0BWRcmcmMdKSQ0a09nEXrrC+wSrGkkMOJRTuU7u5T3wkjHwP9 a2Mxy9GvC1cJHAr4LLkEFECH2dOYm2qCCXnZSzw0USFTTBcC8PcobVZqh/Uc/jMngq0W FotNWSbc9dufFgKk6Q4BF9QFBBXa3iv1qB7QcDZx0xsg2DxWv2obektaTLeemUwh7H43 ZeC6FH01iOWu3sfDEsbLd3qoP6AoKanAzsZY8dXvjfojwDPV6xND+ipaqCx5QjhhetFb Gqeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=WFbdvzNKKL/A60E8oHrkPFw6TFAVohxBKbifh2d8+2M=; b=AuMaZH6ts6YS/RQcxg6tEUJaug85pI9RIzGn6eT09eXaiSSoR514bJgkxZOnnXNU1D awMvvUCnFgVXlqDo0uttMT4TKKdKr12Ja34zopch9lhlqDovb3FM0lvLuZ33xAVqY2Wj BdGSEONd1GlHKadDQumPj32N6iQLcMvUE2/c2g+JRg2dEAhLa10osPNJsyNC4bWwlG4i UvrBhIfwQbiJFDUXWKdvPKVQ7X0yfpAz/mZVZfE4rVhHpL/lw7L7CAB5vtPK2oZwg4uA 8jNgC19y0hvGG9QYGgRoXmlpslcjnKubPhc5b4WC7uffwLOnKHYvfRBlnpxL5++nQB01 DGCA== 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 u25si17302509pgk.454.2021.10.12.14.26.06; Tue, 12 Oct 2021 14:26:20 -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 S233962AbhJLV00 (ORCPT + 99 others); Tue, 12 Oct 2021 17:26:26 -0400 Received: from mga09.intel.com ([134.134.136.24]:27414 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234011AbhJLV0Z (ORCPT ); Tue, 12 Oct 2021 17:26:25 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="227172660" X-IronPort-AV: E=Sophos;i="5.85,368,1624345200"; d="scan'208";a="227172660" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 14:24:10 -0700 X-IronPort-AV: E=Sophos;i="5.85,368,1624345200"; d="scan'208";a="562833280" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.115.208]) ([10.209.115.208]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 14:24:07 -0700 Message-ID: <4aa51c58-63f5-c7de-f8e5-f4184fd1c822@linux.intel.com> Date: Tue, 12 Oct 2021 14:24:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v5 12/16] PCI: Add pci_iomap_host_shared(), pci_iomap_host_shared_range() Content-Language: en-US To: "Michael S. Tsirkin" , Dan Williams Cc: 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 , Paolo Bonzini , David Hildenbrand , Andrea Arcangeli , Josh Poimboeuf , 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, "Reshetova, Elena" References: <20211009003711.1390019-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20211009003711.1390019-13-sathyanarayanan.kuppuswamy@linux.intel.com> <20211009053103-mutt-send-email-mst@kernel.org> <0e6664ac-cbb2-96ff-0106-9301735c0836@linux.intel.com> <9302f1c2-b3f8-2c9e-52c5-d5a4a2987409@linux.intel.com> <20211012171628-mutt-send-email-mst@kernel.org> From: Andi Kleen In-Reply-To: <20211012171628-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/2021 2:18 PM, Michael S. Tsirkin wrote: > On Tue, Oct 12, 2021 at 02:14:44PM -0700, Dan Williams wrote: >> Especially in this case where the virtio use case being >> opted-in is *already* in a path that has been authorized by the >> device-filter policy engine. > That's a good point. Andi, how about setting a per-device flag > if its ID has been allowed and then making pci_iomap create > a shared mapping transparently? Yes for pci_iomap we could do that. If someone uses raw ioremap without a device it won't work, but I don't think that's the case for virtio at least. I suppose we could solve that problem if it actually happens. -Andi