[Bug 1925417] Re: Cannot boot from EFI image on aarch64

2021-05-04 Thread Ravishankar
Hi,

This is not a bug with QEMU. Its a problem with ChromiumOS qemu image
issue which does not have a valid EFI partition for booting on qemu with
EDK2

Please close this ticket.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1925417

Title:
  Cannot boot from EFI image on aarch64

Status in QEMU:
  New

Bug description:
  I am unable to boot from a EFI disk image on aarch64 qemu.

  I have qemu built and installed from sources on a jetson-nano

  qemu-system-aarch64 -version
  QEMU emulator version 5.2.50 (v5.2.0-3234-gbdee969c0e)
  Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

  KVM and and virtio are enabled in host kernel.

  Now I want to boot a ChromiumOS image. I have the image downloaded
  from here:

  https://chromium.arnoldthebat.co.uk/?dir=daily

  The image looks fine:

  rreddy78@jetson-nano:~/Downloads$ fdisk -lu chromiumos_image.bin 
  Disk chromiumos_image.bin: 6.2 GiB, 6606109184 bytes, 12902557 sectors
  Units: sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disklabel type: gpt
  Disk identifier: C5B6CA94-0AF1-374E-90B5-A5CF4DC1FF51

  Device   Start  End Sectors  Size Type
  chromiumos_image.bin1  4513792 12902508 83887174G Linux filesystem
  chromiumos_image.bin22048053247   32768   16M ChromeOS kernel
  chromiumos_image.bin3   319488  4513791 41943042G ChromeOS root fs
  chromiumos_image.bin45324886015   32768   16M ChromeOS kernel
  chromiumos_image.bin5   315392   31948740962M ChromeOS root fs
  chromiumos_image.bin61644816448   1  512B ChromeOS kernel
  chromiumos_image.bin71644916449   1  512B ChromeOS root fs
  chromiumos_image.bin886016   118783   32768   16M Linux filesystem
  chromiumos_image.bin91645016450   1  512B ChromeOS reserved
  chromiumos_image.bin10   1645116451   1  512B ChromeOS reserved
  chromiumos_image.bin11  6416447   163848M unknown
  chromiumos_image.bin12  249856   315391   65536   32M EFI System

  Partition table entries are not in disk order.

  Now I try booting like this:

  qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu host -enable-kvm  \
  -device usb-ehci -device usb-kbd  -device usb-mouse -usb -serial stdio  \
  -device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
  -device virtio-blk-device,drive=hd \
  -drive if=none,file=chromiumos_image.bin,format=raw,id=hd   \
  -netdev user,id=mynet   \
  -device virtio-net-device,netdev=mynet \
  -bios edk2-aarch64-code.fd -no-reboot

  But I am unable to boot.

  Memory Type Information settings change.
  [Bds]Booting UEFI Misc Device
   BlockSize : 262144 
   LastBlock : FF 
  [Bds] Expand VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00) -> 
  BdsDxe: failed to load Boot0001 "UEFI Misc Device" from 
VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00): Not Found

  
  and 

  
  [Bds] Expand VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A) -> 

  BdsDxe: failed to load Boot0002 "UEFI Misc Device 2" from 
VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A): Not Found

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1925417/+subscriptions



[Bug 1920752] [NEW] USB SoundCard Passthrough not working on arm64

2021-03-22 Thread Ravishankar
Public bug reported:

Hello,

I am virtualizing a armhf guest on a aarch64 host and was to use my
Sound Blaster USB Soundcard as passthrough.

armhf Guest is: Debian Buster 
aarch64 host is a jetson nano. KVM is enabled.

Latest qemu is built from sources.
The command I use for running is as follows:

../qemu/build/qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu host,aarch64=off 
-enable-kvm  \
-kernel vmlinuz-4.19.0-14-armmp-lpae  -initrd initrd.img-4.19.0-14-armmp-lpae 
-append 'root=/dev/vda2' \
-device nec-usb-xhci -device usb-kbd  -device usb-mouse -device 
usb-host,hostbus=1,hostport=2.3  -serial stdio  \
-device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
-drive if=none,file=hda2.qcow2,format=qcow2,id=hd   -device 
virtio-blk-device,drive=hd   \
-netdev user,id=mynet   -device virtio-net-device,netdev=mynet \
-bios edk2-arm-code.fd -no-reboot


Where are my lsusb -t shows:

rreddy78@jetson-nano:~/Downloads$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/5p, 480M
|__ Port 2: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M
|__ Port 1: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 
1.5M
|__ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid, 
12M
|__ Port 3: Dev 8, If 1, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 3: Dev 8, If 2, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 3: Dev 8, If 0, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 4: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M

Within the VM I can see the usb as follows

rreddy78@debian:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
|__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 480M


Its looks like some passthrough as but it seems like only for

 _ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid, 12M

I am not sure if passthrough  even works because this post I saw

https://community.arm.com/developer/ip-products/system/f/embedded-
forum/48031/usb-pass-through-in-qemu-command-line-for-arm-
machines/168764#168764

** Affects: qemu
 Importance: Undecided
 Status: New


** Tags: passthrough usb

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1920752

Title:
  USB SoundCard Passthrough not working on arm64

Status in QEMU:
  New

Bug description:
  Hello,

  I am virtualizing a armhf guest on a aarch64 host and was to use my
  Sound Blaster USB Soundcard as passthrough.

  armhf Guest is: Debian Buster 
  aarch64 host is a jetson nano. KVM is enabled.

  Latest qemu is built from sources.
  The command I use for running is as follows:

  ../qemu/build/qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu 
host,aarch64=off -enable-kvm  \
  -kernel vmlinuz-4.19.0-14-armmp-lpae  -initrd initrd.img-4.19.0-14-armmp-lpae 
-append 'root=/dev/vda2' \
  -device nec-usb-xhci -device usb-kbd  -device usb-mouse -device 
