2024-06-15 13:22:33

by kernel test robot

[permalink] [raw]
Subject: [tip:x86/vmware 4/8] vmwgfx_msg.c:undefined reference to `vmware_hypercall_slow'

tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/vmware
head: ef08e7dc21307b226b5280d5e8cfea687bfd2866
commit: e5ac9008b79c59235c34494e555419665022f5e1 [4/8] drm/vmwgfx: Use VMware hypercall API
config: i386-buildonly-randconfig-002-20240615 (https://download.01.org/0day-ci/archive/20240615/[email protected]/config)
compiler: gcc-9 (Ubuntu 9.5.0-4ubuntu2) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240615/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_open_channel.constprop.0':
>> vmwgfx_msg.c:(.text+0x203): undefined reference to `vmware_hypercall_slow'
ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_recv_msg':
vmwgfx_msg.c:(.text+0x46f): undefined reference to `vmware_hypercall_slow'
>> ld: vmwgfx_msg.c:(.text+0x49c): undefined reference to `vmware_hypercall_slow'
ld: vmwgfx_msg.c:(.text+0x4c3): undefined reference to `vmware_hypercall_slow'
ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_close_channel':
vmwgfx_msg.c:(.text+0x580): undefined reference to `vmware_hypercall_slow'
ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o:vmwgfx_msg.c:(.text+0x729): more undefined references to `vmware_hypercall_slow' follow
ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_read':
regmap-spi.c:(.text+0xf): undefined reference to `spi_write_then_read'
ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_gather_write':
regmap-spi.c:(.text+0x2b4): undefined reference to `spi_sync'
ld: drivers/base/regmap/regmap-spi.o: in function `spi_sync_transfer.constprop.0':
regmap-spi.c:(.text+0x337): undefined reference to `spi_sync'
ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_async_write':
regmap-spi.c:(.text+0x445): undefined reference to `spi_async'
ld: drivers/iio/dac/ad9739a.o: in function `ad9739a_driver_init':
ad9739a.c:(.init.text+0x10): undefined reference to `__spi_register_driver'

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for REGMAP_SPI
Depends on [n]: SPI [=n]
Selected by [y]:
- AD9739A [=y] && IIO [=y] && (SPI [=n] || COMPILE_TEST [=y])

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


2024-06-15 14:34:12

by Borislav Petkov

[permalink] [raw]
Subject: Re: [tip:x86/vmware 4/8] vmwgfx_msg.c:undefined reference to `vmware_hypercall_slow'

On Sat, Jun 15, 2024 at 09:22:00PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/vmware
> head: ef08e7dc21307b226b5280d5e8cfea687bfd2866
> commit: e5ac9008b79c59235c34494e555419665022f5e1 [4/8] drm/vmwgfx: Use VMware hypercall API
> config: i386-buildonly-randconfig-002-20240615 (https://download.01.org/0day-ci/archive/20240615/[email protected]/config)
> compiler: gcc-9 (Ubuntu 9.5.0-4ubuntu2) 9.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240615/[email protected]/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <[email protected]>
> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
>
> All errors (new ones prefixed by >>):
>
> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_open_channel.constprop.0':
> >> vmwgfx_msg.c:(.text+0x203): undefined reference to `vmware_hypercall_slow'
> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_recv_msg':
> vmwgfx_msg.c:(.text+0x46f): undefined reference to `vmware_hypercall_slow'
> >> ld: vmwgfx_msg.c:(.text+0x49c): undefined reference to `vmware_hypercall_slow'
> ld: vmwgfx_msg.c:(.text+0x4c3): undefined reference to `vmware_hypercall_slow'
> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_close_channel':
> vmwgfx_msg.c:(.text+0x580): undefined reference to `vmware_hypercall_slow'
> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o:vmwgfx_msg.c:(.text+0x729): more undefined references to `vmware_hypercall_slow' follow
> ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_read':
> regmap-spi.c:(.text+0xf): undefined reference to `spi_write_then_read'
> ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_gather_write':
> regmap-spi.c:(.text+0x2b4): undefined reference to `spi_sync'
> ld: drivers/base/regmap/regmap-spi.o: in function `spi_sync_transfer.constprop.0':
> regmap-spi.c:(.text+0x337): undefined reference to `spi_sync'
> ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_async_write':
> regmap-spi.c:(.text+0x445): undefined reference to `spi_async'
> ld: drivers/iio/dac/ad9739a.o: in function `ad9739a_driver_init':
> ad9739a.c:(.init.text+0x10): undefined reference to `__spi_register_driver'
>
> Kconfig warnings: (for reference only)
> WARNING: unmet direct dependencies detected for REGMAP_SPI
> Depends on [n]: SPI [=n]
> Selected by [y]:
> - AD9739A [=y] && IIO [=y] && (SPI [=n] || COMPILE_TEST [=y])
>
> --

Zapping tip:x86/vmware from the tip/master lineup for the time being, until this
is fixed.

Thx 0day guys for reporting.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

2024-06-15 20:41:26

by Alexey Makhalov

[permalink] [raw]
Subject: Re: [tip:x86/vmware 4/8] vmwgfx_msg.c:undefined reference to `vmware_hypercall_slow'

Thanks for the report and provided .config file.

The problem with DRM_VMWGFX=y when HYPERVISOR_GUEST is not set, i.e
arch/x86/kernel/cpu/vmware.c is not built.
It is even a problem today. For VMWARE_HYPERCALL alternative to work,
vmware guest code must set cpu capabilities properly.
The kernel based on the current config file will not work on a SEV-ES
enabled machine.
DRM_VMWGFX must depend on HYPERVISOR_GUEST similarly to VMWARE_BALLOON,
MOUSE_PS2_VMMOUSE and
PTP_1588_CLOCK_VMW.

Borislav, I'm going to send a fix shortly. It has to be applied before
this patchset.

Thanks,
--Alexey

On 6/15/24 7:33 AM, Borislav Petkov wrote:
> On Sat, Jun 15, 2024 at 09:22:00PM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/vmware
>> head: ef08e7dc21307b226b5280d5e8cfea687bfd2866
>> commit: e5ac9008b79c59235c34494e555419665022f5e1 [4/8] drm/vmwgfx: Use VMware hypercall API
>> config: i386-buildonly-randconfig-002-20240615 (https://download.01.org/0day-ci/archive/20240615/[email protected]/config)
>> compiler: gcc-9 (Ubuntu 9.5.0-4ubuntu2) 9.5.0
>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240615/[email protected]/reproduce)
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <[email protected]>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
>>
>> All errors (new ones prefixed by >>):
>>
>> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_open_channel.constprop.0':
>>>> vmwgfx_msg.c:(.text+0x203): undefined reference to `vmware_hypercall_slow'
>> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_recv_msg':
>> vmwgfx_msg.c:(.text+0x46f): undefined reference to `vmware_hypercall_slow'
>>>> ld: vmwgfx_msg.c:(.text+0x49c): undefined reference to `vmware_hypercall_slow'
>> ld: vmwgfx_msg.c:(.text+0x4c3): undefined reference to `vmware_hypercall_slow'
>> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_close_channel':
>> vmwgfx_msg.c:(.text+0x580): undefined reference to `vmware_hypercall_slow'
>> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o:vmwgfx_msg.c:(.text+0x729): more undefined references to `vmware_hypercall_slow' follow
>> ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_read':
>> regmap-spi.c:(.text+0xf): undefined reference to `spi_write_then_read'
>> ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_gather_write':
>> regmap-spi.c:(.text+0x2b4): undefined reference to `spi_sync'
>> ld: drivers/base/regmap/regmap-spi.o: in function `spi_sync_transfer.constprop.0':
>> regmap-spi.c:(.text+0x337): undefined reference to `spi_sync'
>> ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_async_write':
>> regmap-spi.c:(.text+0x445): undefined reference to `spi_async'
>> ld: drivers/iio/dac/ad9739a.o: in function `ad9739a_driver_init':
>> ad9739a.c:(.init.text+0x10): undefined reference to `__spi_register_driver'
>>
>> Kconfig warnings: (for reference only)
>> WARNING: unmet direct dependencies detected for REGMAP_SPI
>> Depends on [n]: SPI [=n]
>> Selected by [y]:
>> - AD9739A [=y] && IIO [=y] && (SPI [=n] || COMPILE_TEST [=y])
>>
>> --
>
> Zapping tip:x86/vmware from the tip/master lineup for the time being, until this
> is fixed.
>
> Thx 0day guys for reporting.
>

2024-06-15 21:42:01

by Alexey Makhalov

[permalink] [raw]
Subject: Re: [tip:x86/vmware 4/8] vmwgfx_msg.c:undefined reference to `vmware_hypercall_slow'

SPI warnings/errors are introduced by commit e77603d5468b90 ("iio: dac:
support the ad9739a RF DAC")

On 6/15/24 7:33 AM, Borislav Petkov wrote:
> On Sat, Jun 15, 2024 at 09:22:00PM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/vmware
>> head: ef08e7dc21307b226b5280d5e8cfea687bfd2866
>> commit: e5ac9008b79c59235c34494e555419665022f5e1 [4/8] drm/vmwgfx: Use VMware hypercall API
>> config: i386-buildonly-randconfig-002-20240615 (https://download.01.org/0day-ci/archive/20240615/[email protected]/config)
>> compiler: gcc-9 (Ubuntu 9.5.0-4ubuntu2) 9.5.0
>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240615/[email protected]/reproduce)
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <[email protected]>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
>>
>> All errors (new ones prefixed by >>):
>>
>> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_open_channel.constprop.0':
>>>> vmwgfx_msg.c:(.text+0x203): undefined reference to `vmware_hypercall_slow'
>> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_recv_msg':
>> vmwgfx_msg.c:(.text+0x46f): undefined reference to `vmware_hypercall_slow'
>>>> ld: vmwgfx_msg.c:(.text+0x49c): undefined reference to `vmware_hypercall_slow'
>> ld: vmwgfx_msg.c:(.text+0x4c3): undefined reference to `vmware_hypercall_slow'
>> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: in function `vmw_close_channel':
>> vmwgfx_msg.c:(.text+0x580): undefined reference to `vmware_hypercall_slow'
>> ld: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o:vmwgfx_msg.c:(.text+0x729): more undefined references to `vmware_hypercall_slow' follow
>> ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_read':
>> regmap-spi.c:(.text+0xf): undefined reference to `spi_write_then_read'
>> ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_gather_write':
>> regmap-spi.c:(.text+0x2b4): undefined reference to `spi_sync'
>> ld: drivers/base/regmap/regmap-spi.o: in function `spi_sync_transfer.constprop.0':
>> regmap-spi.c:(.text+0x337): undefined reference to `spi_sync'
>> ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_async_write':
>> regmap-spi.c:(.text+0x445): undefined reference to `spi_async'
>> ld: drivers/iio/dac/ad9739a.o: in function `ad9739a_driver_init':
>> ad9739a.c:(.init.text+0x10): undefined reference to `__spi_register_driver'
>>
>> Kconfig warnings: (for reference only)
>> WARNING: unmet direct dependencies detected for REGMAP_SPI
>> Depends on [n]: SPI [=n]
>> Selected by [y]:
>> - AD9739A [=y] && IIO [=y] && (SPI [=n] || COMPILE_TEST [=y])
>>
>> --
>
> Zapping tip:x86/vmware from the tip/master lineup for the time being, until this
> is fixed.
>
> Thx 0day guys for reporting.
>

2024-06-16 01:25:47

by Alexey Makhalov

[permalink] [raw]
Subject: [PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

VMWARE_HYPERCALL alternative will not work as intended without
VMware guest code initialization.

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Alexey Makhalov <[email protected]>
---
drivers/gpu/drm/vmwgfx/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/Kconfig b/drivers/gpu/drm/vmwgfx/Kconfig
index faddae3d6ac2..6f1ac940cbae 100644
--- a/drivers/gpu/drm/vmwgfx/Kconfig
+++ b/drivers/gpu/drm/vmwgfx/Kconfig
@@ -2,7 +2,7 @@
config DRM_VMWGFX
tristate "DRM driver for VMware Virtual GPU"
depends on DRM && PCI && MMU
- depends on X86 || ARM64
+ depends on (X86 && HYPERVISOR_GUEST) || ARM64
select DRM_TTM
select DRM_TTM_HELPER
select MAPPING_DIRTY_HELPERS
--
2.39.4


2024-06-16 01:26:02

by Alexey Makhalov

[permalink] [raw]
Subject: [PATCH 2/2] iio: dac: Fix dependencies of AD9739A

0-DAY CI Kernel Test automation reported an issue:

ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_read':
regmap-spi.c:(.text+0xf): undefined reference to `spi_write_then_read'
ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_gather_write':
regmap-spi.c:(.text+0x2b4): undefined reference to `spi_sync'
ld: drivers/base/regmap/regmap-spi.o: in function `spi_sync_transfer.constprop.0':
regmap-spi.c:(.text+0x337): undefined reference to `spi_sync'
ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_async_write':
regmap-spi.c:(.text+0x445): undefined reference to `spi_async'
ld: drivers/iio/dac/ad9739a.o: in function `ad9739a_driver_init':
ad9739a.c:(.init.text+0x10): undefined reference to `__spi_register_driver'

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for REGMAP_SPI
Depends on [n]: SPI [=n]
Selected by [y]:
- AD9739A [=y] && IIO [=y] && (SPI [=n] || COMPILE_TEST [=y])

The issue is caused by CONFIG_AD9739A=y when CONFIG_SPI is not set.

Add explicit dependency on SPI and conditional selection of REGMAP_SPI.

Fixes: e77603d5468b ("iio: dac: support the ad9739a RF DAC")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Alexey Makhalov <[email protected]>
---
drivers/iio/dac/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
index 3c2bf620f00f..d095f4d26e49 100644
--- a/drivers/iio/dac/Kconfig
+++ b/drivers/iio/dac/Kconfig
@@ -133,8 +133,8 @@ config AD5624R_SPI

config AD9739A
tristate "Analog Devices AD9739A RF DAC spi driver"
- depends on SPI || COMPILE_TEST
- select REGMAP_SPI
+ depends on SPI
+ select REGMAP_SPI if SPI_MASTER
select IIO_BACKEND
help
Say yes here to build support for Analog Devices AD9739A Digital-to
--
2.39.4