From: Jork Loeser <[email protected]> Sent: Thursday, May 21, 2026 2:20 PM > > On Thu, 21 May 2026, Michael Kelley wrote: > > > From: Michael Kelley <[email protected]> > > > * Add #ifdefs around MSHV SynIC calls to hv_vmbus_exists(). When > > Could as well do an empty definition of hv_vmbus_exists() if VMBUS is not > configured, no?
Yes, indeed. I would have done that if there were more than 2 places where hv_vmbus_exists() is called. For me, having exactly 2 places was on the tipping point of testing CONFIG_HYPERV_VMBUS inline vs. adding the test in a .h file. Thinking about it more, I'll try the .h file route in a v2. That way mshv_synic.c doesn't have to be touched at all. Michael > > > diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig > > index 2d0b3fcb0ff8..aa11bcefddf2 100644 > > --- a/drivers/hv/Kconfig > > +++ b/drivers/hv/Kconfig > > @@ -74,6 +74,7 @@ config MSHV_ROOT > > # e.g. When withdrawing memory, the hypervisor gives back 4k pages in > > # no particular order, making it impossible to reassemble larger pages > > depends on PAGE_SIZE_4KB > > + depends on HYPERV_VMBUS if HYPERV_VMBUS > > Nice, thanks! > > Reviewed-by: Jork Loeser <[email protected]>

