From 6a52737b8a11f947adf648a4d197c3c4b8cccbe8 Mon Sep 17 00:00:00 2001 From: Marcin Radomski Date: Wed, 4 Dec 2024 16:23:33 +0100 Subject: [PATCH] ANDROID: make virtio_pci_legacy_dev a GKI module It was removed from GKI modules back in May [1], but that had the side effect of disabling legacy dev support in virtio_pci.ko [2], which requires CONFIG_VIRTIO_PCI_LEGACY at the time of building GKI modules. As a result, after updating prebuilts, virtio_pci.ko no longer depends on virtio_pci_legacy_dev.ko, and doesn't probe for legacy devices. This manifested as wifi stopping to work in the goldfish emulator (b/381881708) - the wlan0 interface was not getting assigned, and no data was transmitted. [1] https://android-review.git.corp.google.com/c/kernel/common-modules/virtual-device/+/3081450 [2] https://cs.android.com/android/kernel/common/+/android-mainline:drivers/virtio/virtio_pci_common.h;l=146;drc=97ee04feb682c906a1fa973ebe586fe91567d165 Bug: 381881708 Test: build x86_64 kernel, replace virtio_pci.ko in Test: kernel/prebuilts/6.6/x86_64/ Test: lunch sdk_phone64_x86_64-trunk_staging-eng && m && emulator Test: adb shell ifconfig # notice IP address getting assigned Change-Id: Ic2141d8c85d25830a5113dd74d853ebf52df3b02 Signed-off-by: Marcin Radomski --- BUILD.bazel | 1 - arch/arm64/configs/gki_defconfig | 1 - arch/x86/configs/gki_defconfig | 1 - modules.bzl | 1 + 4 files changed, 1 insertion(+), 3 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 5fc9850b2904..0862bd4cc3bb 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -968,7 +968,6 @@ _ROCKPI4_MODULE_OUTS = [ "drivers/thermal/rockchip_thermal.ko", "drivers/usb/host/ohci-hcd.ko", "drivers/usb/host/ohci-platform.ko", - "drivers/virtio/virtio_pci_legacy_dev.ko", "net/core/failover.ko", ] diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig index ff2e83444d2e..b54447749a79 100644 --- a/arch/arm64/configs/gki_defconfig +++ b/arch/arm64/configs/gki_defconfig @@ -568,7 +568,6 @@ CONFIG_VIRT_DRIVERS=y CONFIG_ARM_PKVM_GUEST=y CONFIG_MTK_GZVM=m CONFIG_VIRTIO_PCI=m -# CONFIG_VIRTIO_PCI_LEGACY is not set CONFIG_VIRTIO_BALLOON=m CONFIG_VHOST_VSOCK=y CONFIG_STAGING=y diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig index b9d1125fd90d..d987ef782d1d 100644 --- a/arch/x86/configs/gki_defconfig +++ b/arch/x86/configs/gki_defconfig @@ -526,7 +526,6 @@ CONFIG_DMABUF_HEAPS=y CONFIG_DMABUF_SYSFS_STATS=y CONFIG_UIO=y CONFIG_VIRTIO_PCI=m -# CONFIG_VIRTIO_PCI_LEGACY is not set CONFIG_VIRTIO_BALLOON=m CONFIG_VHOST_VSOCK=y CONFIG_STAGING=y diff --git a/modules.bzl b/modules.bzl index 333768822609..11e72add3093 100644 --- a/modules.bzl +++ b/modules.bzl @@ -49,6 +49,7 @@ _COMMON_GKI_MODULES_LIST = [ "drivers/usb/serial/usbserial.ko", "drivers/virtio/virtio_balloon.ko", "drivers/virtio/virtio_pci.ko", + "drivers/virtio/virtio_pci_legacy_dev.ko", "drivers/virtio/virtio_pci_modern_dev.ko", "fs/netfs/netfs.ko", "kernel/kheaders.ko",