Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I've found the solution here : https://github.com/utmapp/UTM/issues/2333#issuecomment-786129411 The parameters that I have used probably have always been correct,but for some reason,the qemu disk is not detected at a first shot. It should be chosen from the EFI menu. It seems like a Bug. Once booted,the boot messages are displayed below : Loading kernel... /boot/kernel/kernel text=0x1b4 text=0x719e9c text=0x19a610 data=0xb1f60 data=0x0+0x1e8000 0x4+0xa4160+0x4+0x116be3- Loading configured modules... /boot/kernel/umodem.ko text=0x1540 text=0xe90 data=0x230+0x4 0x4+0xe70+0x4+0xa7c loading required module 'ucom' /boot/kernel/ucom.ko text=0x19f8 text=0x2d18 data=0x494+0x838 0x4+0x1480+0x4+0xbcf can't find '/etc/hostid' can't find '/boot/entropy' Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... Using DTB provided by EFI at 0x5feed000. Kernel entry at 0x56000200... Kernel args: (null) WARNING: Cannot find freebsd,dts-version property, cannot check DTB compliance ---<>--- !!!WARNING!!! CPU(0) is vulnerable to speculative branch attacks. !!! We cannot enable required bit(s) in ACTRL register because it's locked by secure monitor and/or firmware. Copyright (c) 1992-2021 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC arm FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c) VT: init without driver. CPU: ARM Cortex-A15 r0p4 (ECO: 0x) CPU Features: Multiprocessing, Thumb2, Security, Virtualization, Generic Timer, VMSAv7, PXN, LPAE, Coherent Walk Optional instructions: SDIV/UDIV, UMULL, SMULL, SIMD(ext) LoUU:2 LoC:3 LoUIS:2 Cache level 1: 32KB/64B 2-way data cache WB Read-Alloc Write-Alloc 32KB/64B 2-way instruction cache Read-Alloc Cache level 2: 1024KB/64B 16-way unified cache WB Read-Alloc Write-Alloc real memory = 487772160 (465 MB) avail memory = 460943360 (439 MB) arc4random: WARNING: initial seeding bypassed the cryptographic random device because it was not yet seeded and the knob 'bypass_before _seeding' was enabled. random: entropy device external interface kbd0 at kbdmux0 ofwbus0: simplebus0: on ofwbus0 clk_fixed0: on ofwbus0 psci0: on ofwbus0 gic0: mem 0x800-0x800,0x801-0x801 on ofwbus0 gic0: pn 0x2, arch 0x2, rev 0x0, implementer 0x43b irqs 288 gicv2m0: mem 0x802-0x8020fff on gic0 generic_timer0: irq 35,36,37,38 on ofwbus0 Timecounter "ARM MPCore Timecounter" frequency 2400 Hz quality 1000 Event timer "ARM MPCore Eventtimer" frequency 2400 Hz quality 1000 pcib0: mem 0x3f00-0x3fff on ofwbus0 pci0: on pcib0 virtio_pci0: port 0x100-0x11f mem 0x11067000-0x11067fff,0x1105c000-0x1105 at device 1.0 on pci0 vtnet0: on virtio_pci0 vtnet0: Ethernet address: 52:54:00:12:34:55 virtio_pci1: mem 0x11066000-0x11066fff,0x11058000-0x1105bfff at device 2.0 on pci0 virtio_pci1: cannot alloc resource for COMMON_CFG virtio_pci1: cannot map configs device_attach: virtio_pci1 attach returned 22 xhci0: mem 0x1106-0x11063fff at device 3.0 on pci0 xhci0: 32 bytes context size, 32-bit DMA usbus0 on xhci0 vgapci0: port 0x120-0x12f mem 0x1000-0x10ff,0x1104-0x1104 at device 4.0 on pci0 vgapci0: Boot video device virtio_pci1: port 0x80-0xff mem 0x11065000-0x11065fff,0x11054000-0x11057fff at device 5.0 on pci0 vtblk0: on virtio_pci1 vtblk0: 5120MB (10485760 512 byte sectors) virtio_pci2: mem 0x11064000-0x11064fff,0x1105-0x11053fff at device 6.0 on pci0 vtblk1: on virtio_pci2 vtblk1: 51200MB (104857600 512 byte sectors) uart0: mem 0x900-0x9000fff irq 34 on ofwbus0 uart0: console (115200,n,8,1) cpulist0: on ofwbus0 cpu0: on cpulist0 Timecounters tick every 1.000 msec usbus0: 5.0Gbps Super Speed USB v3.0 Trying to mount root from ufs:/dev/ufs/rootfs [rw]... ugen0.1: <(0x1033) XHCI root HUB> at usbus0 uhub0 on usbus0 uhub0: <(0x1033) XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 Warning: no time-of-day clock registered, system time will not be set accurately Dual Console: Serial Primary, Video Secondary /etc/rc: WARNING: hostid: unable to figure out a UUID from DMI data, generating a new one uhub0: 8 ports with 8 removable, self powered ugen0.2: at usbus0 Loading kernel... /boot/kernel/kernel text=0x1b4 text=0x719e9c text=0x19a610 data=0xb1f60 data=0x0+0x1e8000 0x4+0xa4160+0x4+0x116be3- Loading configured modules... /boot/kernel/umodem.ko text=0x1540 text=0xe90 data=0x230+0x4 0x4+0xe70+0x4+0xa7c loading required module 'ucom' /boot/kernel/ucom.ko text=0x19f8 text=0x2d18 data=0x494+0x838 0x4+0x1480+0x4+0xbcf can't find '/etc/hostid' can't find '/boot/entropy' Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... Using DTB provided by
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I tried a different set of parameters : /mnt/./monta-fisso sleep 2 UEFICODE=/usr/share/AAVMF/AAVMF32_CODE.fd UEFIVARS=/usr/share/AAVMF/AAVMF32_VARS.fd CD1=/mnt/fisso/OS/ISO/BSD/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img CD2=/mnt/fisso/OS/ISO/Linux/bookworm_mini_armhf.iso DISK=/mnt/fisso/bhyve/img/FreeBSD/FreeBSD.img qemu-system-arm \ -enable-kvm -serial stdio \ -m 512 -M virt -cpu cortex-a15 \ -drive if=pflash,format=raw,unit=0,file=$UEFICODE \ -drive if=pflash,format=raw,unit=1,file=$UEFIVARS \ -cdrom $CD2 \ -drive file=$DISK,format=raw \ -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ -netdev type=user,id=net0 \ -device virtio-gpu-pci \ -usb -device nec-usb-xhci \ -device usb-kbd -device usb-mouse \ -device vmware-svga,id=video0,vgamem_mb=16 but the error is always there. On Sun, Aug 13, 2023 at 2:54 PM Mario Marietto wrote: > Thanks. It's good as a try,but my final goal is to virtualize FreeBSD. > > On Sun, Aug 13, 2023 at 8:13 AM Валентин wrote: > >> > Which version of qemu are you using ? >> >> Try Debian Armhf distribution: >> >> https://deb.debian.org/debian/dists/bookworm/main/installer-armhf/current/images/netboot/ >> >> For example, mini.iso (minimal size, network boot) boots with: >> 1) machine virt; >> 2) cpu cortex-a15; >> 3) efi bios AAVMF32_CODE.fd. >> >> >> With best regards, >> Valentine. >> >> > > -- > Mario. > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
Thanks. It's good as a try,but my final goal is to virtualize FreeBSD. On Sun, Aug 13, 2023 at 8:13 AM Валентин wrote: > > Which version of qemu are you using ? > > Try Debian Armhf distribution: > > https://deb.debian.org/debian/dists/bookworm/main/installer-armhf/current/images/netboot/ > > For example, mini.iso (minimal size, network boot) boots with: > 1) machine virt; > 2) cpu cortex-a15; > 3) efi bios AAVMF32_CODE.fd. > > > With best regards, > Valentine. > > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
> Which version of qemu are you using ?Try Debian Armhf > distribution:https://deb.debian.org/debian/dists/bookworm/main/installer-armhf/current/images/netboot/For > example, mini.iso (minimal size, network boot) boots with:1) machine virt;2) > cpu cortex-a15;3) efi bios AAVMF32_CODE.fd.With best regards,Valentine.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
> it does not boot,but I get the UEFI shell.But, by the way, if you're able to > boot UEFI bios with "-enable-kvm", at least it probably means that KVM is > working.With best regards,Valentine.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
> Which version of qemu are you using ?Version 5.1, aarch64 (but I tried 32-bit > virt machine too, so it should work with qemu-system-arm).So far I've tried > to boot with 64-bit EFI bios > (https://packages.debian.org/sid/misc/qemu-efi-aarch64) from rEFInd project's > CD: https://sourceforge.net/projects/refind/files/ (look for > refind-cd-*.zip).It boots.You are using 32-bit machine and emulator, > therefore you won't be able to boot it because the CD only contains Aarch64 > loader.But you could see the content of CD in EFI shell even with 32 bits, it > displays mounted CD and filesystem as "FS0:".But I'm not sure that it's > possible to make CD iso from SD image.With best regards,Valentine. Исходное сообщение От: Mario Marietto Дата: 13.08.2023 00:57 (GMT+03:00) Кому: Валентин Копия: qemu-discuss@nongnu.org, Peter Maydell Тема: Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enabled Which version of qemu are you using ?On Sat, Aug 12, 2023 at 10:40 PM Mario Marietto wrote:'ve removed the line : -drive file=/mnt/fisso/bhyve/img/FreeBSD/FreeBSD.img,id=virtio-blk,if=none \and I tried to boot only the boot image file :qemu-system-arm \ -enable-kvm -serial stdio \ -m 512 -M virt -cpu cortex-a15 \ -drive if=pflash,format=raw,unit=1,file=/usr/share/AAVMF/AAVMF32_VARS.fd \ -drive if=pflash,format=raw,unit=0,file=/usr/share/AAVMF/AAVMF32_CODE.fd \ -boot d -cdrom /mnt/fisso/OS/ISO/BSD/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img \ -device virtio-blk,drive=virtio-blk \ -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ -netdev type=user,id=net0 \ -device virtio-gpu-pci \ -device vmware-svga,id=video0,vgamem_mb=16it does not boot,but I get the UEFI shell. I see that the image that I have put there as cdrom is not detected. Maybe I should convert the img file to iso.On Sat, Aug 12, 2023 at 10:30 PM Валентин wrote:And one more thing, to enable keyboard and maybe mouse, try to add: -usb -device nec-usb-xhci \-device usb-kbd -device usb-mouse After that I'm able to input commands in EFI shell. With best regards, Valentine.-- Mario. -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
Which version of qemu are you using ? On Sat, Aug 12, 2023 at 10:40 PM Mario Marietto wrote: > 've removed the line : > > -drive file=/mnt/fisso/bhyve/img/FreeBSD/FreeBSD.img,id=virtio-blk,if=none > \ > > and I tried to boot only the boot image file : > > qemu-system-arm \ > -enable-kvm -serial stdio \ > -m 512 -M virt -cpu cortex-a15 \ > -drive > if=pflash,format=raw,unit=1,file=/usr/share/AAVMF/AAVMF32_VARS.fd \ > -drive > if=pflash,format=raw,unit=0,file=/usr/share/AAVMF/AAVMF32_CODE.fd \ > -boot d -cdrom > /mnt/fisso/OS/ISO/BSD/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img \ > -device virtio-blk,drive=virtio-blk \ > -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ > -netdev type=user,id=net0 \ > -device virtio-gpu-pci \ > -device vmware-svga,id=video0,vgamem_mb=16 > > it does not boot,but I get the UEFI shell. I see that the image that I > have put there as cdrom is not detected. Maybe I should convert the img > file to iso. > > On Sat, Aug 12, 2023 at 10:30 PM Валентин wrote: > >> And one more thing, to enable keyboard and maybe mouse, try to add: >> >> -usb -device nec-usb-xhci \ >> -device usb-kbd -device usb-mouse >> >> After that I'm able to input commands in EFI shell. >> >> With best regards, >> Valentine. >> >> > > -- > Mario. > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
've removed the line : -drive file=/mnt/fisso/bhyve/img/FreeBSD/FreeBSD.img,id=virtio-blk,if=none \ and I tried to boot only the boot image file : qemu-system-arm \ -enable-kvm -serial stdio \ -m 512 -M virt -cpu cortex-a15 \ -drive if=pflash,format=raw,unit=1,file=/usr/share/AAVMF/AAVMF32_VARS.fd \ -drive if=pflash,format=raw,unit=0,file=/usr/share/AAVMF/AAVMF32_CODE.fd \ -boot d -cdrom /mnt/fisso/OS/ISO/BSD/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img \ -device virtio-blk,drive=virtio-blk \ -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ -netdev type=user,id=net0 \ -device virtio-gpu-pci \ -device vmware-svga,id=video0,vgamem_mb=16 it does not boot,but I get the UEFI shell. I see that the image that I have put there as cdrom is not detected. Maybe I should convert the img file to iso. On Sat, Aug 12, 2023 at 10:30 PM Валентин wrote: > And one more thing, to enable keyboard and maybe mouse, try to add: > > -usb -device nec-usb-xhci \ > -device usb-kbd -device usb-mouse > > After that I'm able to input commands in EFI shell. > > With best regards, > Valentine. > > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
And one more thing, to enable keyboard and maybe mouse, try to add: -usb -device nec-usb-xhci \-device usb-kbd -device usb-mouse After that I'm able to input commands in EFI shell. With best regards, Valentine.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
> Can you give me the qemu parameters that you use ? they should not be so > different from armhf. I'm running it with: qemu-system-aarch64 \-M virt -cpu > cortex-a15 -m 128 -net none \-k en-us \-device virtio-gpu-pci \-drive > if=pflash,readonly=on,format=raw,file=AAVMF32_CODE.fd \-L > /path/to/bioses/directory/ \-vnc unix:vncsocket \-qmp > unix:qmpsocket,server,nowait \-monitor vc \-overcommit mem-lock=off -rtc > base=localtime -nodefaults But you should probably skip the parts "-vnc", > "-qmp" and "-monitor" because they should be related to my particular setup > (I'm using it on a phone, the build is from limboemu/limbo project on > GitHub). The OVMF bios is from Debian distribution. I didn't connect any hdd > images, but at least the machine displays EFI shell prompt, so the bios > starts. Try to start the machine without KVM, maybe it causes problems? With > best regatds, Valentine.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
Can you give me the qemu parameters that you use ? they should not be so different from armhf. On Sat, Aug 12, 2023 at 6:35 PM Mario Marietto wrote: > I tried with this : > > qemu-system-arm \ > -enable-kvm -serial stdio \ > -m 512 -M virt -cpu cortex-a15 \ > -drive > if=pflash,format=raw,unit=1,file=/usr/share/AAVMF/AAVMF32_VARS.fd \ > -drive > if=pflash,format=raw,unit=0,file=/usr/share/AAVMF/AAVMF32_CODE.fd \ > -boot d -cdrom > /mnt/fisso/OS/ISO/BSD/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img \ > -drive > file=/mnt/fisso/bhyve/img/FreeBSD/FreeBSD.img,id=virtio-blk,if=none \ > -device virtio-blk,drive=virtio-blk \ > -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ > -netdev type=user,id=net0 \ > -device virtio-gpu-pci \ > -device vmware-svga,id=video0,vgamem_mb=16 > > > but nope,it does not boot : > > > [image: 2023-08-12_18-32.png] > > On Sat, Aug 12, 2023 at 6:28 PM Валентин wrote: > >> > qemu-system-arm -enable-kvm -serial stdio -m 512 -M virt -cpu >> cortex-a15 -drive ... >> >> Try to explicitly add video adapter: "-device virtio-gpu-pci". >> >> With best regards, >> Valentine. >> >> > > -- > Mario. > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I tried with this : qemu-system-arm \ -enable-kvm -serial stdio \ -m 512 -M virt -cpu cortex-a15 \ -drive if=pflash,format=raw,unit=1,file=/usr/share/AAVMF/AAVMF32_VARS.fd \ -drive if=pflash,format=raw,unit=0,file=/usr/share/AAVMF/AAVMF32_CODE.fd \ -boot d -cdrom /mnt/fisso/OS/ISO/BSD/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img \ -drive file=/mnt/fisso/bhyve/img/FreeBSD/FreeBSD.img,id=virtio-blk,if=none \ -device virtio-blk,drive=virtio-blk \ -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ -netdev type=user,id=net0 \ -device virtio-gpu-pci \ -device vmware-svga,id=video0,vgamem_mb=16 but nope,it does not boot : [image: 2023-08-12_18-32.png] On Sat, Aug 12, 2023 at 6:28 PM Валентин wrote: > > qemu-system-arm -enable-kvm -serial stdio -m 512 -M virt -cpu cortex-a15 > -drive ... > > Try to explicitly add video adapter: "-device virtio-gpu-pci". > > With best regards, > Valentine. > > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
> qemu-system-arm -enable-kvm -serial stdio -m 512 -M virt -cpu cortex-a15 > -drive ... Try to explicitly add video adapter: "-device virtio-gpu-pci". > With best regards, Valentine.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I think to be close,but it still does not work.These are the parameters that I used : /mnt/./monta-fisso sleep 2 qemu-system-arm \ -enable-kvm -serial stdio \ -m 512 -M virt -cpu cortex-a15 \ -drive file=/mnt/fisso/OS/FreeBSD/FreeBSD-13.2.qcow2,id=virtio-blk,if=none \ -device virtio-blk,drive=virtio-blk \ -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ -netdev type=user,id=net0 \ -drive if=pflash,format=raw,file=/usr/share/AAVMF/AAVMF32_CODE.fd \ unfortunately : [image: 2023-08-12_13-29.png] where could be the error ? On Sat, Aug 12, 2023 at 4:24 AM Валентин wrote: > > -bios "*.fd" > > Try "-pflash *.fd" or "-drive if=pflash,format=raw,file=*.fd", if it works > for Arm machines. > > I saw that OVMF developers didn't recommend to use "-bios" because image > will be mounted as ROM and will not be able to save bios settings. > > With best regards, > Valentine. > > Исходное сообщение > От: Mario Marietto > Дата: 12.08.2023 00:00 (GMT+03:00) > Кому: Валентин > Копия: Peter Maydell , qemu-discuss@nongnu.org > Тема: Re: Invalid accelerator kvm / error: kvm run failed Function not > implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook > running with a relatively recent kernel version and KVM enabled > > I've found the right uefi file to use : > > /usr/share/AAVMF/AAVMF32_CODE.fd > > so now every piece is on the right place (I hope) : > > qemu-system-arm \ > -enable-kvm -serial stdio \ > -m 512 -M virt -cpu cortex-a15 \ > -drive > file=/mnt/fisso/OS/FreeBSD/FreeBSD-13.2.qcow2,id=virtio-blk,if=none \ > -device virtio-blk,drive=virtio-blk \ > -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ > -smbios type=2 -nodefaults \ > -netdev type=user,id=net0 \ > -bios "/usr/share/AAVMF/AAVMF32_CODE.fd" > -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ > virtio_mmio.device=1M@0x4e00:74:0 \ > virtio_mmio.device=1M@0x4e10:75:1 \ > root=/dev/vda rw ip=dhcp --no-log" > > Does anyone still see some mistakes ? > > > On Fri, Aug 11, 2023 at 9:26 PM Mario Marietto > wrote: > >> I think that I've found it : >> >> qemu-efi-arm/stable 2020.11-2+deb11u1 all >> UEFI firmware for 32-bit ARM virtual machines >> >> On Fri, Aug 11, 2023 at 9:23 PM Mario Marietto >> wrote: >> >>> I remember. So,more or less,it should be something like this : >>> >>> qemu-system-arm \ >>> -enable-kvm -serial stdio \ >>> -m 512 -M virt -cpu cortex-a15 \ >>> -drive >>> file=/mnt/fisso/OS/FreeBSD/FreeBSD-13.2.qcow2,id=virtio-blk,if=none \ >>> -device virtio-blk,drive=virtio-blk \ >>> -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ >>> -smbios type=2 -nodefaults \ >>> -netdev type=user,id=net0 \ >>> -bios "OVMF_CODE.fd" >>> -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ >>> virtio_mmio.device=1M@0x4e00:74:0 \ >>> virtio_mmio.device=1M@0x4e10:75:1 \ >>> root=/dev/vda rw ip=dhcp --no-log" >>> >>> The problem is that devuan does not offer the proper OVMF file,as you can >>> see : >>> >>> # apt search ovmf >>> >>> Sorting... Done >>> Full Text Search... Done >>> >>> ovmf/stable 2020.11-2+deb11u1 all >>> UEFI firmware for 64-bit x86 virtual machines >>> >>> ovmf-ia32/stable 2020.11-2+deb11u1 all >>> UEFI firmware for 32-bit x86 virtual machines >>> >>> These UEFI files are for x86-64 bit,so they are not good for armhf. Where I >>> can find the right ones ? >>> >>> >>> On Fri, Aug 11, 2023 at 8:33 PM Валентин wrote: >>> > between the qemu parameters I should put : initrd and vmlinuz,right ? Try "-kernel kernel.img -initrd initrd.img". Oh, too late. :) By the way, I myself didn't experiment much with qemu-system-arm, but people successfully ran hdd/iso images with EFI bioses (for Arm architecture), if I'm not mistaken. With regards. >>> >>> -- >>> Mario. >>> >> >> >> -- >> Mario. >> > > > -- > Mario. > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
> -bios "*.fd" Try "-pflash *.fd" or "-drive if=pflash,format=raw,file=*.fd", > if it works for Arm machines. I saw that OVMF developers didn't recommend to > use "-bios" because image will be mounted as ROM and will not be able to save > bios settings. With best regards, Valentine. Исходное сообщение От: Mario Marietto Дата: 12.08.2023 00:00 (GMT+03:00) Кому: Валентин Копия: Peter Maydell , qemu-discuss@nongnu.org Тема: Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enabled I've found the right uefi file to use :/usr/share/AAVMF/AAVMF32_CODE.fdso now every piece is on the right place (I hope) :qemu-system-arm \ -enable-kvm -serial stdio \ -m 512 -M virt -cpu cortex-a15 \ -drive file=/mnt/fisso/OS/FreeBSD/FreeBSD-13.2.qcow2,id=virtio-blk,if=none \ -device virtio-blk,drive=virtio-blk \ -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \-smbios type=2 -nodefaults \ -netdev type=user,id=net0 \-bios "/usr/share/AAVMF/AAVMF32_CODE.fd" -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ virtio_mmio.device=1M@0x4e00:74:0 \ virtio_mmio.device=1M@0x4e10:75:1 \ root=/dev/vda rw ip=dhcp --no-log"Does anyone still see some mistakes ? On Fri, Aug 11, 2023 at 9:26 PM Mario Marietto wrote:I think that I've found it :qemu-efi-arm/stable 2020.11-2+deb11u1 all UEFI firmware for 32-bit ARM virtual machinesOn Fri, Aug 11, 2023 at 9:23 PM Mario Marietto wrote:I remember. So,more or less,it should be something like this :qemu-system-arm \ -enable-kvm -serial stdio \ -m 512 -M virt -cpu cortex-a15 \ -drive file=/mnt/fisso/OS/FreeBSD/FreeBSD-13.2.qcow2,id=virtio-blk,if=none \ -device virtio-blk,drive=virtio-blk \ -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \-smbios type=2 -nodefaults \ -netdev type=user,id=net0 \-bios "OVMF_CODE.fd" -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ virtio_mmio.device=1M@0x4e00:74:0 \ virtio_mmio.device=1M@0x4e10:75:1 \ root=/dev/vda rw ip=dhcp --no-log"The problem is that devuan does not offer the proper OVMF file,as you can see :# apt search ovmfSorting... DoneFull Text Search... Doneovmf/stable 2020.11-2+deb11u1 all UEFI firmware for 64-bit x86 virtual machinesovmf-ia32/stable 2020.11-2+deb11u1 all UEFI firmware for 32-bit x86 virtual machinesThese UEFI files are for x86-64 bit,so they are not good for armhf. Where I can find the right ones ?On Fri, Aug 11, 2023 at 8:33 PM Валентин wrote:> between the qemu parameters I should put : initrd and vmlinuz,right ? Try "-kernel kernel.img -initrd initrd.img". Oh, too late. :) By the way, I myself didn't experiment much with qemu-system-arm, but people successfully ran hdd/iso images with EFI bioses (for Arm architecture), if I'm not mistaken. With regards.-- Mario. -- Mario. -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I've found the right uefi file to use : /usr/share/AAVMF/AAVMF32_CODE.fd so now every piece is on the right place (I hope) : qemu-system-arm \ -enable-kvm -serial stdio \ -m 512 -M virt -cpu cortex-a15 \ -drive file=/mnt/fisso/OS/FreeBSD/FreeBSD-13.2.qcow2,id=virtio-blk,if=none \ -device virtio-blk,drive=virtio-blk \ -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ -smbios type=2 -nodefaults \ -netdev type=user,id=net0 \ -bios "/usr/share/AAVMF/AAVMF32_CODE.fd" -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ virtio_mmio.device=1M@0x4e00:74:0 \ virtio_mmio.device=1M@0x4e10:75:1 \ root=/dev/vda rw ip=dhcp --no-log" Does anyone still see some mistakes ? On Fri, Aug 11, 2023 at 9:26 PM Mario Marietto wrote: > I think that I've found it : > > qemu-efi-arm/stable 2020.11-2+deb11u1 all > UEFI firmware for 32-bit ARM virtual machines > > On Fri, Aug 11, 2023 at 9:23 PM Mario Marietto > wrote: > >> I remember. So,more or less,it should be something like this : >> >> qemu-system-arm \ >> -enable-kvm -serial stdio \ >> -m 512 -M virt -cpu cortex-a15 \ >> -drive >> file=/mnt/fisso/OS/FreeBSD/FreeBSD-13.2.qcow2,id=virtio-blk,if=none \ >> -device virtio-blk,drive=virtio-blk \ >> -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ >> -smbios type=2 -nodefaults \ >> -netdev type=user,id=net0 \ >> -bios "OVMF_CODE.fd" >> -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ >> virtio_mmio.device=1M@0x4e00:74:0 \ >> virtio_mmio.device=1M@0x4e10:75:1 \ >> root=/dev/vda rw ip=dhcp --no-log" >> >> The problem is that devuan does not offer the proper OVMF file,as you can >> see : >> >> # apt search ovmf >> >> Sorting... Done >> Full Text Search... Done >> >> ovmf/stable 2020.11-2+deb11u1 all >> UEFI firmware for 64-bit x86 virtual machines >> >> ovmf-ia32/stable 2020.11-2+deb11u1 all >> UEFI firmware for 32-bit x86 virtual machines >> >> These UEFI files are for x86-64 bit,so they are not good for armhf. Where I >> can find the right ones ? >> >> >> On Fri, Aug 11, 2023 at 8:33 PM Валентин wrote: >> >>> > between the qemu parameters I should put : initrd and vmlinuz,right ? >>> >>> Try "-kernel kernel.img -initrd initrd.img". >>> Oh, too late. :) >>> >>> By the way, I myself didn't experiment much with qemu-system-arm, but >>> people successfully ran hdd/iso images with EFI bioses (for Arm >>> architecture), if I'm not mistaken. >>> >>> With regards. >>> >>> >> >> -- >> Mario. >> > > > -- > Mario. > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I think that I've found it : qemu-efi-arm/stable 2020.11-2+deb11u1 all UEFI firmware for 32-bit ARM virtual machines On Fri, Aug 11, 2023 at 9:23 PM Mario Marietto wrote: > I remember. So,more or less,it should be something like this : > > qemu-system-arm \ > -enable-kvm -serial stdio \ > -m 512 -M virt -cpu cortex-a15 \ > -drive > file=/mnt/fisso/OS/FreeBSD/FreeBSD-13.2.qcow2,id=virtio-blk,if=none \ > -device virtio-blk,drive=virtio-blk \ > -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ > -smbios type=2 -nodefaults \ > -netdev type=user,id=net0 \ > -bios "OVMF_CODE.fd" > -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ > virtio_mmio.device=1M@0x4e00:74:0 \ > virtio_mmio.device=1M@0x4e10:75:1 \ > root=/dev/vda rw ip=dhcp --no-log" > > The problem is that devuan does not offer the proper OVMF file,as you can see > : > > # apt search ovmf > > Sorting... Done > Full Text Search... Done > > ovmf/stable 2020.11-2+deb11u1 all > UEFI firmware for 64-bit x86 virtual machines > > ovmf-ia32/stable 2020.11-2+deb11u1 all > UEFI firmware for 32-bit x86 virtual machines > > These UEFI files are for x86-64 bit,so they are not good for armhf. Where I > can find the right ones ? > > > On Fri, Aug 11, 2023 at 8:33 PM Валентин wrote: > >> > between the qemu parameters I should put : initrd and vmlinuz,right ? >> >> Try "-kernel kernel.img -initrd initrd.img". >> Oh, too late. :) >> >> By the way, I myself didn't experiment much with qemu-system-arm, but >> people successfully ran hdd/iso images with EFI bioses (for Arm >> architecture), if I'm not mistaken. >> >> With regards. >> >> > > -- > Mario. > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I remember. So,more or less,it should be something like this : qemu-system-arm \ -enable-kvm -serial stdio \ -m 512 -M virt -cpu cortex-a15 \ -drive file=/mnt/fisso/OS/FreeBSD/FreeBSD-13.2.qcow2,id=virtio-blk,if=none \ -device virtio-blk,drive=virtio-blk \ -device virtio-net,netdev=net0,mac="52:54:00:12:34:55" \ -smbios type=2 -nodefaults \ -netdev type=user,id=net0 \ -bios "OVMF_CODE.fd" -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ virtio_mmio.device=1M@0x4e00:74:0 \ virtio_mmio.device=1M@0x4e10:75:1 \ root=/dev/vda rw ip=dhcp --no-log" The problem is that devuan does not offer the proper OVMF file,as you can see : # apt search ovmf Sorting... Done Full Text Search... Done ovmf/stable 2020.11-2+deb11u1 all UEFI firmware for 64-bit x86 virtual machines ovmf-ia32/stable 2020.11-2+deb11u1 all UEFI firmware for 32-bit x86 virtual machines These UEFI files are for x86-64 bit,so they are not good for armhf. Where I can find the right ones ? On Fri, Aug 11, 2023 at 8:33 PM Валентин wrote: > > between the qemu parameters I should put : initrd and vmlinuz,right ? > > Try "-kernel kernel.img -initrd initrd.img". > Oh, too late. :) > > By the way, I myself didn't experiment much with qemu-system-arm, but > people successfully ran hdd/iso images with EFI bioses (for Arm > architecture), if I'm not mistaken. > > With regards. > > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
> between the qemu parameters I should put : initrd and vmlinuz,right ? Try > "-kernel kernel.img -initrd initrd.img". Oh, too late. :) By the way, I > myself didn't experiment much with qemu-system-arm, but people successfully > ran hdd/iso images with EFI bioses (for Arm architecture), if I'm not > mistaken. With regards.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
On Fri, 11 Aug 2023 at 18:52, Mario Marietto wrote: > > ok. I could extract the kernel files (so,between the qemu parameters I should > put : initrd and vmlinuz,right ? How ? > > -enable-kvm -serial stdio -kernel vmlinux -what here initrd \ > > from the ubuntu 22.10 img,but I'm sure that it does not have any dtb file. I > never needed a dtb file when I booted my vms,neither with qemu,nor with bhyve. The option for the initrd is '-initrd'. You don't need a dtb file if you are using the "virt" machine type, because that machine type will create a suitable DTB within QEMU to pass to the kernel. You only need it with arm machine types that are emulating real hardware, like vexpress-a15. Here it matches how a real boot loader like uboot works -- uboot loads the kernel, initrd and dtb file. (A few boards in real hardware, like the raspberry pi, provide the dtb file with their firmware for the bootloader to pick up, rather than having the distro ship the dtb alongside the kernel image file. QEMU's emulation of those boards requires the user to provide the dtb file to it anyway. The vexpress hardware never did this in any case, you always had to build a kernel and a dtb file.) thanks -- PMM
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
ok. I could extract the kernel files (so,between the qemu parameters I should put : initrd and vmlinuz,right ? How ? -enable-kvm -serial stdio -kernel vmlinux -what here initrd \ from the ubuntu 22.10 img,but I'm sure that it does not have any dtb file. I never needed a dtb file when I booted my vms,neither with qemu,nor with bhyve. On Fri, Aug 11, 2023 at 7:44 PM Peter Maydell wrote: > On Fri, 11 Aug 2023 at 18:27, Mario Marietto > wrote: > > > > ok. I've been lucky. Qemu compiled successfully. Now I'm going to > execute this command : > > > > qemu-system-arm \ > > -enable-kvm -serial stdio -kernel zImage \ > > -m 512 -M vexpress-a15 -cpu cortex-a15 \ > > -drive > file=/mnt/fisso/bhyve/img/Linux/ubuntu2210.img,id=virtio-blk,if=none \ > > -device virtio-blk,drive=virtio-blk,transport=virtio-mmio.0 \ > > -device > virtio-net,transport=virtio-mmio.1,netdev=net0,mac="52:54:00:12:34:55" \ > > -netdev type=user,id=net0 \ > > -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ > > virtio_mmio.device=1M@0x4e00:74:0 \ > > virtio_mmio.device=1M@0x4e10:75:1 \ > > root=/dev/vda rw ip=dhcp --no-log" > > > > I would ask you : let's assume that I have already installed ubuntu > 22.10 and that it is inside the file called "ubuntu2210.img". > > I would like to know how to remove the parameter "-kernel > zImage",because in that case I don't need it. > > The problem is that if I remove it without adding some other > parameter,it says that I should use it. > > But I don't need it to declare the kernel within the qemu parameters > because it is inside the file "ubuntu2210.img". > > You can't do that. There is no guest BIOS image for that machine > type which knows how to read disk images and boot from them. > So you must manually extract (or otherwise provide) a suitable > kernel (and perhaps also initrd and dtb file) and pass them > to QEMU, because QEMU's "built in bootloader" is very simple > and just loads the kernel file and jumps to it. > > thanks > -- PMM > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
On Fri, 11 Aug 2023 at 18:27, Mario Marietto wrote: > > ok. I've been lucky. Qemu compiled successfully. Now I'm going to execute > this command : > > qemu-system-arm \ > -enable-kvm -serial stdio -kernel zImage \ > -m 512 -M vexpress-a15 -cpu cortex-a15 \ > -drive > file=/mnt/fisso/bhyve/img/Linux/ubuntu2210.img,id=virtio-blk,if=none \ > -device virtio-blk,drive=virtio-blk,transport=virtio-mmio.0 \ > -device > virtio-net,transport=virtio-mmio.1,netdev=net0,mac="52:54:00:12:34:55" \ > -netdev type=user,id=net0 \ > -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ > virtio_mmio.device=1M@0x4e00:74:0 \ > virtio_mmio.device=1M@0x4e10:75:1 \ > root=/dev/vda rw ip=dhcp --no-log" > > I would ask you : let's assume that I have already installed ubuntu 22.10 and > that it is inside the file called "ubuntu2210.img". > I would like to know how to remove the parameter "-kernel zImage",because in > that case I don't need it. > The problem is that if I remove it without adding some other parameter,it > says that I should use it. > But I don't need it to declare the kernel within the qemu parameters because > it is inside the file "ubuntu2210.img". You can't do that. There is no guest BIOS image for that machine type which knows how to read disk images and boot from them. So you must manually extract (or otherwise provide) a suitable kernel (and perhaps also initrd and dtb file) and pass them to QEMU, because QEMU's "built in bootloader" is very simple and just loads the kernel file and jumps to it. thanks -- PMM
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
ok. I've been lucky. Qemu compiled successfully. Now I'm going to execute this command : qemu-system-arm \ -enable-kvm -serial stdio -kernel zImage \ -m 512 -M vexpress-a15 -cpu cortex-a15 \ -drive file=/mnt/fisso/bhyve/img/Linux/ubuntu2210.img,id=virtio-blk,if=none \ -device virtio-blk,drive=virtio-blk,transport=virtio-mmio.0 \ -device virtio-net,transport=virtio-mmio.1,netdev=net0,mac="52:54:00:12:34:55" \ -netdev type=user,id=net0 \ -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ virtio_mmio.device=1M@0x4e00:74:0 \ virtio_mmio.device=1M@0x4e10:75:1 \ root=/dev/vda rw ip=dhcp --no-log" I would ask you : let's assume that I have already installed ubuntu 22.10 and that it is inside the file called "ubuntu2210.img". I would like to know how to remove the parameter "-kernel zImage",because in that case I don't need it. The problem is that if I remove it without adding some other parameter,it says that I should use it. But I don't need it to declare the kernel within the qemu parameters because it is inside the file "ubuntu2210.img". On Fri, Aug 11, 2023 at 6:17 PM Peter Maydell wrote: > On Fri, 11 Aug 2023 at 17:05, Mario Marietto > wrote: > > > > I made some progress,but unfortunately I've got an error : > > > > root@devuan:~/Desktop/qemu-v5.1.0# ./configure > --target-list=arm-softmmu --enable-opengl --enable-gtk --enable-kvm > --enable-guest-agent --enable-spice --audio-drv-list="oss pa" > --enable-libusb > > > > no errors here. > > > > root@devuan:~/Desktop/qemu-v5.1.0# make > > > > ... > > > > CC hw/usb/hcd-xhci.o > > hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: > > hw/usb/hcd-xhci.c:3358:66: error: ‘%d’ directive output may be truncated > writing between 1 and 8 bytes into a region of size 5 > [-Werror=format-truncation=] > > 3358 | snprintf(port->name, sizeof(port->name), "usb2 port > #%d", i+1); > > | > ^~ > > hw/usb/hcd-xhci.c:3358:54: note: directive argument in the range [1, > 89478486] > > 3358 | snprintf(port->name, sizeof(port->name), "usb2 port > #%d", i+1) > > | > ^~~ > > In file included from /usr/include/stdio.h:867, > > from /root/Desktop/qemu-v5.1.0/include/qemu/osdep.h:85, > > from hw/usb/hcd-xhci.c:22: > > /usr/include/arm-linux-gnueabihf/bits/stdio2.h:67:10: note: > ‘__builtin___snprintf_chk’ output between 13 and 20 bytes into a > destination of size 16 > > This is the kind of thing you get when you try to build an > old QEMU on a newer compiler -- the new compiler complains about > more things, and we fix them in new QEMU. > > Pass configure '--disable-werror', which will mean that these > are all just warnings, not errors. Then see if there are > any problems still remaining that are real compile failures. > > -- PMM > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
On Fri, 11 Aug 2023 at 17:05, Mario Marietto wrote: > > I made some progress,but unfortunately I've got an error : > > root@devuan:~/Desktop/qemu-v5.1.0# ./configure --target-list=arm-softmmu > --enable-opengl --enable-gtk --enable-kvm --enable-guest-agent --enable-spice > --audio-drv-list="oss pa" --enable-libusb > > no errors here. > > root@devuan:~/Desktop/qemu-v5.1.0# make > > ... > > CC hw/usb/hcd-xhci.o > hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: > hw/usb/hcd-xhci.c:3358:66: error: ‘%d’ directive output may be truncated > writing between 1 and 8 bytes into a region of size 5 > [-Werror=format-truncation=] > 3358 | snprintf(port->name, sizeof(port->name), "usb2 port #%d", > i+1); > | ^~ > hw/usb/hcd-xhci.c:3358:54: note: directive argument in the range [1, 89478486] > 3358 | snprintf(port->name, sizeof(port->name), "usb2 port #%d", > i+1) > | ^~~ > In file included from /usr/include/stdio.h:867, > from /root/Desktop/qemu-v5.1.0/include/qemu/osdep.h:85, > from hw/usb/hcd-xhci.c:22: > /usr/include/arm-linux-gnueabihf/bits/stdio2.h:67:10: note: > ‘__builtin___snprintf_chk’ output between 13 and 20 bytes into a destination > of size 16 This is the kind of thing you get when you try to build an old QEMU on a newer compiler -- the new compiler complains about more things, and we fix them in new QEMU. Pass configure '--disable-werror', which will mean that these are all just warnings, not errors. Then see if there are any problems still remaining that are real compile failures. -- PMM
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I'm on devuan 4,so this is the default gcc compiler : root@devuan:~/Desktop/qemu-v5.1.0# gcc --version gcc (Debian 10.2.1-6) 10.2.1 20210110 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. On Fri, Aug 11, 2023 at 6:04 PM Mario Marietto wrote: > I made some progress,but unfortunately I've got an error : > > root@devuan:~/Desktop/qemu-v5.1.0# ./configure --target-list=arm-softmmu > --enable-opengl --enable-gtk --enable-kvm --enable-guest-agent > --enable-spice --audio-drv-list="oss pa" --enable-libusb > > no errors here. > > root@devuan:~/Desktop/qemu-v5.1.0# make > > ... > > CC hw/usb/hcd-xhci.o > hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: > hw/usb/hcd-xhci.c:3358:66: error: ‘%d’ directive output may be truncated > writing between 1 and 8 bytes into a region of size 5 > [-Werror=format-truncation=] > 3358 | snprintf(port->name, sizeof(port->name), "usb2 port > #%d", i+1); > | ^~ > hw/usb/hcd-xhci.c:3358:54: note: directive argument in the range [1, > 89478486] > 3358 | snprintf(port->name, sizeof(port->name), "usb2 port > #%d", i+1); > | > ^~~ > In file included from /usr/include/stdio.h:867, > from /root/Desktop/qemu-v5.1.0/include/qemu/osdep.h:85, > from hw/usb/hcd-xhci.c:22: > /usr/include/arm-linux-gnueabihf/bits/stdio2.h:67:10: note: > ‘__builtin___snprintf_chk’ output between 13 and 20 bytes into a > destination of size 16 >67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - > 1, > | > ^~~~ >68 |__bos (__s), __fmt, __va_arg_pack ()); > |~ > hw/usb/hcd-xhci.c:3372:66: error: ‘%d’ directive output may be truncated > writing between 1 and 8 bytes into a region of size 5 > [-Werror=format-truncation=] > 3372 | snprintf(port->name, sizeof(port->name), "usb3 port > #%d", i+1); > | ^~ > hw/usb/hcd-xhci.c:3372:54: note: directive argument in the range [1, > 89478486] > 3372 | snprintf(port->name, sizeof(port->name), "usb3 port > #%d", i+1); > | > ^~~ > In file included from /usr/include/stdio.h:867, > from /root/Desktop/qemu-v5.1.0/include/qemu/osdep.h:85, > from hw/usb/hcd-xhci.c:22: > /usr/include/arm-linux-gnueabihf/bits/stdio2.h:67:10: note: > ‘__builtin___snprintf_chk’ output between 13 and 20 bytes into a > destination of size 16 >67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - > 1, > | > ^~~~ >68 |__bos (__s), __fmt, __va_arg_pack ()); > |~ > cc1: all warnings being treated as errors > > On Fri, Aug 11, 2023 at 4:01 PM Peter Maydell > wrote: > >> On Fri, 11 Aug 2023 at 14:44, Валентин via >> wrote: >> > >> > > I've thought to compile it directly on the devuan 4 installed on the >> ARM chromebook. >> > >> > If you have native Arm toolchain, it's even simpler then – just try to >> "./configure" and "make". >> >> Specify a --target-list= option to configure unless you want to >> sit around forever while it compiles every single supported >> guest architecture :-) >> >> -- PMM >> > > > -- > Mario. > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I made some progress,but unfortunately I've got an error : root@devuan:~/Desktop/qemu-v5.1.0# ./configure --target-list=arm-softmmu --enable-opengl --enable-gtk --enable-kvm --enable-guest-agent --enable-spice --audio-drv-list="oss pa" --enable-libusb no errors here. root@devuan:~/Desktop/qemu-v5.1.0# make ... CC hw/usb/hcd-xhci.o hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: hw/usb/hcd-xhci.c:3358:66: error: ‘%d’ directive output may be truncated writing between 1 and 8 bytes into a region of size 5 [-Werror=format-truncation=] 3358 | snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1); | ^~ hw/usb/hcd-xhci.c:3358:54: note: directive argument in the range [1, 89478486] 3358 | snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1); | ^~~ In file included from /usr/include/stdio.h:867, from /root/Desktop/qemu-v5.1.0/include/qemu/osdep.h:85, from hw/usb/hcd-xhci.c:22: /usr/include/arm-linux-gnueabihf/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 13 and 20 bytes into a destination of size 16 67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ^~~~ 68 |__bos (__s), __fmt, __va_arg_pack ()); |~ hw/usb/hcd-xhci.c:3372:66: error: ‘%d’ directive output may be truncated writing between 1 and 8 bytes into a region of size 5 [-Werror=format-truncation=] 3372 | snprintf(port->name, sizeof(port->name), "usb3 port #%d", i+1); | ^~ hw/usb/hcd-xhci.c:3372:54: note: directive argument in the range [1, 89478486] 3372 | snprintf(port->name, sizeof(port->name), "usb3 port #%d", i+1); | ^~~ In file included from /usr/include/stdio.h:867, from /root/Desktop/qemu-v5.1.0/include/qemu/osdep.h:85, from hw/usb/hcd-xhci.c:22: /usr/include/arm-linux-gnueabihf/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 13 and 20 bytes into a destination of size 16 67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ^~~~ 68 |__bos (__s), __fmt, __va_arg_pack ()); |~ cc1: all warnings being treated as errors On Fri, Aug 11, 2023 at 4:01 PM Peter Maydell wrote: > On Fri, 11 Aug 2023 at 14:44, Валентин via > wrote: > > > > > I've thought to compile it directly on the devuan 4 installed on the > ARM chromebook. > > > > If you have native Arm toolchain, it's even simpler then – just try to > "./configure" and "make". > > Specify a --target-list= option to configure unless you want to > sit around forever while it compiles every single supported > guest architecture :-) > > -- PMM > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
On Fri, 11 Aug 2023 at 14:44, Валентин via wrote: > > > I've thought to compile it directly on the devuan 4 installed on the ARM > > chromebook. > > If you have native Arm toolchain, it's even simpler then – just try to > "./configure" and "make". Specify a --target-list= option to configure unless you want to sit around forever while it compiles every single supported guest architecture :-) -- PMM
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
> I've thought to compile it directly on the devuan 4 installed on the ARM > chromebook. If you have native Arm toolchain, it's even simpler then – just > try to "./configure" and "make". QEMU v5.1 will compile with at least GCC > v4.8. With best regards, Valentine.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I've thought to compile it directly on the devuan 4 installed on the ARM chromebook. On Fri, Aug 11, 2023 at 3:20 PM Валентин wrote: > Hello, I tried to compile executable for Arm64 some time ago. > > There is no special branch of QEMU for Arm hosts, you just need to find a > toolchain to cross-compile for Arm. > > Try to look at Linaro site, they have complete cross-configured GCC > toolchains. > > And then try script like this (note the LINARO_PATH variable, it should > point to toolchain's bin directory): > > #!/bin/sh > export LINARO_PATH="/linaro121_64/bin" > export ARCH="arm" > export LINARO_HOST="$ARCH-none-linux-gnueabihf" > export CROSS_COMPILE="$LINARO_PATH/$LINARO_HOST-" > export PATH="$PATH:$LINARO_PATH" > ./configure --host=$LINARO_HOST \ > --cc="$CROSS_COMPILE"gcc \ > --target-list=x86_64-softmmu \ > --cpu=$ARCH --with-coroutine=sigaltstack \ > --cross-prefix=$CROSS_COMPILE \ > --disable-plugins --disable-containers --disable-vhost-user > --disable-libvduse --disable-tpm --disable-attr --disable-malloc-trim > --disable-oss --disable-iconv \ > --extra-cflags="" \ > --extra-ldflags="" > > In short, you'll need to disable everything for a start, configure and see > if you have a minimal set of development libraries, needed to compile QEMU > (at least Glib, pixman and probably SDL2 if you won't connect via VNC). > The configure script will tell you if some libraries are missing. > > If configure will succeed, try to "make". > And maybe you'll need to add "--static" configure option (I didn't try it > because my setup needs shared libraries). > > With best regards, > Valentine. > > > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
Hello, I tried to compile executable for Arm64 some time ago. There is no special branch of QEMU for Arm hosts, you just need to find a toolchain to cross-compile for Arm. Try to look at Linaro site, they have complete cross-configured GCC toolchains. And then try script like this (note the LINARO_PATH variable, it should point to toolchain's bin directory):#!/bin/shexport LINARO_PATH="/linaro121_64/bin"export ARCH="arm"export LINARO_HOST="$ARCH-none-linux-gnueabihf"export CROSS_COMPILE="$LINARO_PATH/$LINARO_HOST-"export PATH="$PATH:$LINARO_PATH"./configure --host=$LINARO_HOST \--cc="$CROSS_COMPILE"gcc \--target-list=x86_64-softmmu \--cpu=$ARCH --with-coroutine=sigaltstack \--cross-prefix=$CROSS_COMPILE \--disable-plugins --disable-containers --disable-vhost-user --disable-libvduse --disable-tpm --disable-attr --disable-malloc-trim --disable-oss --disable-iconv \--extra-cflags="" \--extra-ldflags=""In short, you'll need to disable everything for a start, configure and see if you have a minimal set of development libraries, needed to compile QEMU (at least Glib, pixman and probably SDL2 if you won't connect via VNC). The configure script will tell you if some libraries are missing. If configure will succeed, try to "make". And maybe you'll need to add "--static" configure option (I didn't try it because my setup needs shared libraries). With best regards, Valentine.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
These are the config parameters if the hardware is x86_64 : ./configure --target-list=x86_64-softmmu --enable-opengl --enable-gtk --enable-kvm --enable-guest-agent --enable-spice --audio-drv-list="oss pa" --enable-libusb I don't know if those parameters are valid even for armhf. On Fri, Aug 11, 2023 at 3:00 PM Mario Marietto wrote: > ok thanks. Are the following parameters correct still today ? something is > missing ? thanks. > > a) to compile qemu : > > ./configure \ > --target-list=arm-softmmu \ > --audio-drv-list=alsa,pa \ > --enable-fdt --enable-kvm --enable-sdl > > b) to run a guest os (I want to virtualize FreeBSD) > > > qemu-system-arm \ > -enable-kvm -serial stdio -kernel (here I think that I should put the > FreeBSD kernel,but I'm not sure at all,I should ask) \ > -m 512 -M virt -cpu cortex-a15 \ > -drive file=ubuntu.img,id=virtio-blk,if=none \ > -device virtio-blk,drive=virtio-blk,transport=virtio-mmio.0 \ > -device > virtio-net,transport=virtio-mmio.1,netdev=net0,mac="52:54:00:12:34:55" \ > -netdev type=user,id=net0 \ > -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ > virtio_mmio.device=1M@0x4e00:74:0 \ > virtio_mmio.device=1M@0x4e10:75:1 \ root=/dev/vda rw ip=dhcp > --no-log" > > I used -M virt,because you said that -M vexpress-a15 is not good. I hope that > -cpu cortex-a15 is good,anyway. > > > On Fri, Aug 11, 2023 at 2:36 PM Paul Menzel wrote: > >> Dear Mario, >> >> >> Am 11.08.23 um 14:29 schrieb Mario Marietto: >> > ok. Can you share the github address ? I found the source code for >> > x86-x64 but not for armhf. >> The source code archive [1] contains the code for all architectures. >> From that you configure your build environment, where you can specify >> the target architecture. >> >> >> Kind regards, >> >> Paul >> >> >> PS: If 2008 in your email address is your year of birth, it looks like >> you are quite young. Great, that you are interested in computers and >> FLOSS in your age. >> >> PPS: Please try to follow the netiquette, and copy the behavior you see >> from lists. In this case, please use interleaved style [2], when replying. >> >> >> [1]: https://gitlab.com/qemu-project/qemu >> [2]: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style >> > > > -- > Mario. > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
ok thanks. Are the following parameters correct still today ? something is missing ? thanks. a) to compile qemu : ./configure \ --target-list=arm-softmmu \ --audio-drv-list=alsa,pa \ --enable-fdt --enable-kvm --enable-sdl b) to run a guest os (I want to virtualize FreeBSD) qemu-system-arm \ -enable-kvm -serial stdio -kernel (here I think that I should put the FreeBSD kernel,but I'm not sure at all,I should ask) \ -m 512 -M virt -cpu cortex-a15 \ -drive file=ubuntu.img,id=virtio-blk,if=none \ -device virtio-blk,drive=virtio-blk,transport=virtio-mmio.0 \ -device virtio-net,transport=virtio-mmio.1,netdev=net0,mac="52:54:00:12:34:55" \ -netdev type=user,id=net0 \ -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ virtio_mmio.device=1M@0x4e00:74:0 \ virtio_mmio.device=1M@0x4e10:75:1 \ root=/dev/vda rw ip=dhcp --no-log" I used -M virt,because you said that -M vexpress-a15 is not good. I hope that -cpu cortex-a15 is good,anyway. On Fri, Aug 11, 2023 at 2:36 PM Paul Menzel wrote: > Dear Mario, > > > Am 11.08.23 um 14:29 schrieb Mario Marietto: > > ok. Can you share the github address ? I found the source code for > > x86-x64 but not for armhf. > The source code archive [1] contains the code for all architectures. > From that you configure your build environment, where you can specify > the target architecture. > > > Kind regards, > > Paul > > > PS: If 2008 in your email address is your year of birth, it looks like > you are quite young. Great, that you are interested in computers and > FLOSS in your age. > > PPS: Please try to follow the netiquette, and copy the behavior you see > from lists. In this case, please use interleaved style [2], when replying. > > > [1]: https://gitlab.com/qemu-project/qemu > [2]: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
Dear Mario, Am 11.08.23 um 14:29 schrieb Mario Marietto: ok. Can you share the github address ? I found the source code for x86-x64 but not for armhf. The source code archive [1] contains the code for all architectures. From that you configure your build environment, where you can specify the target architecture. Kind regards, Paul PS: If 2008 in your email address is your year of birth, it looks like you are quite young. Great, that you are interested in computers and FLOSS in your age. PPS: Please try to follow the netiquette, and copy the behavior you see from lists. In this case, please use interleaved style [2], when replying. [1]: https://gitlab.com/qemu-project/qemu [2]: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
On Fri, 11 Aug 2023 at 13:30, Mario Marietto wrote: > > ok. Can you share the github address ? I found the source code for x86-x64 > but not for armhf. There is not, and has never been, a separate git tree for different guest architectures. It is all in the one git tree at https://gitlab.com/qemu-project/qemu NB that we use gitlab, not github; there is a github repo, but it is just a mirror of the official gitlab. Your screenshot shows nothing because you are looking at branches, not at tags. v5.1.0 is a tag. -- PMM
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
ok. Can you share the github address ? I found the source code for x86-x64 but not for armhf. On Fri, Aug 11, 2023 at 1:49 PM Peter Maydell wrote: > On Fri, 11 Aug 2023 at 12:19, Mario Marietto > wrote: > > Anyway,can you tell me where is the branch 5.1 for the qemu source code > for armhf ? > > You want the "v5.1.0" git tag. > > -- PMM > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
On Fri, 11 Aug 2023 at 12:19, Mario Marietto wrote: > Anyway,can you tell me where is the branch 5.1 for the qemu source code for > armhf ? You want the "v5.1.0" git tag. -- PMM
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
I know. I've been working on this project since 1 year ago. But I'm stimulated by the "intellectual" challenge and even because old hardware should not be thrown away only because it is old. If it is still useful,it could be reused. The ARM chromebook in my opinion has been a nice toy to play with. Even today it gave me some satisfaction. And you know,I'm very poor. I can't buy new hardware. I really would like to buy a new arm64 laptop like the pine64,but I can't spend the money. Anyway,can you tell me where is the branch 5.1 for the qemu source code for armhf ? 5.1 should still have the support for kvm. I've also been unlucky because devuan 4 has 5.2 by default. It's only one minor version than 5.1. And anyway,if the version was good, I could not enjoy myself with this new challenge. On Fri, Aug 11, 2023 at 12:48 PM Peter Maydell wrote: > On Fri, 11 Aug 2023 at 11:34, Mario Marietto > wrote: > > > > ok. I will recompile a qemu version lower than 5.2. I've asked all > around and someone says that I should use 5.1,someone else 4.9. Which > version should I use ? And,please can you point me to a good tutorial that > can teach me the procedure to recompile it ? I might find it by myself,but > what I need is the place where I should grab the source code of qemu for > armhf. I also need the compilation parameters :) thanks... > > This is all ancient history which I can't remember. > You might even find that QEMUs that old don't compile > any more, depending on how new your userspace is. > You can get older QEMUs either by source tarball from > the QEMU project website or by checking out the appropriate > git tag. > > You're trying to do something which is basically > "travel back in time and use decade old hardware and > decade old software to do something that is going to > perform terribly and is no longer supported because > it's just not worth it". There are not really going to > be any tutorials or help for this -- if you want to > do it you get to find out all the places where stuff > doesn't quite work the way it used to and you need to > fix or adjust them. > > -- PMM > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
On Fri, 11 Aug 2023 at 11:34, Mario Marietto wrote: > > ok. I will recompile a qemu version lower than 5.2. I've asked all around and > someone says that I should use 5.1,someone else 4.9. Which version should I > use ? And,please can you point me to a good tutorial that can teach me the > procedure to recompile it ? I might find it by myself,but what I need is the > place where I should grab the source code of qemu for armhf. I also need the > compilation parameters :) thanks... This is all ancient history which I can't remember. You might even find that QEMUs that old don't compile any more, depending on how new your userspace is. You can get older QEMUs either by source tarball from the QEMU project website or by checking out the appropriate git tag. You're trying to do something which is basically "travel back in time and use decade old hardware and decade old software to do something that is going to perform terribly and is no longer supported because it's just not worth it". There are not really going to be any tutorials or help for this -- if you want to do it you get to find out all the places where stuff doesn't quite work the way it used to and you need to fix or adjust them. -- PMM
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
ok. I will recompile a qemu version lower than 5.2. I've asked all around and someone says that I should use 5.1,someone else 4.9. Which version should I use ? And,please can you point me to a good tutorial that can teach me the procedure to recompile it ? I might find it by myself,but what I need is the place where I should grab the source code of qemu for armhf. I also need the compilation parameters :) thanks... On Fri, Aug 11, 2023 at 12:01 PM Peter Maydell wrote: > On Thu, 10 Aug 2023 at 18:28, Mario Marietto > wrote: > > > > ---> You can't use KVM with the vexpress-a15 board. The only Arm guest > machine that will work with KVM is the "virt" board. > > > > point 1) > > > > On the virtual open systems website they used the vexpress-a15 board. > You can read by yourself what they say : > > This virtual open systems guide is absolutely ancient: it must > be at least a decade old, and dates from the very early days of > KVM on Arm. I can't read the whole document, but > I would not be surprised if they were using a custom branch > of QEMU, or they might have been using a QEMU from > before we added emulation of TrustZone to that board (which > KVM can't emulate). You can see in the instructions that > they're using a custom branch of the guest kernel (and a > very ancient kernel). > > It's not a very good guide to what will work today. > > > On the devuan 4 host os that I have installed I'm using kernel > 5.4,that's lower than 5.7,so the qemu support for it should be there. > > It's in the kernel, but you're using a QEMU which has > dropped the support. > > -- PMM > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
On Thu, 10 Aug 2023 at 18:28, Mario Marietto wrote: > > ---> You can't use KVM with the vexpress-a15 board. The only Arm guest > machine that will work with KVM is the "virt" board. > > point 1) > > On the virtual open systems website they used the vexpress-a15 board. You can > read by yourself what they say : This virtual open systems guide is absolutely ancient: it must be at least a decade old, and dates from the very early days of KVM on Arm. I can't read the whole document, but I would not be surprised if they were using a custom branch of QEMU, or they might have been using a QEMU from before we added emulation of TrustZone to that board (which KVM can't emulate). You can see in the instructions that they're using a custom branch of the guest kernel (and a very ancient kernel). It's not a very good guide to what will work today. > On the devuan 4 host os that I have installed I'm using kernel 5.4,that's > lower than 5.7,so the qemu support for it should be there. It's in the kernel, but you're using a QEMU which has dropped the support. -- PMM
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
---> You can't use KVM with the vexpress-a15 board. The only Arm guest machine that will work with KVM is the "virt" board. ok,I tried -M virt like this : qemu-system-arm \ -enable-kvm -serial stdio -kernel zImage \ -m 512 -M virt -cpu cortex-a15 \ but I've got the same error : qemu-system-arm: invalid accelerator kvm On Thu, Aug 10, 2023 at 7:27 PM Mario Marietto wrote: > ---> You can't use KVM with the vexpress-a15 board. The only Arm guest > machine that will work with KVM is the "virt" board. > > point 1) > > On the virtual open systems website they used the vexpress-a15 board. You > can read by yourself what they say : > > The guests that we will create later will be based on the Versatile > Express QEMU machine model. For we will use a different kernel branch > specific to that platform: > > > $ git checkout origin/kvm-vexpress-3.9$ curl > http://www.virtualopensystems.com/downloads/guides/kvm_on_chromebook/guest-config > > .config$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage dtbs -j4 > > > Then we can append the dtb file to the kernel image with: > > > $ cat arch/arm/boot/dts/rtsm_ve-cortex_a15x1.dtb >> arch/arm/boot/zImage > > > That way we only need to handle one file. Make sure to copy > *arch/arm/boot/zImage* for later usage. > > > point 2) > > > On the devuan 4 host os that I have installed I'm using kernel 5.4,that's > lower than 5.7,so the qemu support for it should be there. > > > point 3) > > > if I use the "virt" board,does the KVM acceleration work ? > > > thanks. > > On Thu, Aug 10, 2023 at 7:07 PM Peter Maydell > wrote: > >> On Thu, 10 Aug 2023 at 17:52, Mario Marietto >> wrote: >> >> > I conducted some further experiments : >> > >> > In this example I've used qemu 5.2.0 installed by default by the devuan >> 4 : >> > >> > >> > qemu-system-arm \ >> > -enable-kvm -serial stdio -kernel zImage \ >> > -m 512 -M vexpress-a15 -cpu cortex-a15 \ >> > -drive >> file=/mnt/fisso/bhyve/img/Linux/ubuntu2210.img,id=virtio-blk,if=none \ >> > -device virtio-blk,drive=virtio-blk,transport=virtio-mmio.0 \ >> > -device >> virtio-net,transport=virtio-mmio.1,netdev=net0,mac="52:54:00:12:34:55" \ >> > -netdev type=user,id=net0 \ >> > -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ >> > virtio_mmio.device=1M@0x4e00:74:0 \ >> > virtio_mmio.device=1M@0x4e10:75:1 \ >> > root=/dev/vda rw ip=dhcp --no-log" >> > >> > qemu-system-arm: invalid accelerator kvm. >> >> You can't use KVM with the vexpress-a15 board. The only >> Arm guest machine that will work with KVM is the "virt" >> board. >> >> Further, it looks like your host CPU is 32-bit. QEMU 5.2 >> dropped support for running KVM on 32-bit hosts, because this >> support was dropped from host kernels in kernel version 5.7. >> >> Basically, 32-bit hosts are just too small to do anything >> sensible with virtual machines, which is why the kernel >> (and in turn QEMU) dropped that support. If you want >> to play around with Arm virtualization, use a 64-bit host. >> (64-bit hosts can still use KVM to virtualize 32-bit >> guests if you want 32-bit guests.) >> >> thanks >> -- PMM >> > > > -- > Mario. > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
---> You can't use KVM with the vexpress-a15 board. The only Arm guest machine that will work with KVM is the "virt" board. point 1) On the virtual open systems website they used the vexpress-a15 board. You can read by yourself what they say : The guests that we will create later will be based on the Versatile Express QEMU machine model. For we will use a different kernel branch specific to that platform: $ git checkout origin/kvm-vexpress-3.9$ curl http://www.virtualopensystems.com/downloads/guides/kvm_on_chromebook/guest-config > .config$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage dtbs -j4 Then we can append the dtb file to the kernel image with: $ cat arch/arm/boot/dts/rtsm_ve-cortex_a15x1.dtb >> arch/arm/boot/zImage That way we only need to handle one file. Make sure to copy *arch/arm/boot/zImage* for later usage. point 2) On the devuan 4 host os that I have installed I'm using kernel 5.4,that's lower than 5.7,so the qemu support for it should be there. point 3) if I use the "virt" board,does the KVM acceleration work ? thanks. On Thu, Aug 10, 2023 at 7:07 PM Peter Maydell wrote: > On Thu, 10 Aug 2023 at 17:52, Mario Marietto > wrote: > > > I conducted some further experiments : > > > > In this example I've used qemu 5.2.0 installed by default by the devuan > 4 : > > > > > > qemu-system-arm \ > > -enable-kvm -serial stdio -kernel zImage \ > > -m 512 -M vexpress-a15 -cpu cortex-a15 \ > > -drive > file=/mnt/fisso/bhyve/img/Linux/ubuntu2210.img,id=virtio-blk,if=none \ > > -device virtio-blk,drive=virtio-blk,transport=virtio-mmio.0 \ > > -device > virtio-net,transport=virtio-mmio.1,netdev=net0,mac="52:54:00:12:34:55" \ > > -netdev type=user,id=net0 \ > > -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ > > virtio_mmio.device=1M@0x4e00:74:0 \ > > virtio_mmio.device=1M@0x4e10:75:1 \ > > root=/dev/vda rw ip=dhcp --no-log" > > > > qemu-system-arm: invalid accelerator kvm. > > You can't use KVM with the vexpress-a15 board. The only > Arm guest machine that will work with KVM is the "virt" > board. > > Further, it looks like your host CPU is 32-bit. QEMU 5.2 > dropped support for running KVM on 32-bit hosts, because this > support was dropped from host kernels in kernel version 5.7. > > Basically, 32-bit hosts are just too small to do anything > sensible with virtual machines, which is why the kernel > (and in turn QEMU) dropped that support. If you want > to play around with Arm virtualization, use a 64-bit host. > (64-bit hosts can still use KVM to virtualize 32-bit > guests if you want 32-bit guests.) > > thanks > -- PMM > -- Mario.
Re: Invalid accelerator kvm / error: kvm run failed Function not implemented ERRORS trying to virtualize a guest OS on the ARM Chromebook running with a relatively recent kernel version and KVM enable
On Thu, 10 Aug 2023 at 17:52, Mario Marietto wrote: > I conducted some further experiments : > > In this example I've used qemu 5.2.0 installed by default by the devuan 4 : > > > qemu-system-arm \ > -enable-kvm -serial stdio -kernel zImage \ > -m 512 -M vexpress-a15 -cpu cortex-a15 \ > -drive > file=/mnt/fisso/bhyve/img/Linux/ubuntu2210.img,id=virtio-blk,if=none \ > -device virtio-blk,drive=virtio-blk,transport=virtio-mmio.0 \ > -device > virtio-net,transport=virtio-mmio.1,netdev=net0,mac="52:54:00:12:34:55" \ > -netdev type=user,id=net0 \ > -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M \ > virtio_mmio.device=1M@0x4e00:74:0 \ > virtio_mmio.device=1M@0x4e10:75:1 \ > root=/dev/vda rw ip=dhcp --no-log" > > qemu-system-arm: invalid accelerator kvm. You can't use KVM with the vexpress-a15 board. The only Arm guest machine that will work with KVM is the "virt" board. Further, it looks like your host CPU is 32-bit. QEMU 5.2 dropped support for running KVM on 32-bit hosts, because this support was dropped from host kernels in kernel version 5.7. Basically, 32-bit hosts are just too small to do anything sensible with virtual machines, which is why the kernel (and in turn QEMU) dropped that support. If you want to play around with Arm virtualization, use a 64-bit host. (64-bit hosts can still use KVM to virtualize 32-bit guests if you want 32-bit guests.) thanks -- PMM