Skip to contentSkip to conversation

vbox: add HAS_IOPORT dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Jan 22, 2025 – Jan 23, 2025 Virtual box guest device driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vbox: add HAS_IOPORT dependency

From: Arnd Bergmann <[email protected]>

The vboxguest driver depends on port I/O for debug output:

include/asm-generic/io.h:626:15: error: call to '_outl' declared with attribute error: outl() requires CONFIG_HAS_IOPORT
626 | #define _outl _outl
include/asm-generic/io.h:663:14: note: in expansion of macro '_outl'
663 | #define outl _outl

      |              ^~~~~
drivers/virt/vboxguest/vboxguest_utils.c:102:9: note: in expansion of macro 'outl'
  102 |         outl(phys_req, gdev->io_port + VMMDEV_PORT_OFF_REQUEST);
      |         ^~~~

Most arm64 platforms don't actually support port I/O, though it is currently enabled unconditionally. Refine the vbox dependency to allow turning it HAS_IOPORT off in the future when building for platforms without port I/O and allow compile-testing on all architectures.

Fixes 5cf8f938bf5c ("vbox: Enable VBOXGUEST and VBOXSF_FS on ARM64")
---
 drivers/virt/vboxguest/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/virt/vboxguest/Kconfig +2 -1
index 11b153e7454e..eaba28c95e73 100644
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VBOXGUEST
 	tristate "Virtual Box Guest integration support"
-	depends on (ARM64 || X86) && PCI && INPUT
+	depends on (ARM64 || X86 || COMPILE_TEST) && PCI && INPUT
+	depends on HAS_IOPORT
 	help
 	  This is a driver for the Virtual Box Guest PCI device used in
 	  Virtual Box virtual machines. Enabling this driver will add
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 13 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The vboxguest driver depends on port I/O for debug output:

include/asm-generic/io.h:626:15: error: call to '_outl' declared with attribute error: outl() requires CONFIG_HAS_IOPORT
626 | #define _outl _outl
include/asm-generic/io.h:663:14: note: in expansion of macro '_outl'
663 | #define outl _outl

      |              ^~~~~
drivers/virt/vboxguest/vboxguest_utils.c:102:9: note: in expansion of macro 'outl'
  102 |         outl(phys_req, gdev->io_port + VMMDEV_PORT_OFF_REQUEST);
      |         ^~~~
Quoted 7 lines

Most arm64 platforms don't actually support port I/O, though it is currently enabled unconditionally. Refine the vbox dependency to allow turning it HAS_IOPORT off in the future when building for platforms without port I/O and allow compile-testing on all architectures.

Fixes 5cf8f938bf5c ("vbox: Enable VBOXGUEST and VBOXSF_FS on ARM64")

Thanks, patch looks good to me:

Regards,

Hans

Quoted 18 lines
---
 drivers/virt/vboxguest/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/virt/vboxguest/Kconfig +2 -1
index 11b153e7454e..eaba28c95e73 100644
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VBOXGUEST
 	tristate "Virtual Box Guest integration support"
-	depends on (ARM64 || X86) && PCI && INPUT
+	depends on (ARM64 || X86 || COMPILE_TEST) && PCI && INPUT
+	depends on HAS_IOPORT
 	help
 	  This is a driver for the Virtual Box Guest PCI device used in
 	  Virtual Box virtual machines. Enabling this driver will add
#2 lore raw
In reply to Arnd Bergmann
Quoted 3 lines · Arnd Bergmann

Most arm64 platforms don't actually support port I/O, though it is currently enabled unconditionally. Refine the vbox dependency to allow turning it HAS_IOPORT off in the future when building for platforms

          ^^

Leftover from an in-progress version of the text?

Maciej