Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp38932lqh; Thu, 30 May 2024 13:15:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2z8fYwPYTXxfGyiODnxwybfz7CLxYhRMarEwCu+DKNH/CwRN+dyimP+d28yhQbFelABN11RvbjrxG55ZpGPYkSBE2DljQm0xw7SOzZw== X-Google-Smtp-Source: AGHT+IHv+zpRS5N+ltIeQI4rgIgCgxmZAbbkZ6xRMyNUEfhw7fvxgH7m93vs9ltXlmrrIDh5+c10 X-Received: by 2002:a17:90b:818:b0:2c1:b6d5:9280 with SMTP id 98e67ed59e1d1-2c1b6d59416mr1924240a91.28.1717100152425; Thu, 30 May 2024 13:15:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717100152; cv=pass; d=google.com; s=arc-20160816; b=Mvao1bfGjDFM98LxmvLfkeqq+3bRE4RfuxgQ3x9xwmj7JaQnfQA9o1G4KaZRwn08V9 p7p2zo7kL4dsx/8AOJovm29I9rUPj8/v91Zj7SkHM0q/4j7KDKjwau0D5BdTPFglUp75 uAdRlL0DssaoyaIZgqaUBM+QRivigU+D96wgOQOQwZXRKfFwsPwLirZAUbhCX0/TNp64 qMb9AKycaSJBLHatt5uO0HTMizAI6dMTJy/X2Vwl+tgj176egE6Gkv1CANlLdc77T6X4 xJbiWSuew2BYSAZEcUxLyFf+pZi7d0xNBNvSsqmtBpdasVMwiw43oYIOPOKc6822s+HW 5OcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=djJYygeUIYPud8nrZcCuX7bG+/+0euBUPEKEWJxfVV4=; fh=DWRNVZAG/xWnZiEERVjNX2xs334Sqj2HplfHxM6ebpQ=; b=o9soDjQ7CDc9B/XPWv/i012nVrz0mgr4HF7qF/Mln+tYHOIynbE1qsR2mAlLLz6R2z +LV/oG3qbhSQB+OJxEldwtkE3Bulxg7FGx6XfLRaub5J+cHZNpts8o4EpNhDezS5Am1a mHtXZI0TmMo82b6k0J+CV/NsoFqYG0NnIV2fUqCmkl3AIEOdPBrf1bPz9kFwZ2uZ3Wpe lnr1bsLrvVcvwL99y0A++h5TeXUyzMJkgxJW7aVd+LXCLaQ1Wx/7BNB4csl/mLqdwjfr pGf215VYB6UVu6dWwFyBDm9WuiSvGsufUfr1YkikPaBcFDMoU3r+6eO0qb5XgrI5uPzh H9Kw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cbmBwfln; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195758-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1c27ca33csi249077a91.70.2024.05.30.13.15.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 13:15:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cbmBwfln; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195758-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5865B2898F4 for ; Thu, 30 May 2024 17:47:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75E4047A7A; Thu, 30 May 2024 17:47:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cbmBwfln" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3000D219FD; Thu, 30 May 2024 17:47:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717091269; cv=none; b=rQbptnowZpZhkqHTax/aRwqUHXySaN48RaTZ+0ANFNbOuX4bb0SCFjvD3WUcSga3+vfDxEvtT7N47ytfzCwdeob9h1h2SiTi0SxCN0YRaNQcnDzDH8TDGZfnX+UMjLYVONWZk+4PDpF29RDyZC7PRycPLSLj+/6XUId3sdhUM7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717091269; c=relaxed/simple; bh=qErOKC7ofurrzhpbYIzzbA8eWtCnbIEmsnOdRx6pC9g=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=smU+DVgqNZuLNv6JKwhTjWzmAypsoaWMIO0Y6Y1cJe/7uc7D+O3JBBahiak/aS5AnT6GQV+6uOt+A2qHT/Ui8pKM7l+/luUUasiZie6oHDKJ6ABbZns+PyiXEcguhruTy08hoCu1lh76RlibFALMaXEWZz/3CUm2VkPhemboNaA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cbmBwfln; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717091268; x=1748627268; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qErOKC7ofurrzhpbYIzzbA8eWtCnbIEmsnOdRx6pC9g=; b=cbmBwflnTNKLfvCGdcMM60ZJIt54TcsdSIpCakYKlusIow6zjg/U58D1 yqxKPcI8AFAk9bajjh0B0LIMpnGgBeyMfNH7e5P+VieQEXBRYzQBRYdSc Et16yXifj12Zb3dcG+gc1VRua+6V46lKVqqhqF3W6BQu7w+LDYT3AB/Ac nbiaMD6rnRpDEFVUMYxj+BMB+BCLQXTK70z6k7byyfGmwBAxvv+4il08M 3uy/A0HjC/Dv+5eC5lt4wzQhXmsiwuBkvimSjhwxvBXsZcXnbflWvHJEZ 4olqJ3HiE2k7A5HicwPf1ZTO0bNE4uQXC++7ZV/D0MGRekMkziK7uRNbR A==; X-CSE-ConnectionGUID: h8CgcEu5TiKYqfimOCAh+g== X-CSE-MsgGUID: 0XgHeQevTHuC67ZRHE9xLw== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13558328" X-IronPort-AV: E=Sophos;i="6.08,202,1712646000"; d="scan'208";a="13558328" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 10:47:48 -0700 X-CSE-ConnectionGUID: +uczZK5oQmq5U8tU3TgYCQ== X-CSE-MsgGUID: HdRkl5sHQWGqz3aeN078JQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,202,1712646000"; d="scan'208";a="40954905" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.54.39.125]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 10:47:47 -0700 Date: Thu, 30 May 2024 10:52:44 -0700 From: Jacob Pan To: "H. Peter Anvin" Cc: X86 Kernel , LKML , Thomas Gleixner , Dave Hansen , Ingo Molnar , Borislav Petkov , linux-perf-users@vger.kernel.org, Peter Zijlstra , Andi Kleen , Xin Li , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH 4/6] x86/irq: Process nmi sources in NMI handler Message-ID: <20240530105244.46090c04@jacob-builder> In-Reply-To: References: <20240529203325.3039243-1-jacob.jun.pan@linux.intel.com> <20240529203325.3039243-5-jacob.jun.pan@linux.intel.com> Organization: OTC X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi Peter, On Wed, 29 May 2024 14:12:19 -0700, "H. Peter Anvin" wrote: > On 5/29/24 13:33, Jacob Pan wrote: > > + > > + rcu_read_lock(); > > + /* Bit 0 is for unknown NMI sources, skip it. */ > > + for_each_set_bit_from(vec, &source_bitmask, > > NR_NMI_SOURCE_VECTORS) { > > + a = rcu_dereference(nmiaction_src_table[vec]); > > + if (!a) { > > + pr_warn_ratelimited("NMI received %d no > > handler", vec); > > + continue; > > + } > > In this case, you should assume some chipset hardware or VMM is giving > you garbage in the event bitmask, and treat it as if bit 0 were set. > right, should return 0 and poll all handlers. Thanks, Jacob