linuxlinux-kernelcentos8

Can't find virtio_pci.ko(or virtio-pci.ko) in Centos8


I want do some changes in virtio_pci.ko, so I plan to make a ko from kernel source using current kernel header.

I have tested in Centos7, I can recompile a initramfs-xxx.img to let it load my virtio_pci.ko(which locate at /lib/modules/xxxx/kernel/drivers/virtio/virtio_pci.ko.xz), but in Centos8(names virtio-pci.ko, you can find it by lspci -v if your guest has virtio device), I can't find it.

Does anyone know how to find it and replace it?


Solution

  • virtio_pci was built into kernel not as a module, that can be check using file /boot/config-4.18.0-348.7.1.el8_5.x86_64

    # cat /boot/config-4.18.0-348.7.1.el8_5.x86_64 | grep VIRTIO
    CONFIG_VIRTIO_BLK=m
    CONFIG_SCSI_VIRTIO=m
    CONFIG_VIRTIO_NET=m
    CONFIG_VIRTIO=y
    CONFIG_VIRTIO_PCI=y