Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3101 - Kernel in armvirt images missing virtio drivers and UEFI support #7856

Open
openwrt-bot opened this issue May 16, 2020 · 2 comments
Labels
flyspray kernel pull request/issue with Linux kernel related changes

Comments

@openwrt-bot
Copy link

RussianNeuroMancer:

Hello!

Unless I missing something, it's seems like currently armvirt images is missing virtio drivers (unlike x86 images) and UEFI support (again, unlike x86 images).

To get idea regarding virtio drivers, please take a look at x86 config and armvirt config:
https://github.com/openwrt/openwrt/blob/master/target/linux/x86/64/config-4.19
https://github.com/openwrt/openwrt/blob/master/target/linux/x86/64/config-5.4
https://github.com/openwrt/openwrt/blob/master/target/linux/armvirt/64/config-4.19
https://github.com/openwrt/openwrt/blob/master/target/linux/armvirt/64/config-5.4

As you can see, x86 config include all sorts of virtio drivers, such as virtio_blk, virtio_baloon, virtio_pci, scsi_virtio (and so on) while arm config doesn't have any of these. In result armvirt64 does not boot - it can not mount rootfs, and no block devices is detected by the kernel due to missing block device drivers.

Another roadblock is missing UEFI support in armvirt images. By default virt-manager create virtual machine with ACPI and OVMF, and OVMF obviously can't boot anything from ext4 images. It possible to workaround this by specifying path to kernel and initramfs in vm properties and editing vm xml manually via "virsh edit vmname" (remove loader and nvram tags in os section and remove acpi tag in features section) but then vm kernel won't be able to boot due to missing drivers.

To reproduce this issue you need board running fresh Debian or Ubuntu, installed libvirt-daemon-system qemu-kvm ovmf ipxe-qemu, and ability to connect to such board from virt-manager (running on other PC for convinience).
Be aware that big.LITTLE architecture is not supported yet by libvirt, but there is plenty of boards that have four same cores - even simple RPi3B would be enough.

Please let me know if I need to provide any additional information.

@openwrt-bot
Copy link
Author

yousong:

The virtio drivers part should not be an issue. I remember making virtio a priority when introducing armvirt target into OpenWrt.

➜ ~/git-repo/openwrt/openwrt git:(master) grep -i virtio target/linux/armvirt/config-5.4 CONFIG_BLK_MQ_VIRTIO=y CONFIG_NET_9P_VIRTIO=y CONFIG_SCSI_VIRTIO=y CONFIG_VIRTIO=y CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_MMIO=y # CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y

We use armvirt mainly for dev/debug purposes. Previously we had a target named realview for this purpose and removed it when armvirt was in place.

At the moment we have ./script/qemustart booting from the standalone initramfs kernel image. The rootfs.ext4.img contains only rootfs only, no grub, no efi/ovmf etc. Patches are welcome ;)

@aparcar aparcar added the kernel pull request/issue with Linux kernel related changes label Feb 22, 2022
@shvetsnikita
Copy link

I didn't check previous releases, but this issue is certainly fixed since 23.05, so it can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray kernel pull request/issue with Linux kernel related changes
Projects
None yet
Development

No branches or pull requests

3 participants