Thread (1 message) 1 message, 1 author, 2021-12-06

Re: [PATCH] eni_vdpa: alibaba: select VIRTIO_PCI_LIB

From: Jason Wang <hidden>
Date: 2021-12-06 08:41:22
Also in: lkml

On Mon, Dec 6, 2021 at 4:14 PM Arnd Bergmann [off-list ref] wrote:
On Mon, Dec 6, 2021 at 4:12 AM Jason Wang [off-list ref] wrote:
quoted
On Sat, Dec 4, 2021 at 2:55 AM Arnd Bergmann [off-list ref] wrote:
quoted
From: Arnd Bergmann <arnd@arndb.de>

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':
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.
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
         Arnd
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help