usb-host,hostbus=1,hostport=2.3  -serial stdio  \
  -device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
  -drive if=none,file=hda2.qcow2,format=qcow2,id=hd   -device 
virtio-blk-device,drive=hd   \
  -netdev user,id=mynet   -device virtio-net-device,netdev=mynet \
  -bios edk2-arm-code.fd -no-reboot

  
  Where are my lsusb -t shows:

  rreddy78@jetson-nano:~/Downloads$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
  |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/5p, 480M
  |__ Port 2: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
  |__ Port 1: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 1: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid, 
12M
  |__ Port 3: Dev 8, If 1, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 2, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 0, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 4: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M

  Within the VM I can see the usb as follows

  rreddy78@debian:~$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
  |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
  |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=

[Bug 1920752] Re: USB SoundCard Passthrough not working on arm64

2021-03-22 Thread Ravishankar
Not much.

Here is the log

gic_cpu_read: Bad offset fc
gic_cpu_read: Bad offset fc
virtio_mmio_write: attempt to write guest features with guest_features_sel > 0 
in legacy mode
virtio_mmio_write: attempt to write guest features with guest_features_sel > 0 
in legacy mode

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1920752

Title:
  USB SoundCard Passthrough not working on arm64

Status in QEMU:
  New

Bug description:
  Hello,

  I am virtualizing a armhf guest on a aarch64 host and was to use my
  Sound Blaster USB Soundcard as passthrough.

  armhf Guest is: Debian Buster 
  aarch64 host is a jetson nano. KVM is enabled.

  Latest qemu is built from sources.
  The command I use for running is as follows:

  ../qemu/build/qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu 
host,aarch64=off -enable-kvm  \
  -kernel vmlinuz-4.19.0-14-armmp-lpae  -initrd initrd.img-4.19.0-14-armmp-lpae 
-append 'root=/dev/vda2' \
  -device nec-usb-xhci -device usb-kbd  -device usb-mouse -device 
usb-host,hostbus=1,hostport=2.3  -serial stdio  \
  -device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
  -drive if=none,file=hda2.qcow2,format=qcow2,id=hd   -device 
virtio-blk-device,drive=hd   \
  -netdev user,id=mynet   -device virtio-net-device,netdev=mynet \
  -bios edk2-arm-code.fd -no-reboot

  
  Where are my lsusb -t shows:

  rreddy78@jetson-nano:~/Downloads$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
  |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/5p, 480M
  |__ Port 2: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
  |__ Port 1: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 1: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid, 
12M
  |__ Port 3: Dev 8, If 1, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 2, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 0, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 4: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M

  Within the VM I can see the usb as follows

  rreddy78@debian:~$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
  |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
  |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 480M

  
  Its looks like some passthrough as but it seems like only for

   _ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid,
  12M

  I am not sure if passthrough  even works because this post I saw

  https://community.arm.com/developer/ip-products/system/f/embedded-
  forum/48031/usb-pass-through-in-qemu-command-line-for-arm-
  machines/168764#168764

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1920752/+subscriptions



[Bug 1920752] Re: USB SoundCard Passthrough not working on arm64

2021-03-22 Thread Ravishankar
This time I used it differently i.e:

rreddy78@jetson-nano:~/debian-buster-qemu$ lsusb -s 1:8
Bus 001 Device 008: ID 041e:324d Creative Technology, Ltd 

And

-device usb-host,vendorid=0x041e,productid=0x324d -D guest_errors.log -d
guest_errors

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1920752

Title:
  USB SoundCard Passthrough not working on arm64

Status in QEMU:
  New

Bug description:
  Hello,

  I am virtualizing a armhf guest on a aarch64 host and was to use my
  Sound Blaster USB Soundcard as passthrough.

  armhf Guest is: Debian Buster 
  aarch64 host is a jetson nano. KVM is enabled.

  Latest qemu is built from sources.
  The command I use for running is as follows:

  ../qemu/build/qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu 
host,aarch64=off -enable-kvm  \
  -kernel vmlinuz-4.19.0-14-armmp-lpae  -initrd initrd.img-4.19.0-14-armmp-lpae 
-append 'root=/dev/vda2' \
  -device nec-usb-xhci -device usb-kbd  -device usb-mouse -device 
usb-host,hostbus=1,hostport=2.3  -serial stdio  \
  -device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
  -drive if=none,file=hda2.qcow2,format=qcow2,id=hd   -device 
virtio-blk-device,drive=hd   \
  -netdev user,id=mynet   -device virtio-net-device,netdev=mynet \
  -bios edk2-arm-code.fd -no-reboot

  
  Where are my lsusb -t shows:

  rreddy78@jetson-nano:~/Downloads$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
  |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/5p, 480M
  |__ Port 2: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
  |__ Port 1: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 1: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid, 
12M
  |__ Port 3: Dev 8, If 1, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 2, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 0, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 4: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M

  Within the VM I can see the usb as follows

  rreddy78@debian:~$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
  |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
  |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 480M

  
  Its looks like some passthrough as but it seems like only for

   _ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid,
  12M

  I am not sure if passthrough  even works because this post I saw

  https://community.arm.com/developer/ip-products/system/f/embedded-
  forum/48031/usb-pass-through-in-qemu-command-line-for-arm-
  machines/168764#168764

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1920752/+subscriptions



[Bug 1916112] Re: Illegal instruction crash of QEMU on Jetson Nano

2021-03-15 Thread Ravishankar
Working well now. Thank you.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1916112

Title:
  Illegal instruction crash of QEMU on Jetson Nano

Status in QEMU:
  Fix Committed

Bug description:
  I have a jetson nano (arm64 SBC) and I want to check the native
  emulation performance of Raspbian Buster. I used the info available
  here:

  https://github.com/dhruvvyas90/qemu-rpi-kernel/tree/master/native-
  emuation

  I have Xubuntut 20.04 with KVM enabled kernel running on the Jetson
  Nano

  However QEMU crashes with "Illegal Instruction" during kernel boot. I
  have a built latest QEMU from sources with following configuration

  ./configure --prefix=/usr/local --target-list=aarch64-softmmu,arm-
  softmmu  --enable-guest-agent --enable-vnc  --enable-vnc-jpeg
  --enable-vnc-png --enable-kvm --enable-spice --enable-sdl --enable-gtk
  --enable-virglrenderer --enable-opengl

  qemu-system-aarch64 --version
  QEMU emulator version 5.2.50 (v5.2.0-1731-g5b19cb63d9)

  When I run as follows:

  ../build/qemu-system-aarch64 -M raspi3
  -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1"
  -dtb ./bcm2710-rpi-3-b-plus.dtb
  -sd 
/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.qcow2
  -kernel ./kernel8.img
  -m 1G -smp 4 -serial stdio -usb -device usb-mouse -device usb-kbd

  I get :
  [ 74.994834] systemd[1]: Condition check resulted in FUSE Control File System 
being skipped.
  [ 76.281274] systemd[1]: Starting Apply Kernel Variables...
  Starting Apply Kernel Variables...
  Illegal instruction (core dumped)

  When I use GDB I see this:

  Thread 8 "qemu-system-aar" received signal SIGILL, Illegal instruction.
  [Switching to Thread 0x7fad7f9ba0 (LWP 28037)]
  0x007f888ac690 in code_gen_buffer ()
  (gdb) bt
  #0 0x007f888ac690 in code_gen_buffer ()
  #1 0x00d7c038 in cpu_tb_exec (tb_exit=, itb=, cpu=0x7fb4502c40)
  at ../accel/tcg/cpu-exec.c:191
  #2 cpu_loop_exec_tb (tb_exit=, last_tb=, tb=, cpu=0x7fb4502c40)
  at ../accel/tcg/cpu-exec.c:708
  #3 cpu_exec (cpu=cpu@entry=0x7fb4502c40) at ../accel/tcg/cpu-exec.c:819
  ..

  I have just two questions:

  Is this a problem with QEMU or is there anything specific build or
  options I need to use. Any specific version of QEMU should be used ?

  Why is TCG used as the accelerator when KVM is present. Is it possible
  and how to use KVM ?

  If I enabled the KVM then I get this error:

  ../build/qemu-system-aarch64 -M raspi3 -enable-kvm -append "rw earlyprintk 
loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 
rootdelay=1" -dtb ./bcm2710-rpi-3-b-plus.dtb -sd 
/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.qcow2 
-kernel ./kernel8.img -m 1G -smp 4 -serial stdio -usb -device usb-mouse -device 
usb-kbd
  WARNING: Image format was not specified for 
'/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.img' 
and probing guessed raw.
   Automatically detecting the format is dangerous for raw images, 
write operations on block 0 will be restricted.
   Specify the 'raw' format explicitly to remove the restrictions.
  qemu-system-aarch64: ../softmmu/physmem.c:750: cpu_address_space_init: 
Assertion `asidx == 0 || !kvm_enabled()' failed.

  Thanks a lot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1916112/+subscriptions



[Bug 1925417] [NEW] Cannot boot from EFI image on aarch64

2021-04-21 Thread Ravishankar
Public bug reported:

I am unable to boot from a EFI disk image on aarch64 qemu.

I have qemu built and installed from sources on a jetson-nano

qemu-system-aarch64 -version
QEMU emulator version 5.2.50 (v5.2.0-3234-gbdee969c0e)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

KVM and and virtio are enabled in host kernel.

Now I want to boot a ChromiumOS image. I have the image downloaded from
here:

https://chromium.arnoldthebat.co.uk/?dir=daily

The image looks fine:

rreddy78@jetson-nano:~/Downloads$ fdisk -lu chromiumos_image.bin 
Disk chromiumos_image.bin: 6.2 GiB, 6606109184 bytes, 12902557 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C5B6CA94-0AF1-374E-90B5-A5CF4DC1FF51

Device   Start  End Sectors  Size Type
chromiumos_image.bin1  4513792 12902508 83887174G Linux filesystem
chromiumos_image.bin22048053247   32768   16M ChromeOS kernel
chromiumos_image.bin3   319488  4513791 41943042G ChromeOS root fs
chromiumos_image.bin45324886015   32768   16M ChromeOS kernel
chromiumos_image.bin5   315392   31948740962M ChromeOS root fs
chromiumos_image.bin61644816448   1  512B ChromeOS kernel
chromiumos_image.bin71644916449   1  512B ChromeOS root fs
chromiumos_image.bin886016   118783   32768   16M Linux filesystem
chromiumos_image.bin91645016450   1  512B ChromeOS reserved
chromiumos_image.bin10   1645116451   1  512B ChromeOS reserved
chromiumos_image.bin11  6416447   163848M unknown
chromiumos_image.bin12  249856   315391   65536   32M EFI System

Partition table entries are not in disk order.

Now I try booting like this:

qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu host -enable-kvm  \
-device usb-ehci -device usb-kbd  -device usb-mouse -usb -serial stdio  \
-device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
-device virtio-blk-device,drive=hd \
-drive if=none,file=chromiumos_image.bin,format=raw,id=hd   \
-netdev user,id=mynet   \
-device virtio-net-device,netdev=mynet \
-bios edk2-aarch64-code.fd -no-reboot

But I am unable to boot.

Memory Type Information settings change.
[Bds]Booting UEFI Misc Device
 BlockSize : 262144 
 LastBlock : FF 
[Bds] Expand VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00) -> 
BdsDxe: failed to load Boot0001 "UEFI Misc Device" from 
VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00): Not Found


and 


[Bds] Expand VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A) -> 

BdsDxe: failed to load Boot0002 "UEFI Misc Device 2" from 
VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A): Not Found

** Affects: qemu
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1925417

Title:
  Cannot boot from EFI image on aarch64

Status in QEMU:
  New

Bug description:
  I am unable to boot from a EFI disk image on aarch64 qemu.

  I have qemu built and installed from sources on a jetson-nano

  qemu-system-aarch64 -version
  QEMU emulator version 5.2.50 (v5.2.0-3234-gbdee969c0e)
  Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

  KVM and and virtio are enabled in host kernel.

  Now I want to boot a ChromiumOS image. I have the image downloaded
  from here:

  https://chromium.arnoldthebat.co.uk/?dir=daily

  The image looks fine:

  rreddy78@jetson-nano:~/Downloads$ fdisk -lu chromiumos_image.bin 
  Disk chromiumos_image.bin: 6.2 GiB, 6606109184 bytes, 12902557 sectors
  Units: sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disklabel type: gpt
  Disk identifier: C5B6CA94-0AF1-374E-90B5-A5CF4DC1FF51

  Device   Start  End Sectors  Size Type
  chromiumos_image.bin1  4513792 12902508 83887174G Linux filesystem
  chromiumos_image.bin22048053247   32768   16M ChromeOS kernel
  chromiumos_image.bin3   319488  4513791 41943042G ChromeOS root fs
  chromiumos_image.bin45324886015   32768   16M ChromeOS kernel
  chromiumos_image.bin5   315392   31948740962M ChromeOS root fs
  chromiumos_image.bin61644816448   1  512B ChromeOS kernel
  chromiumos_image.bin71644916449   1  512B ChromeOS root fs
  chromiumos_image.bin886016   118783   32768   16M Linux filesystem
  chromiumos_image.bin91645016450   1  512B ChromeOS reserved
  chromiumos_image.bin10   1645116451   1  512B ChromeOS reserved
  chromiumos_image.bin11  6416447   163848M unknown
  chromiumos_image.bin12  249856   315391   65536   32M EFI System

  Partition table entries are not in disk order.

  Now I try booting like this:

  qemu-system-aarch64 -M virt -m 2048 -sm

[Bug 1920752] Re: USB SoundCard Passthrough not working on arm64

2021-04-22 Thread Ravishankar
I ran it as follows:

 qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu host,aarch64=off
-enable-kvm -kernel vmlinuz-4.19.0-14-armmp-lpae -initrd
initrd.img-4.19.0-14-armmp-lpae -append 'root=/dev/vda2' -device nec-
usb-xhci -device usb-kbd -device usb-mouse -device usb-
host,pcap=test.pcap,hostbus=1,hostport=2.1 -serial stdio -device virtio-
gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on -drive
if=none,file=hda2.qcow2,format=qcow2,id=hd -device virtio-blk-
device,drive=hd -netdev user,id=mynet -device virtio-net-
device,netdev=mynet -bios edk2-arm-code.fd -no-reboot

But the pcap file is empty:

file test.pcap
test.pcap: empty

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1920752

Title:
  USB SoundCard Passthrough not working on arm64

Status in QEMU:
  New

Bug description:
  Hello,

  I am virtualizing a armhf guest on a aarch64 host and was to use my
  Sound Blaster USB Soundcard as passthrough.

  armhf Guest is: Debian Buster 
  aarch64 host is a jetson nano. KVM is enabled.

  Latest qemu is built from sources.
  The command I use for running is as follows:

  ../qemu/build/qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu 
host,aarch64=off -enable-kvm  \
  -kernel vmlinuz-4.19.0-14-armmp-lpae  -initrd initrd.img-4.19.0-14-armmp-lpae 
-append 'root=/dev/vda2' \
  -device nec-usb-xhci -device usb-kbd  -device usb-mouse -device 
usb-host,hostbus=1,hostport=2.3  -serial stdio  \
  -device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
  -drive if=none,file=hda2.qcow2,format=qcow2,id=hd   -device 
virtio-blk-device,drive=hd   \
  -netdev user,id=mynet   -device virtio-net-device,netdev=mynet \
  -bios edk2-arm-code.fd -no-reboot

  
  Where are my lsusb -t shows:

  rreddy78@jetson-nano:~/Downloads$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
  |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/5p, 480M
  |__ Port 2: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
  |__ Port 1: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 1: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid, 
12M
  |__ Port 3: Dev 8, If 1, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 2, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 0, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 4: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M

  Within the VM I can see the usb as follows

  rreddy78@debian:~$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
  |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
  |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 480M

  
  Its looks like some passthrough as but it seems like only for

   _ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid,
  12M

  I am not sure if passthrough  even works because this post I saw

  https://community.arm.com/developer/ip-products/system/f/embedded-
  forum/48031/usb-pass-through-in-qemu-command-line-for-arm-
  machines/168764#168764

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1920752/+subscriptions



[Bug 1920752] Re: USB SoundCard Passthrough not working on arm64

2021-04-22 Thread Ravishankar
Hello,

You can close this bug as as a simple usb-audio switch is working fine for me:
I just added -device usb-audio and set the -device nec-usb-xhci and sound 
within the qemu is working fine..

qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu host,aarch64=off
-enable-kvm -kernel vmlinuz-4.19.0-14-armmp-lpae -initrd
initrd.img-4.19.0-14-armmp-lpae -append 'root=/dev/vda2' -device nec-
usb-xhci,id=xhci -device usb-kbd -device usb-mouse -device usb-audio
-serial stdio -device virtio-gpu-pci,virgl=on,xres=1600,yres=900
-display sdl,gl=on -drive if=none,file=hda2.qcow2,format=qcow2,id=hd
-device virtio-blk-device,drive=hd -netdev user,id=mynet -device virtio-
net-device,netdev=mynet -bios edk2-arm-code.fd -no-reboot

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1920752

Title:
  USB SoundCard Passthrough not working on arm64

Status in QEMU:
  New

Bug description:
  Hello,

  I am virtualizing a armhf guest on a aarch64 host and was to use my
  Sound Blaster USB Soundcard as passthrough.

  armhf Guest is: Debian Buster 
  aarch64 host is a jetson nano. KVM is enabled.

  Latest qemu is built from sources.
  The command I use for running is as follows:

  ../qemu/build/qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu 
host,aarch64=off -enable-kvm  \
  -kernel vmlinuz-4.19.0-14-armmp-lpae  -initrd initrd.img-4.19.0-14-armmp-lpae 
-append 'root=/dev/vda2' \
  -device nec-usb-xhci -device usb-kbd  -device usb-mouse -device 
usb-host,hostbus=1,hostport=2.3  -serial stdio  \
  -device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
  -drive if=none,file=hda2.qcow2,format=qcow2,id=hd   -device 
virtio-blk-device,drive=hd   \
  -netdev user,id=mynet   -device virtio-net-device,netdev=mynet \
  -bios edk2-arm-code.fd -no-reboot

  
  Where are my lsusb -t shows:

  rreddy78@jetson-nano:~/Downloads$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
  |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/5p, 480M
  |__ Port 2: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
  |__ Port 1: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 1: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid, 
12M
  |__ Port 3: Dev 8, If 1, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 2, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 0, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 4: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M

  Within the VM I can see the usb as follows

  rreddy78@debian:~$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
  |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
  |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 480M

  
  Its looks like some passthrough as but it seems like only for

   _ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid,
  12M

  I am not sure if passthrough  even works because this post I saw

  https://community.arm.com/developer/ip-products/system/f/embedded-
  forum/48031/usb-pass-through-in-qemu-command-line-for-arm-
  machines/168764#168764

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1920752/+subscriptions



[Bug 1925417] Re: Cannot boot from EFI image on aarch64

2021-04-22 Thread Ravishankar
When i try to do it manually using the instructions provided here:

https://mricher.fr/post/boot-from-an-efi-shell/

I see that

Mapping table
  FS0: Alias(s):HD0m:;BLK4:
  
VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A)/HD(12,GPT,49037CF8-B2EF-5B4B-8CCE-EF5803A9E8B3,0x3D000,0x1)
BLK13: Alias(s):
  VenHw(93E34C7E-B5


BLK4 is not having any EFI file.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1925417

Title:
  Cannot boot from EFI image on aarch64

Status in QEMU:
  New

Bug description:
  I am unable to boot from a EFI disk image on aarch64 qemu.

  I have qemu built and installed from sources on a jetson-nano

  qemu-system-aarch64 -version
  QEMU emulator version 5.2.50 (v5.2.0-3234-gbdee969c0e)
  Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

  KVM and and virtio are enabled in host kernel.

  Now I want to boot a ChromiumOS image. I have the image downloaded
  from here:

  https://chromium.arnoldthebat.co.uk/?dir=daily

  The image looks fine:

  rreddy78@jetson-nano:~/Downloads$ fdisk -lu chromiumos_image.bin 
  Disk chromiumos_image.bin: 6.2 GiB, 6606109184 bytes, 12902557 sectors
  Units: sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disklabel type: gpt
  Disk identifier: C5B6CA94-0AF1-374E-90B5-A5CF4DC1FF51

  Device   Start  End Sectors  Size Type
  chromiumos_image.bin1  4513792 12902508 83887174G Linux filesystem
  chromiumos_image.bin22048053247   32768   16M ChromeOS kernel
  chromiumos_image.bin3   319488  4513791 41943042G ChromeOS root fs
  chromiumos_image.bin45324886015   32768   16M ChromeOS kernel
  chromiumos_image.bin5   315392   31948740962M ChromeOS root fs
  chromiumos_image.bin61644816448   1  512B ChromeOS kernel
  chromiumos_image.bin71644916449   1  512B ChromeOS root fs
  chromiumos_image.bin886016   118783   32768   16M Linux filesystem
  chromiumos_image.bin91645016450   1  512B ChromeOS reserved
  chromiumos_image.bin10   1645116451   1  512B ChromeOS reserved
  chromiumos_image.bin11  6416447   163848M unknown
  chromiumos_image.bin12  249856   315391   65536   32M EFI System

  Partition table entries are not in disk order.

  Now I try booting like this:

  qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu host -enable-kvm  \
  -device usb-ehci -device usb-kbd  -device usb-mouse -usb -serial stdio  \
  -device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
  -device virtio-blk-device,drive=hd \
  -drive if=none,file=chromiumos_image.bin,format=raw,id=hd   \
  -netdev user,id=mynet   \
  -device virtio-net-device,netdev=mynet \
  -bios edk2-aarch64-code.fd -no-reboot

  But I am unable to boot.

  Memory Type Information settings change.
  [Bds]Booting UEFI Misc Device
   BlockSize : 262144 
   LastBlock : FF 
  [Bds] Expand VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00) -> 
  BdsDxe: failed to load Boot0001 "UEFI Misc Device" from 
VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00): Not Found

  
  and 

  
  [Bds] Expand VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A) -> 

  BdsDxe: failed to load Boot0002 "UEFI Misc Device 2" from 
VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A): Not Found

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1925417/+subscriptions



[Bug 1920752] Re: USB SoundCard Passthrough not working on arm64

2021-05-03 Thread Ravishankar
One more point. The solution above is not usb passthrough.
I just noticed that qemu needs to be configured for usb passthrough. I am 
trying that out now

Configure with --enable-libusb
  libusb  libusb (for usb passthrough)

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1920752

Title:
  USB SoundCard Passthrough not working on arm64

Status in QEMU:
  New

Bug description:
  Hello,

  I am virtualizing a armhf guest on a aarch64 host and was to use my
  Sound Blaster USB Soundcard as passthrough.

  armhf Guest is: Debian Buster 
  aarch64 host is a jetson nano. KVM is enabled.

  Latest qemu is built from sources.
  The command I use for running is as follows:

  ../qemu/build/qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu 
host,aarch64=off -enable-kvm  \
  -kernel vmlinuz-4.19.0-14-armmp-lpae  -initrd initrd.img-4.19.0-14-armmp-lpae 
-append 'root=/dev/vda2' \
  -device nec-usb-xhci -device usb-kbd  -device usb-mouse -device 
usb-host,hostbus=1,hostport=2.3  -serial stdio  \
  -device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
  -drive if=none,file=hda2.qcow2,format=qcow2,id=hd   -device 
virtio-blk-device,drive=hd   \
  -netdev user,id=mynet   -device virtio-net-device,netdev=mynet \
  -bios edk2-arm-code.fd -no-reboot

  
  Where are my lsusb -t shows:

  rreddy78@jetson-nano:~/Downloads$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
  |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/5p, 480M
  |__ Port 2: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
  |__ Port 1: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 1: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 
1.5M
  |__ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid, 
12M
  |__ Port 3: Dev 8, If 1, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 2, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 3: Dev 8, If 0, Class=Audio, Driver=snd-usb-audio, 12M
  |__ Port 4: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M

  Within the VM I can see the usb as follows

  rreddy78@debian:~$ lsusb -t
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
  |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
  |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 480M

  
  Its looks like some passthrough as but it seems like only for

   _ Port 3: Dev 8, If 3, Class=Human Interface Device, Driver=usbhid,
  12M

  I am not sure if passthrough  even works because this post I saw

  https://community.arm.com/developer/ip-products/system/f/embedded-
  forum/48031/usb-pass-through-in-qemu-command-line-for-arm-
  machines/168764#168764

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1920752/+subscriptions



[Bug 1836501] Re: cpu_address_space_init fails with assertion

2021-02-21 Thread Ravishankar
I am having a similar problem. I want to use KVM on jetson nano and boot
Raspbian Buster 32bit OS with native machine emulation.

Run into a similar problem. I used latest QEMU.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1836501

Title:
  cpu_address_space_init fails with assertion

Status in QEMU:
  Expired

Bug description:
  qemu-system-arm does not start with version >= 2.6 and KVM enabled.

cpu_address_space_init: Assertion `asidx == 0 || !kvm_enabled()'
  failed.

  Hardware is Odroid XU4 with Exynos with 4.9.61+ Tested with Debian
  Stretch (9) or Buster (10).

  Without KVM it is running fine but slow. I'm operating Debian Jessie
  with qemu 2.1 for a long time with KVM virtualization working
  flawlessly. When I upgraded to Stretch I ran into the trouble
  described before. I tried Debian Stretch and Buster with all Kernels
  provided by the Board manufacturer (Hardkernel).

  It seems to be related to the feature introduced in Version 2.6:
  https://wiki.qemu.org/ChangeLog/2.6
  - Support for a separate EL3 address space

  KVM is enabled, so I assume the adress space index asidx to be causing
  the assert to fail.

  dmesg | grep -i KVM
  [0.741714] kvm [1]: 8-bit VMID
  [0.741721] kvm [1]: IDMAP page: 40201000
  [0.741729] kvm [1]: HYP VA range: c000:
  [0.742543] kvm [1]: Hyp mode initialized successfully
  [0.742600] kvm [1]: vgic-v2@10484000
  [0.742924] kvm [1]: vgic interrupt IRQ16
  [0.742943] kvm [1]: virtual timer IRQ60

  Full command line is:
  qemu-system-arm -M vexpress-a15 -smp 2 -m 512 -cpu host -enable-kvm -kernel 
vmlinuz -initrd initrd.gz -dtb vexpress-v2p-ca15-tc1.dtb -device 
virtio-blk-device,drive=inst-blk -drive 
file=PATHTOFILE,id=inst-blk,if=none,format=raw -append "vga=normal rw 
console=ttyAMA0" -nographic

  Is there anything to do to understand, if this is a hardware related
  failure or probably just a missing parameter?

  Regards

  Lutz

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1836501/+subscriptions



[Bug 1836501] Re: cpu_address_space_init fails with assertion

2021-02-21 Thread Ravishankar
When I use gdb i see that the assert line uses:

   /* KVM cannot currently support multiple address spaces. */
assert(asidx == 0 || !kvm_enabled());

the asidx is 1. So since KVM is not supporting multiple addresses spaces
that the Raspi3 requires the assertion occurs.

I wonder what the workaround could be for this

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1836501

Title:
  cpu_address_space_init fails with assertion

Status in QEMU:
  Expired

Bug description:
  qemu-system-arm does not start with version >= 2.6 and KVM enabled.

cpu_address_space_init: Assertion `asidx == 0 || !kvm_enabled()'
  failed.

  Hardware is Odroid XU4 with Exynos with 4.9.61+ Tested with Debian
  Stretch (9) or Buster (10).

  Without KVM it is running fine but slow. I'm operating Debian Jessie
  with qemu 2.1 for a long time with KVM virtualization working
  flawlessly. When I upgraded to Stretch I ran into the trouble
  described before. I tried Debian Stretch and Buster with all Kernels
  provided by the Board manufacturer (Hardkernel).

  It seems to be related to the feature introduced in Version 2.6:
  https://wiki.qemu.org/ChangeLog/2.6
  - Support for a separate EL3 address space

  KVM is enabled, so I assume the adress space index asidx to be causing
  the assert to fail.

  dmesg | grep -i KVM
  [0.741714] kvm [1]: 8-bit VMID
  [0.741721] kvm [1]: IDMAP page: 40201000
  [0.741729] kvm [1]: HYP VA range: c000:
  [0.742543] kvm [1]: Hyp mode initialized successfully
  [0.742600] kvm [1]: vgic-v2@10484000
  [0.742924] kvm [1]: vgic interrupt IRQ16
  [0.742943] kvm [1]: virtual timer IRQ60

  Full command line is:
  qemu-system-arm -M vexpress-a15 -smp 2 -m 512 -cpu host -enable-kvm -kernel 
vmlinuz -initrd initrd.gz -dtb vexpress-v2p-ca15-tc1.dtb -device 
virtio-blk-device,drive=inst-blk -drive 
file=PATHTOFILE,id=inst-blk,if=none,format=raw -append "vga=normal rw 
console=ttyAMA0" -nographic

  Is there anything to do to understand, if this is a hardware related
  failure or probably just a missing parameter?

  Regards

  Lutz

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1836501/+subscriptions



[Bug 1916112] [NEW] Illegal instruction crash of QEMU on Jetson Nano

2021-02-18 Thread Ravishankar
Public bug reported:

I have a jetson nano (arm64 SBC) and I want to check the native
emulation performance of Raspbian Buster. I used the info available
here:

https://github.com/dhruvvyas90/qemu-rpi-kernel/tree/master/native-
emuation

I have Xubuntut 20.04 with KVM enabled kernel running on the Jetson Nano

However QEMU crashes with "Illegal Instruction" during kernel boot. I
have a built latest QEMU from sources with following configuration

./configure --prefix=/usr/local --target-list=aarch64-softmmu,arm-
softmmu  --enable-guest-agent --enable-vnc  --enable-vnc-jpeg --enable-
vnc-png --enable-kvm --enable-spice --enable-sdl --enable-gtk --enable-
virglrenderer --enable-opengl

qemu-system-aarch64 --version
QEMU emulator version 5.2.50 (v5.2.0-1731-g5b19cb63d9)

When I run as follows:

../build/qemu-system-aarch64 -M raspi3
-append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 
root=/dev/mmcblk0p2 rootdelay=1"
-dtb ./bcm2710-rpi-3-b-plus.dtb
-sd 
/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.qcow2
-kernel ./kernel8.img
-m 1G -smp 4 -serial stdio -usb -device usb-mouse -device usb-kbd

I get :
[ 74.994834] systemd[1]: Condition check resulted in FUSE Control File System 
being skipped.
[ 76.281274] systemd[1]: Starting Apply Kernel Variables...
Starting Apply Kernel Variables...
Illegal instruction (core dumped)

When I use GDB I see this:

Thread 8 "qemu-system-aar" received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7fad7f9ba0 (LWP 28037)]
0x007f888ac690 in code_gen_buffer ()
(gdb) bt
#0 0x007f888ac690 in code_gen_buffer ()
#1 0x00d7c038 in cpu_tb_exec (tb_exit=, itb=, cpu=0x7fb4502c40)
at ../accel/tcg/cpu-exec.c:191
#2 cpu_loop_exec_tb (tb_exit=, last_tb=, tb=, cpu=0x7fb4502c40)
at ../accel/tcg/cpu-exec.c:708
#3 cpu_exec (cpu=cpu@entry=0x7fb4502c40) at ../accel/tcg/cpu-exec.c:819
..

I have just two questions:

Is this a problem with QEMU or is there anything specific build or
options I need to use. Any specific version of QEMU should be used ?

Why is TCG used as the accelerator when KVM is present. Is it possible
and how to use KVM ?

If I enabled the KVM then I get this error:

../build/qemu-system-aarch64 -M raspi3 -enable-kvm -append "rw earlyprintk 
loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 
rootdelay=1" -dtb ./bcm2710-rpi-3-b-plus.dtb -sd 
/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.qcow2 
-kernel ./kernel8.img -m 1G -smp 4 -serial stdio -usb -device usb-mouse -device 
usb-kbd
WARNING: Image format was not specified for 
'/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.img' 
and probing guessed raw.
 Automatically detecting the format is dangerous for raw images, write 
operations on block 0 will be restricted.
 Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-aarch64: ../softmmu/physmem.c:750: cpu_address_space_init: 
Assertion `asidx == 0 || !kvm_enabled()' failed.

