diff mbox

[net-next,1/3] VMCI: only load on VMware hypervisor

Message ID KL1P15301MB0008FB89237C3BB7A6D2BB39BF820@KL1P15301MB0008.APCP153.PROD.OUTLOOK.COM
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Dexuan Cui Aug. 16, 2017, 6:51 p.m. UTC
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Wednesday, August 16, 2017 11:07
> 
> From: Dexuan Cui <decui@microsoft.com>
> Date: Tue, 15 Aug 2017 22:13:29 +0000
> 
> > +	/*
> > +	 * Check if we are running on VMware's hypervisor and bail out
> > +	 * if we are not.
> > +	 */
> > +	if (x86_hyper != &x86_hyper_vmware)
> > +		return -ENODEV;
> 
> This symbol is only available when CONFIG_HYPERVISOR_GUEST is defined.
> But this driver does not have a Kconfig dependency on that symbol so
> the build can fail in some configurations.

Hi David,
It looks typically modern Linux distros have CONFIG_HYPERVISOR_GUEST=y
by default, but I agree here we should make the dependency explicit:


And it looks it's not a bad thing to add the dependency, because some
existing VMWare drivers have had the dependency on CONFIG_HYPERVISOR_GUEST=y:
drivers/input/mouse/vmmouse.c (MOUSE_PS2_VMMOUSE)
drivers/misc/vmw_balloon.c (VMWARE_BALLOON)

Do you want me to submit a v2 for this patch with the Kconfig change?

-- Dexuan

Comments

David Miller Aug. 16, 2017, 6:54 p.m. UTC | #1
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 16 Aug 2017 18:51:36 +0000

> It looks typically modern Linux distros have CONFIG_HYPERVISOR_GUEST=y
> by default

It doesn't matter what any distribution does or does not do.

People are going to do 'randconfig' builds over thousands and
thousands of configuration combinations to test your changes,
and those tests will fail.

> Do you want me to submit a v2 for this patch with the Kconfig change?

Of course, there is no way I can apply your series as-is.
diff mbox

Patch

--- a/drivers/misc/vmw_vmci/Kconfig
+++ b/drivers/misc/vmw_vmci/Kconfig
@@ -4,7 +4,7 @@ 

 config VMWARE_VMCI
        tristate "VMware VMCI Driver"
-       depends on X86 && PCI
+       depends on X86 && PCI && HYPERVISOR_GUEST
        help
          This is VMware's Virtual Machine Communication Interface.  It enables
          high-speed communication between host and guest in a virtual