On Wed, 17 May 2023 at 03:23, Jiatong Shen <yshxxsjt...@gmail.com> wrote:
>
> Hello community Experts!
>
>     I am doing some experiments with arm64 host machine. The host machine is 
> kunpeng 920 5251k. I try to boot a virtual machine with the following command:
>
> qemu-system-aarch64 -cpu cortex-a53 -enable-kvm -smp 1 -m 4096 -M 
> virt,gic-version=3
>
> Here I have modified the code, and change kvm_target from 
> QEMU_KVM_ARM_TARGET_CORTEX_A53 to 5(generic arm  v8).

This is part of what is confusing you: this is not a correct change.

> when the vm boots, I try to use lscpu, but I still saw some feature flags 
> like atomics exist.

In a KVM VM you will always see in the guest the exact same
CPU type as the host. There is no support in the kernel for
showing the guest a different CPU type to what the hardware has.
At the QEMU level, that means you should always use '-cpu host'
when using KVM. (Or you can use '-cpu max' if you want the
same command line to work without KVM. For KVM max and host
do the same thing.)

thanks
-- PMM

Reply via email to