qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invalid accelerator kvm / error: kvm run failed Function not impleme


From: Mario Marietto
Subject: 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
Date: Mon, 14 Aug 2023 11:51:23 +0200

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="" data="" 0x4+0xa4160+0x4+0x116be3-
Loading configured modules...
/boot/kernel/umodem.ko text=0x1540 text=0xe90 data="" 0x4+0xe70+0x4+0xa7c
loading required module 'ucom'
/boot/kernel/ucom.ko text=0x19f8 text=0x2d18 data="" 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
---<<BOOT>>---
!!!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: 0x00000000)
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: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
clk_fixed0: <Fixed clock> on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
gic0: <ARM Generic Interrupt Controller> mem 0x8000000-0x800ffff,0x8010000-0x801ffff on ofwbus0
gic0: pn 0x2, arch 0x2, rev 0x0, implementer 0x43b irqs 288
gicv2m0: <ARM Generic Interrupt Controller MSI/MSIX> mem 0x8020000-0x8020fff on gic0
generic_timer0: <ARMv7 Generic Timer> irq 35,36,37,38 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
pcib0: <Generic PCI host controller> mem 0x3f000000-0x3fffffff on ofwbus0
pci0: <PCI bus> on pcib0
virtio_pci0: <VirtIO PCI (legacy) Network adapter> port 0x100-0x11f mem 0x11067000-0x11067fff,0x1105c000-0x1105ffff at device 1.0 on pci0
vtnet0: <VirtIO Networking Adapter> on virtio_pci0
vtnet0: Ethernet address: 52:54:00:12:34:55
virtio_pci1: <VirtIO PCI (modern) GPU adapter> 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: <NEC uPD720200 USB 3.0 controller> mem 0x11060000-0x11063fff at device 3.0 on pci0
xhci0: 32 bytes context size, 32-bit DMA
usbus0 on xhci0
vgapci0: <VGA-compatible display> port 0x120-0x12f mem 0x10000000-0x10ffffff,0x11040000-0x1104ffff at device 4.0 on pci0
vgapci0: Boot video device
virtio_pci1: <VirtIO PCI (legacy) Block adapter> port 0x80-0xff mem 0x11065000-0x11065fff,0x11054000-0x11057fff at device 5.0 on pci0
vtblk0: <VirtIO Block Adapter> on virtio_pci1
vtblk0: 5120MB (10485760 512 byte sectors)
virtio_pci2: <VirtIO PCI (legacy) Block adapter> mem 0x11064000-0x11064fff,0x11050000-0x11053fff at device 6.0 on pci0
vtblk1: <VirtIO Block Adapter> on virtio_pci2
vtblk1: 51200MB (104857600 512 byte sectors)
uart0: <PrimeCell UART (PL011)> mem 0x9000000-0x9000fff irq 34 on ofwbus0
uart0: console (115200,n,8,1)
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> 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: <QEMU QEMU USB Keyboard> at usbus0
Loading kernel...
/boot/kernel/kernel text=0x1b4 text=0x719e9c text=0x19a610 data="" data="" 0x4+0xa4160+0x4+0x116be3-
Loading configured modules...
/boot/kernel/umodem.ko text=0x1540 text=0xe90 data="" 0x4+0xe70+0x4+0xa7c
loading required module 'ucom'
/boot/kernel/ucom.ko text=0x19f8 text=0x2d18 data="" 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
---<<BOOT>>---
!!!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: 0x00000000)
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  = 511139840 (487 MB)
avail memory = 483815424 (461 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: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
clk_fixed0: <Fixed clock> on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
gic0: <ARM Generic Interrupt Controller> mem 0x8000000-0x800ffff,0x8010000-0x801ffff on ofwbus0
gic0: pn 0x2, arch 0x2, rev 0x0, implementer 0x43b irqs 288
gicv2m0: <ARM Generic Interrupt Controller MSI/MSIX> mem 0x8020000-0x8020fff on gic0
generic_timer0: <ARMv7 Generic Timer> irq 35,36,37,38 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
pcib0: <Generic PCI host controller> mem 0x3f000000-0x3fffffff on ofwbus0
pci0: <PCI bus> on pcib0
virtio_pci0: <VirtIO PCI (legacy) Network adapter> port 0x100-0x11f mem 0x11067000-0x11067fff,0x1105c000-0x1105ffff at device 1.0 on pci0
vtnet0: <VirtIO Networking Adapter> on virtio_pci0
vtnet0: Ethernet address: 52:54:00:12:34:55
virtio_pci1: <VirtIO PCI (modern) GPU adapter> 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: <NEC uPD720200 USB 3.0 controller> mem 0x11060000-0x11063fff at device 3.0 on pci0
xhci0: 32 bytes context size, 32-bit DMA
usbus0 on xhci0
vgapci0: <VGA-compatible display> port 0x120-0x12f mem 0x10000000-0x10ffffff,0x11040000-0x1104ffff at device 4.0 on pci0
vgapci0: Boot video device
virtio_pci1: <VirtIO PCI (legacy) Block adapter> port 0x80-0xff mem 0x11065000-0x11065fff,0x11054000-0x11057fff at device 5.0 on pci0
vtblk0: <VirtIO Block Adapter> on virtio_pci1
vtblk0: 5120MB (10485760 512 byte sectors)
virtio_pci2: <VirtIO PCI (legacy) Block adapter> mem 0x11064000-0x11064fff,0x11050000-0x11053fff at device 6.0 on pci0
vtblk1: <VirtIO Block Adapter> on virtio_pci2
vtblk1: 51200MB (104857600 512 byte sectors)
uart0: <PrimeCell UART (PL011)> mem 0x9000000-0x9000fff irq 34 on ofwbus0
uart0: console (115200,n,8,1)
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> 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: <QEMU QEMU USB Keyboard> at usbus0
ukbd0 on uhub0
ukbd0: <QEMU QEMU USB Keyboard, class 0/0, rev 2.00/0.00, addr 1> on usbus0
kbd1 at ukbd0
ugen0.3: <QEMU QEMU USB Mouse> at usbus0
ums0 on uhub0
ums0: <QEMU QEMU USB Mouse, class 0/0, rev 2.00/0.00, addr 2> on usbus0
ums0: 3 buttons and [XYZ] coordinates ID=0
random: unblocking device.
Setting hostuuid: 4e4c4eb8-b589-4658-b536-efa3c318ce22.
Setting hostid: 0x7df9c464.
Starting file system checks:
/dev/ufs/rootfs: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ufs/rootfs: clean, 752041 free (649 frags, 93924 blocks, 0.1% fragmentation)
Growing root partition to fill device
vtbd0: hard error cmd=write fsbn 0
gpart: Input/output error
vtbd0: hard error cmd=write 104448-104463
gpart: Input/output error
growfs: requested size 4.9GB is equal to the current filesystem size 4.9GB
vtbd0: hard error cmd=write 144960-144967
g_vfs_done():ufs/rootfs[WRITE(offset=20676608, length=4096)]error = 6
UFS: forcibly unmounting /dev/ufs/rootfs from /
pid 89 (mount), jid 0, uid 0: exited on signal 11
pid 88 (sh), jid 0, uid 0: exited on signal 11
pid 15 (sh), jid 0, uid 0: exited on signal 11

the installation stops here,the error is : Guest disabled display.

I think that this error should be fixed by asking help on the FreeBSD forum because it is related to it.

On Fri, Aug 11, 2023 at 10:57 PM Mario Marietto <marietto2008@gmail.com> wrote:
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@0x4e000000:74:0 \
             virtio_mmio.device=1M@0x4e100000: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 <marietto2008@gmail.com> 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 <marietto2008@gmail.com> 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@0x4e000000:74:0 \
             virtio_mmio.device=1M@0x4e100000: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 Валентин <val15032008@mail.ru> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]