All of lore.kernel.org
 help / color / mirror / Atom feed
From: "mario@locati.it" <mario@locati.it>
To: clg@kaod.org
Cc: danielhb413@gmail.com, farosas@linux.ibm.com,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] target/ppc: Fix e6500 boot
Date: Tue, 11 Jan 2022 10:04:34 +0100	[thread overview]
Message-ID: <R5JFVM$911E343FF81933B99D53FD0992D8848F@locati.it> (raw)
In-Reply-To: <10391a07-e5e1-99e6-ed68-c93520534f29@kaod.org>

>From: "Cédric Le Goater" clg@kaod.org
>To: "mario@locati.it" mario@locati.it, balaton@eik.bme.hu
>Cc: farosas@linux.ibm.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, danielhb413@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.



  reply	other threads:[~2022-01-11  9:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13 13:35 [PATCH] target/ppc: Fix e6500 boot Fabiano Rosas
2021-12-13 14:03 ` Cédric Le Goater
2021-12-13 14:59   ` Fabiano Rosas
2021-12-13 19:51 ` BALATON Zoltan
2021-12-25 18:46   ` mario
2021-12-25 21:53     ` BALATON Zoltan
2021-12-26 17:57       ` Cédric Le Goater
2021-12-27 19:12         ` mario
2021-12-27 20:05           ` Fabiano Rosas
2021-12-27 20:33             ` BALATON Zoltan
2021-12-28 11:32             ` mario
2021-12-27 20:31           ` BALATON Zoltan
2022-01-10  8:04     ` Cédric Le Goater
2022-01-11  9:04       ` mario [this message]
2021-12-15 16:52 ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='R5JFVM$911E343FF81933B99D53FD0992D8848F@locati.it' \
    --to=mario@locati.it \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=farosas@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.