>From: "Cédric Le Goater" c...@kaod.org >To: "ma...@locati.it" ma...@locati.it, bala...@eik.bme.hu >Cc: faro...@linux.ibm.com, qemu-devel@nongnu.org, qemu-...@nongnu.org, >danielhb...@gmail.com >Date: Mon, 10 Jan 2022 09:04:39 +0100 >Subject: Re: [PATCH] target/ppc: Fix e6500 boot > >Hello Mario, > >> >> I have tried to launch a freshly compiled qemu from git master on a NXP >> T2080RDB devkit that has a e6500 CPU in combination with a freshly compiled >> kernel 5.16-rc6 >> I have Debian SID ppc64 up and running using such a kernel, and when I >> launch qemu to run a VM with the same debian sid for ppc64 and the same >> kernel using --enable-kvm I end up with a kernel panic >> >> [....] >> Run /sbin/init as init process >> random: fast init done >> systemd[1]: illegal instruction (4) at 3fff96562ac8 nip 3fff96562ac8 lr >> 3fff96562aa8 code 1 in libc-2.32.so[3fff96516000+1f7000] >> systemd[1]: code: 60000000 38600006 9122b7e8 4801bead 60000000 60000000 >> 8122b7e8 2c090004 >> systemd[1]: code: 40820014 39200005 60000000 9122b7e8 <00000000> 60000000 >> 8122b7e8 2c090005 >> Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004 >> Rebooting in 180 seconds.. > >I spend sometime looking at the kernel and QEMU and I noticed that >TCG e6500 machines have an issue when the kernel has KVM support. >I have limited knowledge on that topic but e6500 has extra MMU >features that an hypervisor could use for the guest and the e6500 >emulation clearly doesn't have support for it. > >In the guest, could you try with to run the KVM guest with a kernel >without KVM support and let us know ? > >Thanks, > >C.
Unfortunately using a kernel with KVM disabled on the guest did not solve the problem on the NXP T2080RDB devkit, here's how qemu log ends [...] Loading compiled-in X.509 certificates zswap: loaded using pool lzo/zbud Key type ._fscrypt registered Key type .fscrypt registered Key type fscrypt-provisioning registered Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no Key type encrypted registered ALSA device list: #0: Virtual MIDI Card 1 EXT4-fs (vda): recovery complete EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none. VFS: Mounted root (ext4 filesystem) on device 254:0. devtmpfs: mounted Freeing unused kernel image (initmem) memory: 460K This architecture does not have kernel memory protection. Run /sbin/init as init process random: fast init done systemd[1]: illegal instruction (4) at 3fffb412415c nip 3fffb412415c lr 3fffb412413c code 1 in libc-2.33.so[3fffb40d7000+1fe000] systemd[1]: code: 60000000 38600006 9122b7d0 4801bf19 60000000 60000000 8122b7d0 2c090004 systemd[1]: code: 40820014 39200005 60000000 9122b7d0 <00000000> 60000000 8122b7d0 2c090005 Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004 Rebooting in 180 seconds.. However, when using such a kernel without KVM on my x86_64 linux machine, qemu works just fine with an e6500 cpu using the following parameters qemu-system-ppc64 -M ppce500 -cpu e6500 -m 2G -kernel uImage_5.16_no_kvm -append "root=/dev/vda rw" -drive format=qcow2,file=hdd_debian_sid_ppc64.qcow2,index=0,if=virtio -net nic -net user -vga none -nographic Here the recompiled kernel 5.16 configuration used on the host that has KVM enable https://repo.powerprogress.org/t2080rdb/qemu/2022-01-11_kernel_5.16_with_kvm.config And here the compiled kernel https://repo.powerprogress.org/t2080rdb/qemu/uImage_5.16_with_kvm Here the recompiled kernel 5.16 configuration without KVM enabled for the guest https://repo.powerprogress.org/t2080rdb/qemu/2022-01-11_kernel_5.16_no_kvm.config And here the compiled kernel https://repo.powerprogress.org/t2080rdb/qemu/uImage_5.16_no_kvm Here the complete log of QEMU I have just recompiled today from git https://repo.powerprogress.org/t2080rdb/qemu/2022-01-11_qemu_git_log_kernel_5.16_no_kvm_guest.txt Cédric, I can provide you remote access (either ssh or remote desktop) to the computer with the NXP T2080 cpu for doing some debugging if you want, just drop me a private email and we will arrange the time for a session.