Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1530396pxb; Sun, 12 Sep 2021 22:57:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxohdAxeQq2f75v48Pke2eL10sJZZiNAMMmSBb3oRmk3V93mrVSs38PaQb6rjmleLFfu9p6 X-Received: by 2002:a17:906:ca1:: with SMTP id k1mr10844435ejh.369.1631512620835; Sun, 12 Sep 2021 22:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631512620; cv=none; d=google.com; s=arc-20160816; b=yk+EfPnuAqyWw9+Wij6KetJeX39BRlHwvjyBcWNI/muAc8L3NNwNhi7YyzywSBvGeS Qr8pAyPWdOaT/s0V3MXkWLHAhl08+cI0WJQJcnqxTtiYVENWWRi0mzkUd1gv+nzM12fl Uiac32Bqtr/UaCuJEXdiWWhT8XcSmlpQw+AzCPFv3PYMaVCP08kMS8Kop/5VFxrTFIJ6 aua69Fr646tLDQrpB2BnTHlOi7iI+mx8rLvxQ3pyygsAB1MsD45OrJuYg3NZXoXEQxo6 PNG3uS1FAakfcNCObeAruc6q9AzxGMXrha1uTIuOLUdwmDGj4K9OZV7GKtZYqFSwosAz j9tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lmIEdzAE8KtfMvdI7Vd3u1eV+5W/XqJ3cF9Jvl0CpQM=; b=D0ZOF34RymPXTl/hAMLKDUzEJcpMZkmmFCAEhHNwxLajpXkOc09yc4D1lN6mccEsBl CMbBG19p0dV5b2eVfeSUYm4NShUWJbvHhg9Pg3C7cwJ3sohOjBrGUNMxSPxfa/Wf2/bh AJfAp7DYJapZP3pHAOdmNIAQ/R5FJlPIZ3PDJ0wmYv2Jo63tGQq27S2kcfEvg9zKlzUL jnLJnDyVipvN+qACMo2dXLBz8SWrYspxk2ABYMIEjy/T2DxcWqUBjTkFNydNK03qlWD6 1zKh18ARmd/uO9Fbyi996zbIgjKk5lwGq4r1E7AVMFcu9/m9CsHV+98ZyOV/AouGjn8p 38cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="hba9LN/K"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e10si8611496edj.222.2021.09.12.22.56.37; Sun, 12 Sep 2021 22:57:00 -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=@redhat.com header.s=mimecast20190719 header.b="hba9LN/K"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237015AbhIMFyy (ORCPT + 99 others); Mon, 13 Sep 2021 01:54:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50850 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237076AbhIMFyx (ORCPT ); Mon, 13 Sep 2021 01:54:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631512417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lmIEdzAE8KtfMvdI7Vd3u1eV+5W/XqJ3cF9Jvl0CpQM=; b=hba9LN/K8sGgLov/lZRQ6l3oSQ+7L+pv5G+v2J8/Z0HMbT3DYz02f4jX5DU7by81SqSv1U eDyW2pgFe0A3K52vJB8EBdW5sR3IskS8SyW57BuFogt3KmtOeA9Tcb7AMcYJFmk9kG1yZF Z7hLO+6Vc2vi5HLduNMSzDXAvW8+cpw= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-523-oYMmTyqINfyJ3FfQmaYp_A-1; Mon, 13 Sep 2021 01:53:36 -0400 X-MC-Unique: oYMmTyqINfyJ3FfQmaYp_A-1 Received: by mail-wm1-f69.google.com with SMTP id x125-20020a1c3183000000b002e73f079eefso3575717wmx.0 for ; Sun, 12 Sep 2021 22:53:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=lmIEdzAE8KtfMvdI7Vd3u1eV+5W/XqJ3cF9Jvl0CpQM=; b=ChzcHxEnPsePsZ+3dGjr92q6tXKJw81drC0HS/eaWC5hftli1NYeVj/B1XDz1dIi9G vylKtXpA9zRtgPtz32XuS+nLsOpKIaQoz7LMU5HGvQ1byyi1YPgtZEz2aThWN5fUHXfq c2YL70gKscUcV0L0sJ9tUF4wFGZR/QXTbGuVGGCG/vR1F/5vzCXMEJAd38ACRD5z67YO Ctop8AyCDCaF/H6j+Ylu2lHzpHHXg9G2ZYn8xIzyHUYSLAt2X1oz034i9O5INS2vbTfg agcXNCSjcHcnRpnXBLd+/78jRnGERVXCyAafw1q0iT2kIro5ecvxgrzB2oyqaOuO9sAt MXCw== X-Gm-Message-State: AOAM533uP2BdZ4EnXDtL4WygOH08b9B54k5xGnBVXksGCt7qtPWM3EuD n7q713R1BPXZBqWBaXdvij1P8xb170ORKd/qRCWYcO/19x/p1mElwQ4HLqL5gspCO48cjQXtkHJ FIGi3NiJGS0l5QoT2QsYb6heq X-Received: by 2002:a7b:c4d2:: with SMTP id g18mr9470572wmk.135.1631512415168; Sun, 12 Sep 2021 22:53:35 -0700 (PDT) X-Received: by 2002:a7b:c4d2:: with SMTP id g18mr9470536wmk.135.1631512414954; Sun, 12 Sep 2021 22:53:34 -0700 (PDT) Received: from redhat.com ([2.55.27.174]) by smtp.gmail.com with ESMTPSA id k29sm5687574wms.24.2021.09.12.22.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 22:53:33 -0700 (PDT) Date: Mon, 13 Sep 2021 01:53:27 -0400 From: "Michael S. Tsirkin" To: Andi Kleen Cc: Dan Williams , "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 Subject: Re: [PATCH v4 11/15] pci: Add pci_iomap_shared{,_range} Message-ID: <20210913013815-mutt-send-email-mst@kernel.org> References: <20210829112105-mutt-send-email-mst@kernel.org> <09b340dd-c8a8-689c-4dad-4fe0e36d39ae@linux.intel.com> <20210829181635-mutt-send-email-mst@kernel.org> <3a88a255-a528-b00a-912b-e71198d5f58f@linux.intel.com> <20210830163723-mutt-send-email-mst@kernel.org> <69fc30f4-e3e2-add7-ec13-4db3b9cc0cbd@linux.intel.com> <20210910054044-mutt-send-email-mst@kernel.org> <20210911195006-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210911195006-mutt-send-email-mst@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 11, 2021 at 07:54:43PM -0400, Michael S. Tsirkin wrote: > On Fri, Sep 10, 2021 at 09:34:45AM -0700, Andi Kleen wrote: > > > > that's why > > > > an extra level of defense of ioremap opt-in is useful. > > > OK even assuming this, why is pci_iomap opt-in useful? > > > That never happens before probe - there's simply no pci_device then. > > > > > > Hmm, yes that's true. I guess we can make it default to opt-in for > > pci_iomap. > > > > It only really matters for device less ioremaps. > > OK. And same thing for other things with device, such as > devm_platform_ioremap_resource. > If we agree on all that, this will basically remove virtio > changes from the picture ;) Something else that was pointed out to me: fs->window_kaddr = devm_memremap_pages(&vdev->dev, pgmap); if (IS_ERR(fs->window_kaddr)) return PTR_ERR(fs->window_kaddr); looks like if we forget to set the shared flag then it will corrupt the DAX data? > -- > MST >