Thanks a lot.

** Affects: qemu
 Importance: Undecided
 Status: New


** Tags: tcg

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1916112

Title:
  Illegal instruction crash of QEMU on Jetson Nano

Status in QEMU:
  New

Bug description:
  I have a jetson nano (arm64 SBC) and I want to check the native
  emulation performance of Raspbian Buster. I used the info available
  here:

  https://github.com/dhruvvyas90/qemu-rpi-kernel/tree/master/native-
  emuation

  I have Xubuntut 20.04 with KVM enabled kernel running on the Jetson
  Nano

  However QEMU crashes with "Illegal Instruction" during kernel boot. I
  have a built latest QEMU from sources with following configuration

  ./configure --prefix=/usr/local --target-list=aarch64-softmmu,arm-
  softmmu  --enable-guest-agent --enable-vnc  --enable-vnc-jpeg
  --enable-vnc-png --enable-kvm --enable-spice --enable-sdl --enable-gtk
  --enable-virglrenderer --enable-opengl

  qemu-system-aarch64 --version
  QEMU emulator version 5.2.50 (v5.2.0-1731-g5b19cb63d9)

  When I run as follows:

  ../build/qemu-system-aarch64 -M raspi3
  -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1"
  -dtb ./bcm2710-rpi-3-b-plus.dtb
  -sd 
