Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp902592lqb; Wed, 29 May 2024 14:14:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVB+RoMRF2+ZiKh0zAnV4SH4HrdwC0h5eRiHVgZ8U1AfWS0pBWxMZ9tYfw5Syb37XxnHoSQZzDDc6EQiuzIjFT1pEZmZftfGmI+Z0h0hg== X-Google-Smtp-Source: AGHT+IFlLNx99gifLunDo47iQXH+FvjL4bhUibpHQAFLFpmze3Qa7D2SDmHZrD4xcg+e5NWK9CBd X-Received: by 2002:a17:902:ea11:b0:1f5:5f0c:142c with SMTP id d9443c01a7336-1f619b2c6femr1620845ad.63.1717017269242; Wed, 29 May 2024 14:14:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717017269; cv=pass; d=google.com; s=arc-20160816; b=i3IC2aPFFArDebWGmadzQDyO/jSUj281wSVLZU9d5ewm9Vi14kYyV6In8s14pupY0x vgVVJCTyn1APBf6sHRepeF419Ayz1Gbz32WVE1lUr+Idvv5gIXwpkLu+3HmN7Lgf15sD FEUPwxjCYyqYcCGnzY59UtDqxrA2Zrq6jVGbhqwAXsUApvSsbY20URt5ueAIsjvJXwcO TP+8dxsbYVyfj2Mg3J+SYMsROueGelScGM19VhirItSFI7l7J8Edp0zB/1r3RGgulkxd m5IlZYcfoeKQihw6zh7Or/iWefbzICQ0/TVpWy0sxszSwmibcouV1mNhO7W3R4g/ObEW wzWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-filter; bh=dXiIrmdSV6YGWgsb6HsVTYKu3Nn4eD0Hhuc5MMdf2M0=; fh=Q7f/SQACUcIDYlS+NIbfykB4UztLYY5kgCBjxXbQWpo=; b=OPzoukujGuqHO2Ylqz5LxjFKaq8cF42NwfZV/TUR/K1JaAKCajfR+beyPi28KUUSAq VIVxluEv4HxH/WOwGDgs3fPPmtzHS9lxEtYjlWSOW3i49aXOSzLmj0loJlBo8vtVayQR 6QGsmWlxAHGL07Mb40OTSVMU6H8LvwA3NmZnCU9AyfvnjydyTV9D5cDpDrfHJi652msL sTPrct8VQ2EiWpN58YvbHpqhfQLaVC6ZB3mWBnYoTx49fiMGuZUW0Gh6RG/pKLg7iCvN sqHQjnlFUAsQ66NugUwooPB0VQlr4ovU2T26I9Qrwr9xLlvG+wH3zQlKvW/000d0CNqE f6lw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zytor.com header.s=2024051501 header.b=V94eJpoK; arc=pass (i=1 spf=pass spfdomain=zytor.com dkim=pass dkdomain=zytor.com dmarc=pass fromdomain=zytor.com); spf=pass (google.com: domain of linux-kernel+bounces-194696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9f33a4si106096635ad.587.2024.05.29.14.14.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 14:14:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2024051501 header.b=V94eJpoK; arc=pass (i=1 spf=pass spfdomain=zytor.com dkim=pass dkdomain=zytor.com dmarc=pass fromdomain=zytor.com); spf=pass (google.com: domain of linux-kernel+bounces-194696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7D49FB22F21 for ; Wed, 29 May 2024 21:13:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E19C01C8FDD; Wed, 29 May 2024 21:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="V94eJpoK" Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (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 870D81C68B0; Wed, 29 May 2024 21:12:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717017175; cv=none; b=fcWWyKnxqnjhrqNvaSEw1Rpv45RrAp039MfQJUtFfkYJGJNpl2f7AnQ0Rd4+ip2TgqnNatNfmp7ys2cVCCSgMTW5k6IQlxYLp8pdv0RkJlX6k077cGYjTzNYmF1csoewS8NBjDrjh3jyexx9xtYTPfiI7MyoniAwEfQKo8FmaQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717017175; c=relaxed/simple; bh=WyvJEaiV7vktTeJBx3VE7SviCdnt2j0L8vmtJoH9v9M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XYBbsndIDXJAgmy10P75sXalXB41br4uVSjPq96SBXYpnBXK0xY9O5nZe35UVY29m03zLcPJfwEvz9q7+ShE/sBGTb/802xyet3zBv5DYzw3n0Vk3oHKexlcOnZUQNXcu7F5cIY4xQkgnhTwTcCA3v7pPmR/4UrCb8uFKWww3Co= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=V94eJpoK; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Received: from [IPV6:2601:646:8002:4641:eb14:ad94:2806:1c1a] ([IPv6:2601:646:8002:4641:eb14:ad94:2806:1c1a]) (authenticated bits=0) by mail.zytor.com (8.17.2/8.17.1) with ESMTPSA id 44TLCPAl3724046 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Wed, 29 May 2024 14:12:25 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 44TLCPAl3724046 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2024051501; t=1717017146; bh=dXiIrmdSV6YGWgsb6HsVTYKu3Nn4eD0Hhuc5MMdf2M0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=V94eJpoK7Pauzv0PihWtJ9ZIjlxhYhPW3LzJ4ZdUYEZ5x2JJpvu2AER8MjThSsV+5 aWZkE6hqhCjBlYbJNlpCblhjdAGnNNmSuDYDimD6KZpsqo2jBglOso0H1ViDKxYJFQ pOwWgWCnA1nEY88n8C85KfBqvFfOSiW5a2jgc+yinW0WkEPWAmE4VXLcS44dil/OyY XwwdyFTQP2uzrlGYqwd5/YTkLOPgXLAaqrcQyAFzlQyQCN8mSTpdKdTOfcgXJRgxC6 B149MVWVAK2wZqsTEaQbZyAJCCDM1oxloJ8lXqT3DeDoG6NMDHGX93Y5IilCdg/34V B8FUZ3CKwM94Q== Message-ID: Date: Wed, 29 May 2024 14:12:19 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/6] x86/irq: Process nmi sources in NMI handler To: Jacob Pan , X86 Kernel , LKML , Thomas Gleixner , Dave Hansen , Ingo Molnar , Borislav Petkov , linux-perf-users@vger.kernel.org, Peter Zijlstra Cc: Andi Kleen , Xin Li References: <20240529203325.3039243-1-jacob.jun.pan@linux.intel.com> <20240529203325.3039243-5-jacob.jun.pan@linux.intel.com> Content-Language: en-US From: "H. Peter Anvin" In-Reply-To: <20240529203325.3039243-5-jacob.jun.pan@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. -hpa