On Wed, 20 May 2026, Arnd Bergmann wrote:

On Wed, May 20, 2026, at 15:46, Michael Kelley wrote:
From: Arnd Bergmann <[email protected]> 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


Reply via email to