/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.qcow2
  -kernel ./kernel8.img
  -m 1G -smp 4 -serial stdio -usb -device usb-mouse -device usb-kbd

  I get :
  [ 74.994834] systemd[1]: Condition check resulted in FUSE Control File System 
being skipped.
  [ 76.281274] systemd[1]: Starting Apply Kernel Variables...
  Starting Apply Kernel Variables...
  Illegal instruction (core dumped)

  When I use GDB I see this:

  Thread 8 "qemu-system-aar" received signal SIGILL, Illegal instruction.
  [Switching to Thread 0x7fad7f9ba0 (LWP 28037)]
  0x007f888ac690 in code_gen_b

[Bug 1916112] Re: Illegal instruction crash of QEMU on Jetson Nano

2021-02-19 Thread Ravishankar
Disassembly:

[  OK  ] Mounted RPC Pipe File System.
[   75.916706] systemd[1]: Started Create list of required static device nodes 
for the current kernel.
[  OK  ] Started Create list of req… nodes for the current kernel.

Thread 7 "qemu-system-aar" received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7fade0aba0 (LWP )]
0x007f8aca04d0 in code_gen_buffer ()
(gdb) disas $pc-32,$pc+32
Dump of assembler code from 0x7f8aca04b0 to 0x7f8aca04f0:
   0x007f8aca04b0 :  cmp x0, x3
   0x007f8aca04b4 :  b.ne0x7f8aca0908 
  // b.any
   0x007f8aca04b8 :  ldr x23, [x1, x23]
   0x007f8aca04bc :  str x23, [x19, 
#3688]
   0x007f8aca04c0 :  add w22, w22, w21
   0x007f8aca04c4 :  str w22, [x19, #16]
   0x007f8aca04c8 :  ldr d0, [x19, #3944]
   0x007f8aca04cc :  ldr d1, [x19, #4192]
=> 0x007f8aca04d0 :  .inst   0x2ee0b822 ; 
undefined
   0x007f8aca04d4 :  movid3, #0xff
   0x007f8aca04d8 :  and v1.8b, v1.8b, 
v3.8b
   0x007f8aca04dc :  and v2.8b, v2.8b, 
v3.8b
   0x007f8aca04e0 :  .inst   0x2ee14404 ; 
undefined
   0x007f8aca04e4 :  .inst   0x2ee0b845 ; 
und--Typ--Ty--Ty-Ty--T--Type--Type-Ty--T--Type  for more, q to 
quit, c to continue without paging--
efined
   0x007f8aca04e8 :  .inst   0x2ee54400 ; 
undefined
   0x007f8aca04ec :  ldr d5, 
0x7f8aca09f0 
End of assembler dump.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1916112

Title:
  Illegal instruction crash of QEMU on Jetson Nano

Status in QEMU:
  New

Bug description:
  I have a jetson nano (arm64 SBC) and I want to check the native
  emulation performance of Raspbian Buster. I used the info available
  here:

  https://github.com/dhruvvyas90/qemu-rpi-kernel/tree/master/native-
  emuation

  I have Xubuntut 20.04 with KVM enabled kernel running on the Jetson
  Nano

  However QEMU crashes with "Illegal Instruction" during kernel boot. I
  have a built latest QEMU from sources with following configuration

  ./configure --prefix=/usr/local --target-list=aarch64-softmmu,arm-
  softmmu  --enable-guest-agent --enable-vnc  --enable-vnc-jpeg
  --enable-vnc-png --enable-kvm --enable-spice --enable-sdl --enable-gtk
  --enable-virglrenderer --enable-opengl

  qemu-system-aarch64 --version
  QEMU emulator version 5.2.50 (v5.2.0-1731-g5b19cb63d9)

  When I run as follows:

  ../build/qemu-system-aarch64 -M raspi3
  -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1"
  -dtb ./bcm2710-rpi-3-b-plus.dtb
  -sd 
/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.qcow2
  -kernel ./kernel8.img
  -m 1G -smp 4 -serial stdio -usb -device usb-mouse -device usb-kbd

  I get :
  [ 74.994834] systemd[1]: Condition check resulted in FUSE Control File System 
being skipped.
  [ 76.281274] systemd[1]: Starting Apply Kernel Variables...
  Starting Apply Kernel Variables...
  Illegal instruction (core dumped)

  When I use GDB I see this:

  Thread 8 "qemu-system-aar" received signal SIGILL, Illegal instruction.
  [Switching to Thread 0x7fad7f9ba0 (LWP 28037)]
  0x007f888ac690 in code_gen_buffer ()
  (gdb) bt
  #0 0x007f888ac690 in code_gen_buffer ()
  #1 0x00d7c038 in cpu_tb_exec (tb_exit=, itb=, cpu=0x7fb4502c40)
  at ../accel/tcg/cpu-exec.c:191
  #2 cpu_loop_exec_tb (tb_exit=, last_tb=, tb=, cpu=0x7fb4502c40)
  at ../accel/tcg/cpu-exec.c:708
  #3 cpu_exec (cpu=cpu@entry=0x7fb4502c40) at ../accel/tcg/cpu-exec.c:819
  ..

  I have just two questions:

  Is this a problem with QEMU or is there anything specific build or
  options I need to use. Any specific version of QEMU should be used ?

  Why is TCG used as the accelerator when KVM is present. Is it possible
  and how to use KVM ?

  If I enabled the KVM then I get this error:

  ../build/qemu-system-aarch64 -M raspi3 -enable-kvm -append "rw earlyprintk 
loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 
rootdelay=1" -dtb ./bcm2710-rpi-3-b-plus.dtb -sd 
/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.qcow2 
-kernel ./kernel8.img -m 1G -smp 4 -serial stdio -usb -device usb-mouse -device 
usb-kbd
  WARNING: Image format was not specified for 
'/media/96747D21747D0571/JetsonNano/2020-08-20-raspios-buster-armhf-full.img' 
and probing guessed raw.
   Automatically detecting the format is dangerous for raw images, 
write operations on block 0 will be restricted.
   Specify the 'raw' format explicitly to remove the restrictions.
  qemu-system-aarch64: ../softmmu/physmem.c:750: cpu_address_space_init: 
Assertion `asidx == 0 || !kvm_enabled()' failed.

  Thanks a lot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1916112/+subscriptions