From: Jork Loeser <jloeser@linux.microsoft.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Michael Kelley <mhklinux@outlook.com>,
Arnd Bergmann <arnd@kernel.org>,
"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>,
"Anirudh Rayabharam (Microsoft)" <anirudh@anirudhrb.com>,
Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mshv: add vmbus dependency
Date: Wed, 20 May 2026 10:13:40 -0700 (PDT) [thread overview]
Message-ID: <63d0f4ce-f07c-c426-306d-147fd81d2e8e@linux.microsoft.com> (raw)
In-Reply-To: <56938994-3795-415a-8be3-16e28236082b@app.fastmail.com>
On Wed, 20 May 2026, Arnd Bergmann wrote:
> On Wed, May 20, 2026, at 15:46, Michael Kelley wrote:
>> From: Arnd Bergmann <arnd@kernel.org> Sent: Wednesday, May 20, 2026 12:40 AM
>>>
>>> When the vmbus driver is not part of the kernel, the mvhv_root
>>> driver now fails to link:
>>>
>>> ERROR: modpost: "hv_vmbus_exists" [drivers/hv/mshv_root.ko] undefined!
>>>
>>> Avoid this by adding an explicit Kconfig dependency. Note that
>>> stubbing out the hv_vmbus_exists() based on configuration would
>>> also work for some cases, but not with MSHV_ROOT=y and HYPERV_VMBUS=m.
>>
>> Conceptually, the MSHV root code should not have a dependency on
>> VMBus. The "does VMBus exist?" question should handled differently
>> by setting up a boolean in the core Hyper-V code that defaults to "false".
>> If the VMBus driver loads, it would set the boolean to "true". MSHV
>> root code would query the boolean.
>
> That makes sense to me, but it's outside of my area for a drive-by
> build fix. Please treat my patch as a 'Reported-by' then, I expect
> this can easily be addressed by Jork or someone else in the
> hyperv team.
Apologies for letting this linger - we were looking for the best fix
internally. While Michael is correct that conceptually the dependency is
not ideal, I think it's the right fix *for now*.
Yes, this would not allow MSHV root without VMBUS, which is relevant for
MSHV root only, which misses a few other components. For L1VH it is the
right fix that also enforces module load order.
Ultimately (and this is planned), we need a SYNIC driver, and the
hv_vmbus_exists() will vanish for this usecase. It is a hack even now.
Best,
Jork
next prev parent reply other threads:[~2026-05-20 17:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 7:40 [PATCH] mshv: add vmbus dependency Arnd Bergmann
2026-05-20 13:46 ` Michael Kelley
2026-05-20 13:51 ` Arnd Bergmann
2026-05-20 17:13 ` Jork Loeser [this message]
2026-05-20 17:15 ` Jork Loeser
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=63d0f4ce-f07c-c426-306d-147fd81d2e8e@linux.microsoft.com \
--to=jloeser@linux.microsoft.com \
--cc=anirudh@anirudhrb.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=mhklinux@outlook.com \
--cc=skinsburskii@linux.microsoft.com \
--cc=wei.liu@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