eni_vdpa: alibaba: select VIRTIO_PCI_LIB
PATCH 1/1 eni_vdpa: alibaba: select VIRTIO_PCI_LIB
From: Arnd Bergmann <[email protected]>
When VIRTIO_PCI_LIB is not built-in but the alibaba driver is, the kernel runs into a link error:
x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_features':
eni_vdpa.c:(.text+0x23f): undefined reference to `vp_legacy_set_features'
x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_state':
eni_vdpa.c:(.text+0x2fe): undefined reference to `vp_legacy_get_queue_enable'
x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_address':
eni_vdpa.c:(.text+0x376): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_ready':
eni_vdpa.c:(.text+0x3b4): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_free_irq':
eni_vdpa.c:(.text+0x460): undefined reference to `vp_legacy_queue_vector'
x86_64-linux-ld: eni_vdpa.c:(.text+0x4b7): undefined reference to `vp_legacy_config_vector'
x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_reset':
Selecting VIRTIO_PCI_LIB_LEGACY is not sufficient here since that is only part of the VIRTIO_PCI_LIB support.
--- drivers/vdpa/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/vdpa/Kconfig +1 -0
@@ -80,6 +80,7 @@ config VP_VDPA config ALIBABA_ENI_VDPA tristate "vDPA driver for Alibaba ENI" + select VIRTIO_PCI_LIB select VIRTIO_PCI_LIB_LEGACY depends on PCI_MSI && X86 help
Signature · 1 line
2.29.2
Quoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When
VIRTIO_PCI_LIBis not built-in but the alibaba driver is, the kernel runs into a link error:
Quoted 12 lines
x86_64-linux-ld:
drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_features':
eni_vdpa.c:(.text+0x23f): undefined reference to `vp_legacy_set_features'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_state':
eni_vdpa.c:(.text+0x2fe): undefined reference to `vp_legacy_get_queue_enable'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_address':
eni_vdpa.c:(.text+0x376): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_ready':
eni_vdpa.c:(.text+0x3b4): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_free_irq':
eni_vdpa.c:(.text+0x460): undefined reference to `vp_legacy_queue_vector'
x86_64-linux-ld: eni_vdpa.c:(.text+0x4b7): undefined reference to `vp_legacy_config_vector'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_reset':
Intersting, all those belongs to the legacy library.
And I just have a try and I can complie alibaba eni without VIRTIO_PCI_LIB is set.
Can you share your config file?
Thanks
Quoted 25 lines
Selecting
VIRTIO_PCI_LIB_LEGACYis not sufficient here since that is only part of theVIRTIO_PCI_LIBsupport.Fixes e85087beedca ("eni_vdpa: add vDPA driver for Alibaba ENI")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/vdpa/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/vdpa/Kconfig +1
-1@@ -80,6 +80,7 @@ config VP_VDPA config ALIBABA_ENI_VDPA tristate "vDPA driver for Alibaba ENI" + select VIRTIO_PCI_LIB select VIRTIO_PCI_LIB_LEGACY depends on PCI_MSI && X86 help --2.29.2
Quoted 21 lines · Jason Wang
Quoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When
VIRTIO_PCI_LIBis not built-in but the alibaba driver is, the kernel runs into a link error:Quoted 12 lines
x86_64-linux-ld:
drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_features':
eni_vdpa.c:(.text+0x23f): undefined reference to `vp_legacy_set_features'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_state':
eni_vdpa.c:(.text+0x2fe): undefined reference to `vp_legacy_get_queue_enable'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_address':
eni_vdpa.c:(.text+0x376): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_ready':
eni_vdpa.c:(.text+0x3b4): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_free_irq':
eni_vdpa.c:(.text+0x460): undefined reference to `vp_legacy_queue_vector'
x86_64-linux-ld: eni_vdpa.c:(.text+0x4b7): undefined reference to `vp_legacy_config_vector'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_reset':
Quoted 4 lines
Intersting, all those belongs to the legacy library.
And I just have a try and I can complie alibaba eni without
VIRTIO_PCI_LIBis set.
Ah, so the problem is in drivers/Makefile:
obj-$(CONFIG_VIRTIO) += virtio/
obj-$(CONFIG_VIRTIO_PCI_LIB) += virtio/
We only enter this directory when one of these two symbols is set, but in my randconfig
build, neither one is. I'll send a new patch.
Arnd
Quoted 28 lines · Arnd Bergmann
Quoted 21 lines · Jason Wang
Quoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When
VIRTIO_PCI_LIBis not built-in but the alibaba driver is, the kernel runs into a link error:Quoted 12 lines
x86_64-linux-ld:
drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_features':
eni_vdpa.c:(.text+0x23f): undefined reference to `vp_legacy_set_features'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_state':
eni_vdpa.c:(.text+0x2fe): undefined reference to `vp_legacy_get_queue_enable'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_address':
eni_vdpa.c:(.text+0x376): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_ready':
eni_vdpa.c:(.text+0x3b4): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_free_irq':
eni_vdpa.c:(.text+0x460): undefined reference to `vp_legacy_queue_vector'
x86_64-linux-ld: eni_vdpa.c:(.text+0x4b7): undefined reference to `vp_legacy_config_vector'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_reset':Quoted 4 lines
Intersting, all those belongs to the legacy library.
And I just have a try and I can complie alibaba eni without
VIRTIO_PCI_LIBis set.
Quoted 8 lines
Ah, so the problem is in
drivers/Makefile:obj-$(CONFIG_VIRTIO) += virtio/
obj-$(CONFIG_VIRTIO_PCI_LIB) += virtio/We only enter this directory when one of these two symbols is set, but in my randconfig
build, neither one is. I'll send a new patch.
Yes, we need to include when VIRTIO_PCI_LIB_LEGACY is set.
Thanks
Quoted 3 lines
Arnd
Michael S. Tsirkin
maintainerQuoted 18 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When
VIRTIO_PCI_LIBis not built-in but the alibaba driver is, the kernel runs into a link error:x86_64-linux-ld:
drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_features':
eni_vdpa.c:(.text+0x23f): undefined reference to `vp_legacy_set_features'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_state':
eni_vdpa.c:(.text+0x2fe): undefined reference to `vp_legacy_get_queue_enable'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_address':
eni_vdpa.c:(.text+0x376): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_ready':
eni_vdpa.c:(.text+0x3b4): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_free_irq':
eni_vdpa.c:(.text+0x460): undefined reference to `vp_legacy_queue_vector'
x86_64-linux-ld: eni_vdpa.c:(.text+0x4b7): undefined reference to `vp_legacy_config_vector'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_reset':
Quoted 5 lines
Selecting
VIRTIO_PCI_LIB_LEGACYis not sufficient here since that is only part of theVIRTIO_PCI_LIBsupport.Fixes e85087beedca ("eni_vdpa: add vDPA driver for Alibaba ENI")Signed-off-by Arnd Bergmann <[email protected]>
Confused. These are all part ofdrivers/virtio/virtio_pci_legacy_dev.c
and
obj-$(CONFIG_VIRTIO_PCI_LIB_LEGACY) += virtio_pci_legacy_dev.o
what gives?
Quoted 18 lines
--- drivers/vdpa/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/vdpa/Kconfig +1
-0@@ -80,6 +80,7 @@ config VP_VDPA config ALIBABA_ENI_VDPA tristate "vDPA driver for Alibaba ENI" + select VIRTIO_PCI_LIB select VIRTIO_PCI_LIB_LEGACY depends on PCI_MSI && X86 helpSignature · 1 line
2.29.2
Quoted 27 lines · Michael S. Tsirkin
Quoted 18 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When
VIRTIO_PCI_LIBis not built-in but the alibaba driver is, the kernel runs into a link error:x86_64-linux-ld:
drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_features':
eni_vdpa.c:(.text+0x23f): undefined reference to `vp_legacy_set_features'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_state':
eni_vdpa.c:(.text+0x2fe): undefined reference to `vp_legacy_get_queue_enable'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_address':
eni_vdpa.c:(.text+0x376): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_ready':
eni_vdpa.c:(.text+0x3b4): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_free_irq':
eni_vdpa.c:(.text+0x460): undefined reference to `vp_legacy_queue_vector'
x86_64-linux-ld: eni_vdpa.c:(.text+0x4b7): undefined reference to `vp_legacy_config_vector'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_reset':Quoted 5 lines
Selecting
VIRTIO_PCI_LIB_LEGACYis not sufficient here since that is only part of theVIRTIO_PCI_LIBsupport.Fixes e85087beedca ("eni_vdpa: add vDPA driver for Alibaba ENI")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 7 lines
Confused. These are all part of
drivers/virtio/virtio_pci_legacy_dev.cand
obj-$(CONFIG_VIRTIO_PCI_LIB_LEGACY) += virtio_pci_legacy_dev.owhat gives?
The patch was wrong, see
https://lore.kernel.org/lkml/[email protected]/
for the correct fix.
Arnd
Michael S. Tsirkin
maintainerQuoted 36 lines · Arnd Bergmann
Quoted 27 lines · Michael S. Tsirkin
Quoted 18 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When
VIRTIO_PCI_LIBis not built-in but the alibaba driver is, the kernel runs into a link error:x86_64-linux-ld:
drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_features':
eni_vdpa.c:(.text+0x23f): undefined reference to `vp_legacy_set_features'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_state':
eni_vdpa.c:(.text+0x2fe): undefined reference to `vp_legacy_get_queue_enable'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_address':
eni_vdpa.c:(.text+0x376): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_ready':
eni_vdpa.c:(.text+0x3b4): undefined reference to `vp_legacy_set_queue_address'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_free_irq':
eni_vdpa.c:(.text+0x460): undefined reference to `vp_legacy_queue_vector'
x86_64-linux-ld: eni_vdpa.c:(.text+0x4b7): undefined reference to `vp_legacy_config_vector'
x86_64-linux-ld:drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_reset':Quoted 5 lines
Selecting
VIRTIO_PCI_LIB_LEGACYis not sufficient here since that is only part of theVIRTIO_PCI_LIBsupport.Fixes e85087beedca ("eni_vdpa: add vDPA driver for Alibaba ENI")Signed-off-by Arnd Bergmann <[email protected]>Quoted 7 lines
Confused. These are all part of
drivers/virtio/virtio_pci_legacy_dev.cand
obj-$(CONFIG_VIRTIO_PCI_LIB_LEGACY) += virtio_pci_legacy_dev.owhat gives?
Quoted 7 lines
The patch was wrong, see
https://lore.kernel.org/lkml/[email protected]/
for the correct fix.
Arnd
Oh, ok then, I picked that one up, that explains why the issue does not reproduce for me.
Signature · 6 lines
MST _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization