On Thu, 23 Mar 2023 at 06:59, Zheng Jian <zhe...@justsafe.com> wrote: > > Dear Qemu technical experts: > > My question is whether QEMU also needs to support specific CPU models > when KVM is turned on? Here is the description of the problem I encountered.
No, there's nothing particularly you need to enable in QEMU. > I want to run KVM+QEMU on my mobile phone, which is piexl7. Compiled > the corresponding qemu-system-aarch64 bin. > > Then put it into the mobile phone to run, and found that qemu would > hang, and then stopped running. The command line is as follows > > ./qemu-system-aarch64 -enable-kvm -m 1024 -M virt -cpu host \ > -nographic -kernel Image -drive if=none,file=disk_oe64.img,id=fs -device > virtio-blk-device,drive=fs \ > -append "earlyprintk console=ttyAMA0 mem=512M rootwait root=/dev/vda rw" There's nothing obviously wrong with this command line (well, the difference between the -m option and the mem= command line is weird but shouldn't hurt). Suggestions for debugging: * look for anything interesting in the host kernel logs * check whether 'earlycon' is any better for early kernel output than 'earlyprintk' * make sure you're using a recent QEMU * make sure you're using a recent host kernel * make sure you're using a recent guest kernel * enable QEMU's gdbstub and connect a gdb to it to see what's happening (if you're comfortable with trying to debug low-level boot issues) thanks -- PMM