From: Wei Liu <wei.liu@kernel.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
Long Li <longli@microsoft.com>, Thomas Gleixner <tglx@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, linux-hyperv@vger.kernel.org,
linux-kernel@vger.kernel.org,
Florian Bezdeka <florian.bezdeka@siemens.com>,
RT <linux-rt-users@vger.kernel.org>,
Mitchell Levy <levymitchell0@gmail.com>
Subject: Re: [PATCH] x86: mshyperv: Use kthread for vmbus interrupts on PREEMPT_RT
Date: Wed, 4 Feb 2026 07:00:04 +0000 [thread overview]
Message-ID: <20260204070004.GM79272@liuwe-devbox-debian-v2.local> (raw)
In-Reply-To: <133a95d9-8148-40ea-9acc-edfd8e3ceef4@siemens.com>
On Tue, Feb 03, 2026 at 05:01:30PM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Resolves the following lockdep report when booting PREEMPT_RT on Hyper-V
> with related guest support enabled:
So all it takes to reproduce this is to enabled PREEMPT_RT?
Asking because ...
> struct pt_regs *old_regs = set_irq_regs(regs);
> @@ -158,8 +196,12 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_hyperv_callback)
> if (mshv_handler)
> mshv_handler();
... to err on the safe side we should probably do the same for
mshv_handler as well.
Note we don't support RT yet, but if issues are found we might as well
just fix them up.
How urgent do you want this patch to get applied?
Thanks,
Wei
>
> - if (vmbus_handler)
> - vmbus_handler();
> + if (vmbus_handler) {
> + if (IS_ENABLED(CONFIG_PREEMPT_RT))
> + vmbus_irqd_wake();
> + else
> + vmbus_handler();
> + }
>
> if (ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED)
> apic_eoi();
> @@ -174,6 +216,10 @@ void hv_setup_mshv_handler(void (*handler)(void))
>
> void hv_setup_vmbus_handler(void (*handler)(void))
> {
> + if (IS_ENABLED(CONFIG_PREEMPT_RT) && !vmbus_irq_initialized) {
> + BUG_ON(smpboot_register_percpu_thread(&vmbus_irq_threads));
> + vmbus_irq_initialized = true;
> + }
> vmbus_handler = handler;
> }
>
> @@ -181,6 +227,8 @@ void hv_remove_vmbus_handler(void)
> {
> /* We have no way to deallocate the interrupt gate */
> vmbus_handler = NULL;
> + smpboot_unregister_percpu_thread(&vmbus_irq_threads);
> + vmbus_irq_initialized = false;
> }
>
> /*
> --
> 2.51.0
next prev parent reply other threads:[~2026-02-04 7:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 16:01 [PATCH] x86: mshyperv: Use kthread for vmbus interrupts on PREEMPT_RT Jan Kiszka
2026-02-04 7:00 ` Wei Liu [this message]
2026-02-04 7:19 ` Jan Kiszka
2026-02-04 7:26 ` Jan Kiszka
2026-02-04 7:29 ` Wei Liu
2026-02-04 7:32 ` Jan Kiszka
2026-02-04 7:36 ` Wei Liu
2026-02-04 13:04 ` Jan Kiszka
2026-02-06 7:32 ` Naman Jain
2026-02-05 14:12 ` Bezdeka, Florian
2026-02-05 18:55 ` Michael Kelley
2026-02-06 6:40 ` Jan Kiszka
2026-02-07 1:30 ` Michael Kelley
2026-02-09 10:35 ` Florian Bezdeka
2026-02-09 18:25 ` Michael Kelley
2026-02-12 16:06 ` Jan Kiszka
2026-02-12 16:22 ` Michael Kelley
2026-02-13 21:35 ` mhklkml
2026-02-16 12:24 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260204070004.GM79272@liuwe-devbox-debian-v2.local \
--to=wei.liu@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=decui@microsoft.com \
--cc=florian.bezdeka@siemens.com \
--cc=haiyangz@microsoft.com \
--cc=jan.kiszka@siemens.com \
--cc=kys@microsoft.com \
--cc=levymitchell0@gmail.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=mingo@redhat.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox