Skip to contentSkip to conversation

vmwgfx_msg.c:undefined reference to `vmware_hypercall_slow'

PATCH Applied kernel test robot 5 participants 17 messages Jun 15, 2024 – Jun 19, 2024

Subsystems (4)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
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])

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw
Quoted 34 lines · kernel test robot
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':

Quoted 1 line
Quoted 1 line

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'
Quoted 1 line
Quoted 1 line

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'
Quoted 7 lines

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.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#2 lore raw

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

Quoted 48 lines · Borislav Petkov
Quoted 34 lines · kernel test robot
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':

Quoted 1 line
Quoted 1 line

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'

Quoted 1 line
Quoted 1 line

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'
Quoted 7 lines

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.

#3 lore raw
In reply to Borislav Petkov

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

Quoted 48 lines · Borislav Petkov
Quoted 34 lines · kernel test robot
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':

Quoted 1 line
Quoted 1 line

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'

Quoted 1 line
Quoted 1 line

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'
Quoted 7 lines

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.

#4 lore raw

PATCH 1/2 drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

In reply to kernel test robot

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

---
 drivers/gpu/drm/vmwgfx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/Kconfig +1 -1
index faddae3d6ac2..6f1ac940cbae 100644
@@ -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
Signature · 1 line
2.39.4
#5 lore raw

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.

---
 drivers/iio/dac/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/Kconfig +2 -2
index 3c2bf620f00f..d095f4d26e49 100644
@@ -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
Signature · 1 line
2.39.4
#6 lore raw

Re: [PATCH 2/2] iio: dac: Fix dependencies of AD9739A

Quoted 37 lines · Alexey Makhalov

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.

---
 drivers/iio/dac/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/Kconfig +0 -0
index 3c2bf620f00f..d095f4d26e49 100644

drivers/iio/dac/Kconfig config AD5624R_SPI · line 140

Quoted 10 lines
drivers/iio/dac/Kconfig +2 -2
@@ -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

FWIW, I appreciate it you fixing other breakages. However, there's a patch for that already, on its way:

https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?h=fixes-togreg&id=75183e461ce033605c3e85518a9f3d4e4ef848a3

Don't get discouraged, though, when fixing something that is not in our immediate area of interest!

:-)

Thx.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#7 lore raw

Re: [PATCH 2/2] iio: dac: Fix dependencies of AD9739A

Quoted 52 lines · Borislav Petkov
Quoted 37 lines · Alexey Makhalov

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.

---
  drivers/iio/dac/Kconfig | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/Kconfig +0 -0
index 3c2bf620f00f..d095f4d26e49 100644

drivers/iio/dac/Kconfig config AD5624R_SPI · line 140

Quoted 10 lines
drivers/iio/dac/Kconfig +2 -2
@@ -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

FWIW, I appreciate it you fixing other breakages. However, there's a patch for that already, on its way:

Quoted 9 lines

https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?h=fixes-togreg&id=75183e461ce033605c3e85518a9f3d4e4ef848a3

Don't get discouraged, though, when fixing something that is not in our immediate area of interest!

:-)

Thx.

Lesson learned and noted for next time to address only related/new warnings and errors. Thanks!

#8 lore raw

Re: [PATCH 2/2] iio: dac: Fix dependencies of AD9739A

Quoted 7 lines · Alexey Makhalov
Quoted 4 lines

Don't get discouraged, though, when fixing something that is not in our immediate area of interest!

:-)

Lesson learned and noted for next time to address only related/new warnings and errors. Thanks!

I actually meant the exact opposite. :-)

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#9 lore raw

Re: [PATCH 2/2] iio: dac: Fix dependencies of AD9739A

Haha, got it!

Quoted 18 lines · Borislav Petkov
Quoted 6 lines · Alexey Makhalov
Quoted 4 lines

Don't get discouraged, though, when fixing something that is not in our immediate area of interest!

:-)

Lesson learned and noted for next time to address only related/new

warnings

Quoted 1 line

and errors. Thanks!

I actually meant the exact opposite. :-)

--
Regards/Gruss,
Boris.

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

#10 lore raw

Re: [PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

In reply to Alexey Makhalov
Quoted 16 lines · Alexey Makhalov

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

---
 drivers/gpu/drm/vmwgfx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/Kconfig +0 -0
index faddae3d6ac2..6f1ac940cbae 100644

drivers/gpu/drm/vmwgfx/Kconfig line 8

Quoted 8 lines
drivers/gpu/drm/vmwgfx/Kconfig +1 -1
@@ -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

Right, I'll queue this soon but it doesn't reproduce here with gcc-11 or gcc-13. This must be something gcc-9 specific or so...

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#11 lore raw

Re: [PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

Quoted 20 lines · Borislav Petkov
Quoted 19 lines · Alexey Makhalov

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

---
 drivers/gpu/drm/vmwgfx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/Kconfig +0 -1
index faddae3d6ac2..6f1ac940cbae 100644
@@ -2,7 +2,7 @@
 config DRM_VMWGFX
 	tristate "DRM driver for VMware Virtual GPU"
 	depends on DRM && PCI && MMU
-	depends on X86 || ARM64
Quoted 8 lines

drivers/gpu/drm/vmwgfx/Kconfig line 8

Quoted 5 lines
drivers/gpu/drm/vmwgfx/Kconfig +1 -0
+	depends on (X86 && HYPERVISOR_GUEST) || ARM64
 	select DRM_TTM
 	select DRM_TTM_HELPER
 	select MAPPING_DIRTY_HELPERS

Right, I'll queue this soon but it doesn't reproduce here with gcc-11 or gcc-13. This must be something gcc-9 specific or so...

Actually, that's a DRM patch.

Folks in To: ok to carry this though the tip tree?

Thx.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
maintainer
#12 lore raw

Re: [PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

Quoted 31 lines · Borislav Petkov
Quoted 20 lines · Borislav Petkov
Quoted 19 lines · Alexey Makhalov

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

---
 drivers/gpu/drm/vmwgfx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/Kconfig +0 -1
index faddae3d6ac2..6f1ac940cbae 100644
@@ -2,7 +2,7 @@
 config DRM_VMWGFX
    tristate "DRM driver for VMware Virtual GPU"
    depends on DRM && PCI && MMU
-   depends on X86 || ARM64
Quoted 8 lines

drivers/gpu/drm/vmwgfx/Kconfig

Quoted 5 lines
drivers/gpu/drm/vmwgfx/Kconfig +1 -1
+   depends on (X86 && HYPERVISOR_GUEST) || ARM64
    select DRM_TTM
    select DRM_TTM_HELPER
    select MAPPING_DIRTY_HELPERS
--

Right, I'll queue this soon but it doesn't reproduce here with gcc-11 or gcc-13. This must be something gcc-9 specific or so...

Quoted 3 lines

Actually, that's a DRM patch.

Folks in To: ok to carry this though the tip tree?

That's fine with me. Thanks.

z

#13 lore raw

Re: [PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

In reply to Borislav Petkov
Quoted 20 lines · Borislav Petkov
Quoted 19 lines · Alexey Makhalov

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

---
  drivers/gpu/drm/vmwgfx/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/Kconfig +0 -1
index faddae3d6ac2..6f1ac940cbae 100644
@@ -2,7 +2,7 @@
  config DRM_VMWGFX
  	tristate "DRM driver for VMware Virtual GPU"
  	depends on DRM && PCI && MMU
-	depends on X86 || ARM64
Quoted 9 lines

drivers/gpu/drm/vmwgfx/Kconfig line 8

Quoted 5 lines
drivers/gpu/drm/vmwgfx/Kconfig +1 -0
+	depends on (X86 && HYPERVISOR_GUEST) || ARM64
  	select DRM_TTM
  	select DRM_TTM_HELPER
  	select MAPPING_DIRTY_HELPERS

Right, I'll queue this soon but it doesn't reproduce here with gcc-11 or gcc-13. This must be something gcc-9 specific or so...

Not really a gcc related, but the matter of a config file. It is reproducible if CONFIG_HYPERVISOR_GUEST not set, but CONFIG_DRM_VMWGFX=y. And this combination was allowed before the fix.

Regards,
--Alexey

#14 lore raw

Re: [PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

Quoted 3 lines · Alexey Makhalov

Not really a gcc related, but the matter of a config file. It is reproducible if CONFIG_HYPERVISOR_GUEST not set, but CONFIG_DRM_VMWGFX=y. And this combination was allowed before the fix.

Using their config:

$ grep -E "(CONFIG_DRM_VMWGFX|CONFIG_HYPERVISOR_GUEST)" .config
# CONFIG_HYPERVISOR_GUEST is not set
CONFIG_DRM_VMWGFX=y
CONFIG_DRM_VMWGFX_MKSSTATS=y
$ make ...

OBJCOPY arch/x86/boot/setup.bin
BUILD arch/x86/boot/bzImage
Kernel: arch/x86/boot/bzImage is ready (#2)

$ gcc --version
gcc (Debian 13.2.0-25) 13.2.0
$

So no, I can't reproduce with my compiler.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#15 lore raw

Re: [PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

Quoted 14 lines · Borislav Petkov
Quoted 3 lines · Alexey Makhalov

Not really a gcc related, but the matter of a config file. It is reproducible if CONFIG_HYPERVISOR_GUEST not set, but CONFIG_DRM_VMWGFX=y. And this combination was allowed before the fix.

Using their config:

$ grep -E "(CONFIG_DRM_VMWGFX|CONFIG_HYPERVISOR_GUEST)" .config
# CONFIG_HYPERVISOR_GUEST is not set
CONFIG_DRM_VMWGFX=y
CONFIG_DRM_VMWGFX_MKSSTATS=y
$ make ...
Quoted 9 lines

OBJCOPY arch/x86/boot/setup.bin
BUILD arch/x86/boot/bzImage
Kernel: arch/x86/boot/bzImage is ready (#2)

$ gcc --version
gcc (Debian 13.2.0-25) 13.2.0
$

So no, I can't reproduce with my compiler.

That is interesting! Happy to debug it, but unfortunately I can not reproduce your "good" compilation without the fix. I tried
"gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0" in Ubuntu, and
"gcc (GCC) 12.2.0" in Photon OS.
All of them fail with an "undefined reference to `vmware_hypercall_slow'"

#16 lore raw

[tip: x86/urgent] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

In reply to Alexey Makhalov
The following commit has been merged into the x86/urgent branch of tip:

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     8c4d6945fe5bd04ff847c3c788abd34ca354ecee
Gitweb:        https://git.kernel.org/tip/8c4d6945fe5bd04ff847c3c788abd34ca354ecee
Author:        Alexey Makhalov <[email protected]>
AuthorDate:    Sat, 15 Jun 2024 18:25:10 -07:00
Committer:     Borislav Petkov (AMD) <[email protected]>
CommitterDate: Mon, 17 Jun 2024 11:56:54 +02:00

drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

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

[ bp: note that this doesn't reproduce with newer gccs so it must be
something gcc-9-specific. ]

---
 drivers/gpu/drm/vmwgfx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/Kconfig +1 -1
index faddae3..6f1ac94 100644
@@ -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