]> git.proxmox.com Git - mirror_qemu.git/commit
target/loongarch: Implement query-cpu-model-expansion
authorSong Gao <gaosong@loongson.cn>
Fri, 20 Oct 2023 08:49:25 +0000 (16:49 +0800)
committerSong Gao <gaosong@loongson.cn>
Fri, 3 Nov 2023 06:13:07 +0000 (14:13 +0800)
commit31f694b91188d2077c5d85a5064b54b127635718
treeaf0bfe9a2e40e52f1e4809eecd2cfdbc025b2499
parent464136ceb65ddebbd60fecd486628cc82fd722ab
target/loongarch: Implement query-cpu-model-expansion

Add support for the query-cpu-model-expansion QMP command to LoongArch.
We support query the cpu features.

  e.g
    la464 and max cpu support LSX/LASX, default enable,
    la132 not support LSX/LASX.

    1. start with '-cpu max,lasx=off'

    (QEMU) query-cpu-model-expansion type=static  model={"name":"max"}
    {"return": {"model": {"name": "max", "props": {"lasx": false, "lsx": true}}}}

    2. start with '-cpu la464,lasx=off'
    (QEMU) query-cpu-model-expansion type=static  model={"name":"la464"}
    {"return": {"model": {"name": "max", "props": {"lasx": false, "lsx": true}}}

    3. start with '-cpu la132,lasx=off'
    qemu-system-loongarch64: can't apply global la132-loongarch-cpu.lasx=off: Property 'la132-loongarch-cpu.lasx' not found

    4. start with '-cpu max,lasx=off' or start with '-cpu la464,lasx=off' query cpu model la132
    (QEMU) query-cpu-model-expansion type=static  model={"name":"la132"}
    {"return": {"model": {"name": "la132"}}}

Acked-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231020084925.3457084-4-gaosong@loongson.cn>
qapi/machine-target.json
target/loongarch/loongarch-qmp-cmds.c