From nobody Sun Feb 8 09:23:04 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A714C7EE23 for ; Thu, 8 Jun 2023 15:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235638AbjFHP4s (ORCPT ); Thu, 8 Jun 2023 11:56:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235920AbjFHP4q (ORCPT ); Thu, 8 Jun 2023 11:56:46 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29E692D78; Thu, 8 Jun 2023 08:56:19 -0700 (PDT) Date: Thu, 08 Jun 2023 15:56:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686239768; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tuM5H6dKcVbkf17tJtrD+wwLgAEUVhTL/oSDY8dt4fU=; b=ToWxqc6om6LA3T9lhScIy3vQiKfQJAA8wPHMnZDWjweWTqVzTlhjjBNwvCh+BIoHhBvMzW 1yjQNZ39FD7jYpLwbgTOsXWcAXIUIJyAMcefH2HFMDX1s7sv8oOW+4Cl3tvzTnaFF98jc7 aaPvQLAQLPl9r0YlqBYmQkQA8KwIMuzuNsdLjAGyfgT+Vjuc4iFRtJnfq3JxmnYoWr0bmD xiwtf3Xhyt/STUy+6UCS9u8yMuY/CEl2gaE5yU68vBMmPXuTyjEjbxX3EqILeeRaPAzZ1t 8xXgaYDN+7PxoqWf4fOhdB1RQYGE7XitMNyiiqzZ6YVXOL8E2u7hPNZcO6w7fQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686239768; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tuM5H6dKcVbkf17tJtrD+wwLgAEUVhTL/oSDY8dt4fU=; b=PfW4JI9Wd/DUJF993JhbL/8kD2J8OldbhzzEnZwcF8zkTY05sVRJkyDcl4aZW3RdexwAUi TZcrtXVrwUcJh6Aw== From: "tip-bot2 for Michael Kelley" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/irq] x86/irq: Add hardcoded hypervisor interrupts to /proc/stat Cc: Michael Kelley , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <168623976753.404.15778077002111483150.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/irq branch of tip: Commit-ID: 504dba50b0c3fa02ec513d7d0405ddffba2d1c0a Gitweb: https://git.kernel.org/tip/504dba50b0c3fa02ec513d7d0405ddffb= a2d1c0a Author: Michael Kelley AuthorDate: Mon, 27 Feb 2023 10:46:08 -08:00 Committer: Dave Hansen CommitterDate: Thu, 08 Jun 2023 08:28:08 -07:00 x86/irq: Add hardcoded hypervisor interrupts to /proc/stat Some hypervisor interrupts (such as for Hyper-V VMbus and Hyper-V timers) have hardcoded interrupt vectors on x86 and don't have Linux IRQs assigned. These interrupts are shown in /proc/interrupts, but are not reported in the first field of the "intr" line in /proc/stat because the x86 version of arch_irq_stat_cpu() doesn't include them. Fix this by adding code to arch_irq_stat_cpu() to include these interrupts, similar to existing interrupts that don't have Linux IRQs. Use #if IS_ENABLED() because unlike all the other nearby #ifdefs, CONFIG_HYPERV can be built as a module. Signed-off-by: Michael Kelley Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/1677523568-50263-1-git-send-email-mikelle= y%40microsoft.com --- arch/x86/kernel/irq.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 766ffe3..9f668d2 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -211,6 +211,13 @@ u64 arch_irq_stat_cpu(unsigned int cpu) #ifdef CONFIG_X86_MCE_THRESHOLD sum +=3D irq_stats(cpu)->irq_threshold_count; #endif +#ifdef CONFIG_X86_HV_CALLBACK_VECTOR + sum +=3D irq_stats(cpu)->irq_hv_callback_count; +#endif +#if IS_ENABLED(CONFIG_HYPERV) + sum +=3D irq_stats(cpu)->irq_hv_reenlightenment_count; + sum +=3D irq_stats(cpu)->hyperv_stimer0_count; +#endif #ifdef CONFIG_X86_MCE sum +=3D per_cpu(mce_exception_count, cpu); sum +=3D per_cpu(mce_poll_count, cpu);