Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4298853pxb; Thu, 14 Oct 2021 02:28:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlCc+vN/eFKuSwPsOb+8e0AzuNRNwpaBkaQJbwaWvfg2BxHXOL6xCd7VRaIzHepQUoTyHN X-Received: by 2002:a05:6a00:a10:b0:412:448c:89c7 with SMTP id p16-20020a056a000a1000b00412448c89c7mr4283151pfh.83.1634203729558; Thu, 14 Oct 2021 02:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634203729; cv=none; d=google.com; s=arc-20160816; b=LzEMKJRCyTjs9IaKww8G+wtQ9Cn7khc0AacF9CNXbYlT+hk8Wi85vgSxMiOWDaZNRi PJmdZ2LjIRfuGWtI/m3PUs+pXA5/dJMOtbIG1EV73ClYe71KNxw745DH+R3Axmd6209S Au9LT38iCM6s++V67zRf0MNQbR7rpJNwFEsOn7mVf++wQxS5ITTPu9ECbrh+9E/8TcDO az+0UdltajB57t42IHqj6mNRxu2zgrtveRh44ydm/HsNTt28xOZ1WrGE+PL+d411cFjR /h7lgnnyK4p6k1fwAftfL7JHtL5Lm1+Rr0e16mImthr2qUBwagFwvcZlLOCYGPomRoyv pirw== 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=MFy26Kc6cpLu18LAs5Mx0Nrg8iL3DuTgZC2Ev14vjlo=; b=JuOW1Z1aRWaPCI55OEhq5NTnLvUmSxkSgLAHNi07sQAApnRHt02MJSQ0qQ4f21MPab 2sDiMZp6CFKclP1erz6eRiHCkTfk4vNsgDms+64xlq9dks4kJio+k5RphWpr0PpFpRML NKZItExCUVeYRTYP/vNz9KJeu3ds8bry2286S6wmBHItSKt6oxqFYJHIeDvtwrWAb0sI /t2gVte8kUgIrS3NJD2uAkM5uaYkXW5HOxyQE2VE3lAYG1i+Z9kfP2TzSq0XXebiisZX bBLAp+uMTxJZv7FQ6x/9Pb4iMTsnEK1Y8ttj85Y+mWGtR/ecCgpwSxnPyYZV0SzEuEnP 2B3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X2mCdv8b; 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 k16si2135627pfu.361.2021.10.14.02.28.35; Thu, 14 Oct 2021 02:28:49 -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=X2mCdv8b; 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 S229967AbhJNJ2g (ORCPT + 99 others); Thu, 14 Oct 2021 05:28:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26262 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230051AbhJNJ2f (ORCPT ); Thu, 14 Oct 2021 05:28:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634203590; 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=MFy26Kc6cpLu18LAs5Mx0Nrg8iL3DuTgZC2Ev14vjlo=; b=X2mCdv8b1K88eBKlnWLq69ctpJUgvxcadvamxM/mn99+T+jMO3aioYuoqC+npqMg6NSXb9 DjbnOYauRoO0F+uJ1Fd4TTsFKj80Qh9YoDcsBGmIU0Z53054RrYn3NRQVR6ZKRRpPpdlZw t/YBQ7/WS+kpUFDtv2YGdeKj9M2YW4E= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-490-Vy0qd3RzNci4qAjHzM20uA-1; Thu, 14 Oct 2021 05:26:29 -0400 X-MC-Unique: Vy0qd3RzNci4qAjHzM20uA-1 Received: by mail-ed1-f72.google.com with SMTP id r11-20020aa7cfcb000000b003d4fbd652b9so4639582edy.14 for ; Thu, 14 Oct 2021 02:26:28 -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=MFy26Kc6cpLu18LAs5Mx0Nrg8iL3DuTgZC2Ev14vjlo=; b=L/k03Nr7NF6wcmDINklVjjgZApe/I23M4bfGmH2L7i43w/gCFqR9lnhOS+IrpEXMIx E4F95SFDY8tWilfdFK+f13TJa1iS1s02iR6pi8N4tN+JvFQf8jd1NvHJZhwSG3NeA4oy wW1tF4wOilvGqhsGcfjpqNTOY5X5KyqKpbC9X5E/KAJ1HKTejrDj8+VK3jEF3UD1FOtq XKbTEFoFC9WUSn62f4p4rVZkURFjVMlTxqQp5OZVhKhh7paLOoFHT6sFyRmeCHIXv/2e mS9SUj+NLiL0xZN48FwKcZuMO1LWT4423Rx78LIi2Pxwrm8UDv7fWI5TF+SUMYLzKEUC CwSA== X-Gm-Message-State: AOAM532YlHoDsfIVa8tMQD3AJR9+ANpfZmwUCCLSXP5MybagASQnBV6u 9KYzWHlfVsnMUUutMK+q+10y07GVxGbP9ULDrQqhtlc47NfA/lMzIl62Uajq+UKS0KBUjilBdoa PZagNgG5IbsWxmH0b/EFTmJAZ X-Received: by 2002:a05:6402:3488:: with SMTP id v8mr6898721edc.106.1634203588044; Thu, 14 Oct 2021 02:26:28 -0700 (PDT) X-Received: by 2002:a05:6402:3488:: with SMTP id v8mr6898699edc.106.1634203587836; Thu, 14 Oct 2021 02:26:27 -0700 (PDT) Received: from redhat.com ([2.55.16.227]) by smtp.gmail.com with ESMTPSA id f19sm1749252edj.77.2021.10.14.02.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Oct 2021 02:26:27 -0700 (PDT) Date: Thu, 14 Oct 2021 05:26:20 -0400 From: "Michael S. Tsirkin" To: "Reshetova, Elena" Cc: Andi Kleen , "Williams, Dan J" , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra , "Lutomirski, Andy" , 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 , "Hansen, Dave" , "Luck, Tony" , 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 v5 12/16] PCI: Add pci_iomap_host_shared(), pci_iomap_host_shared_range() Message-ID: <20211014052605-mutt-send-email-mst@kernel.org> 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> <20211012171016-mutt-send-email-mst@kernel.org> <20211014025514-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 14, 2021 at 07:27:42AM +0000, Reshetova, Elena wrote: > > On Thu, Oct 14, 2021 at 06:32:32AM +0000, Reshetova, Elena wrote: > > > > On Tue, Oct 12, 2021 at 06:36:16PM +0000, Reshetova, Elena wrote: > > > > > > The 5.15 tree has something like ~2.4k IO accesses (including MMIO and > > > > > > others) in init functions that also register drivers (thanks Elena for > > > > > > the number) > > > > > > > > > > To provide more numbers on this. What I can see so far from a smatch-based > > > > > analysis, we have 409 __init style functions (.probe & builtin/module_ > > > > > _platform_driver_probe excluded) for 5.15 with allyesconfig. > > > > > > > > I don't think we care about allyesconfig at all though. > > > > Just don't do that. > > > > How about allmodconfig? This is closer to what distros actually do. > > > > > > It does not make any difference really for the content of the /drivers/*: > > > gives 408 __init style functions doing IO (.probe & builtin/module_ > > > > > _platform_driver_probe excluded) for 5.15 with allmodconfig: > > > > > > ['doc200x_ident_chip', > > > 'doc_probe', 'doc2001_init', 'mtd_speedtest_init', > > > 'mtd_nandbiterrs_init', 'mtd_oobtest_init', 'mtd_pagetest_init', > > > 'tort_init', 'mtd_subpagetest_init', 'fixup_pmc551', > > > 'doc_set_driver_info', 'init_amd76xrom', 'init_l440gx', > > > 'init_sc520cdp', 'init_ichxrom', 'init_ck804xrom', 'init_esb2rom', > > > 'probe_acpi_namespace_devices', 'amd_iommu_init_pci', 'state_next', > > > 'arm_v7s_do_selftests', 'arm_lpae_run_tests', 'init_iommu_one', > > > > Um. ARM? Which architecture is this build for? > > The list of smatch IO findings is built for x86, but the smatch cross function > database covers all archs, so when queried for all potential function callers, > it would show non x86 arch call chains also. > > Here is the original x86 finding and call chain for the 'arm_v7s_do_selftests': > > Detected low-level IO from arm_v7s_do_selftests in fun > __iommu_queue_command_sync > > drivers/iommu/amd/iommu.c:1025 __iommu_queue_command_sync() error: > {15002074744551330002} > 'check_host_input' read from the host using function 'readl' to a > member of the structure 'iommu->cmd_buf_head'; > > __iommu_queue_command_sync() > iommu_completion_wait() > amd_iommu_domain_flush_complete() > iommu_v1_map_page() > arm_v7s_do_selftests() > > So, the results can be further filtered if you want a specified arch. So what is it just for x86? Could you tell? -- MST