mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Michael Kelley <mhklinux@outlook.com>,
	Florian Bezdeka <florian.bezdeka@siemens.com>,
	"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" <x86@kernel.org>
Cc: "linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	RT <linux-rt-users@vger.kernel.org>,
	Mitchell Levy <levymitchell0@gmail.com>,
	"skinsburskii@linux.microsoft.com"
	<skinsburskii@linux.microsoft.com>,
	"mrathor@linux.microsoft.com" <mrathor@linux.microsoft.com>,
	"anirudh@anirudhrb.com" <anirudh@anirudhrb.com>,
	"schakrabarti@linux.microsoft.com"
	<schakrabarti@linux.microsoft.com>,
	"ssengar@linux.microsoft.com" <ssengar@linux.microsoft.com>
Subject: Re: [PATCH] x86: mshyperv: Use kthread for vmbus interrupts on PREEMPT_RT
Date: Thu, 12 Feb 2026 17:06:04 +0100	[thread overview]
Message-ID: <b084a7b6-c394-4337-82cd-8b9cb911d8d5@siemens.com> (raw)
In-Reply-To: <SN6PR02MB4157DB59F0F7BFBF56612651D465A@SN6PR02MB4157.namprd02.prod.outlook.com>

On 09.02.26 19:25, Michael Kelley wrote:
> From: Florian Bezdeka <florian.bezdeka@siemens.com> Sent: Monday, February 9, 2026 2:35 AM
>>
>> On Sat, 2026-02-07 at 01:30 +0000, Michael Kelley wrote:
>>
>> [snip]
>>>
>>> I've run your suggested experiment on an arm64 VM in the Azure cloud. My
>>> kernel was linux-next 20260128. I set CONFIG_PREEMPT_RT=y and
>>> CONFIG_PROVE_LOCKING=y, but did not add either of your two patches
>>> (neither the storvsc driver patch nor the x86 VMBus interrupt handling patch).
>>> The VM comes up and runs, but with this warning during boot:
>>>
>>> [    3.075604] hv_utils: Registering HyperV Utility Driver
>>> [    3.075636] hv_vmbus: registering driver hv_utils
>>> [    3.085920] =============================
>>> [    3.088128] hv_vmbus: registering driver hv_netvsc
>>> [    3.091180] [ BUG: Invalid wait context ]
>>> [    3.093544] 6.19.0-rc7-next-20260128+ #3 Tainted: G            E
>>> [    3.097582] -----------------------------
>>> [    3.099899] systemd-udevd/284 is trying to lock:
>>> [    3.102568] ffff000100e24490 (&channel->sched_lock){....}-{3:3}, at: vmbus_chan_sched+0x128/0x3b8 [hv_vmbus]
>>> [    3.108208] other info that might help us debug this:
>>> [    3.111454] context-{2:2}
>>> [    3.112987] 1 lock held by systemd-udevd/284:
>>> [    3.115626]  #0: ffffd5cfc20bcc80 (rcu_read_lock){....}-{1:3}, at: vmbus_chan_sched+0xcc/0x3b8 [hv_vmbus]
>>> [    3.121224] stack backtrace:
>>> [    3.122897] CPU: 0 UID: 0 PID: 284 Comm: systemd-udevd Tainted: G            E  6.19.0-rc7-next-20260128+ #3 PREEMPT_RT
>>> [    3.129631] Tainted: [E]=UNSIGNED_MODULE
>>> [    3.131946] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 06/10/2025
>>> [    3.138553] Call trace:
>>> [    3.140015]  show_stack+0x20/0x38 (C)
>>> [    3.142137]  dump_stack_lvl+0x9c/0x158
>>> [    3.144340]  dump_stack+0x18/0x28
>>> [    3.146290]  __lock_acquire+0x488/0x1e20
>>> [    3.148569]  lock_acquire+0x11c/0x388
>>> [    3.150703]  rt_spin_lock+0x54/0x230
>>> [    3.152785]  vmbus_chan_sched+0x128/0x3b8 [hv_vmbus]
>>> [    3.155611]  vmbus_isr+0x34/0x80 [hv_vmbus]
>>> [    3.158093]  vmbus_percpu_isr+0x18/0x30 [hv_vmbus]
>>> [    3.160848]  handle_percpu_devid_irq+0xdc/0x348
>>> [    3.163495]  handle_irq_desc+0x48/0x68
>>> [    3.165851]  generic_handle_domain_irq+0x20/0x38
>>> [    3.168664]  gic_handle_irq+0x1dc/0x430
>>> [    3.170868]  call_on_irq_stack+0x30/0x70
>>> [    3.173161]  do_interrupt_handler+0x88/0xa0
>>> [    3.175724]  el1_interrupt+0x4c/0xb0
>>> [    3.177855]  el1h_64_irq_handler+0x18/0x28
>>> [    3.180332]  el1h_64_irq+0x84/0x88
>>> [    3.182378]  _raw_spin_unlock_irqrestore+0x4c/0xb0 (P)
>>> [    3.185493]  rt_mutex_slowunlock+0x404/0x440
>>> [    3.187951]  rt_spin_unlock+0xb8/0x178
>>> [    3.190394]  kmem_cache_alloc_noprof+0xf0/0x4f8
>>> [    3.193100]  alloc_empty_file+0x64/0x148
>>> [    3.195461]  path_openat+0x58/0xaa0
>>> [    3.197658]  do_file_open+0xa0/0x140
>>> [    3.199752]  do_sys_openat2+0x190/0x278
>>> [    3.202124]  do_sys_open+0x60/0xb8
>>> [    3.204047]  __arm64_sys_openat+0x2c/0x48
>>> [    3.206433]  invoke_syscall+0x6c/0xf8
>>> [    3.208519]  el0_svc_common.constprop.0+0x48/0xf0
>>> [    3.211050]  do_el0_svc+0x24/0x38
>>> [    3.212990]  el0_svc+0x164/0x3c8
>>> [    3.214842]  el0t_64_sync_handler+0xd0/0xe8
>>> [    3.217251]  el0t_64_sync+0x1b0/0x1b8
>>> [    3.219450] hv_utils: Heartbeat IC version 3.0
>>> [    3.219471] hv_utils: Shutdown IC version 3.2
>>> [    3.219844] hv_utils: TimeSync IC version 4.0
>>
>> That matches with my expectation that the same problem exists on arm64.
>> The patch from Jan addresses that issue for x86 (only, so far) as we do
>> not have a working test environment for arm64 yet.
> 
> OK. I had understood Jan's earlier comments to mean that the VMBus
> interrupt problem was implicitly solved on arm64 because of VMBus using
> a standard Linux IRQ on arm64. But evidently that's not the case. So my
> earlier comment stands: The code changes should go into the architecture
> independent portion of the VMBus driver, and not under arch/x86. I
> can probably work with you to test on arm64 if need be.
> 

I can move the code, sure, but I still haven't understood what
invalidates my assumptions (beside what you observed). vmbus_drv calls
request_percpu_irq, and that is - as far as I can see - not injecting
IRQF_NO_THREAD. Any explanations welcome.

Reproduction is still not possible for me. I was playing a bit with qemu
in the hope to make it provide its minimal vmbus support (for
ballooning), but that was not yet successful on arm64.

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center

  reply	other threads:[~2026-02-12 16:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 16:01 Jan Kiszka
2026-02-04  7:00 ` Wei Liu
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 [this message]
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=b084a7b6-c394-4337-82cd-8b9cb911d8d5@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=anirudh@anirudhrb.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=haiyangz@microsoft.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=mhklinux@outlook.com \
    --cc=mingo@redhat.com \
    --cc=mrathor@linux.microsoft.com \
    --cc=schakrabarti@linux.microsoft.com \
    --cc=skinsburskii@linux.microsoft.com \
    --cc=ssengar@linux.microsoft.com \
    --cc=tglx@kernel.org \
    --cc=wei.liu@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

all inboxes | Powered by JetHome®