qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/4] target/riscv: add query-cpy-definitions support


From: Richard Henderson
Subject: Re: [PATCH v2 2/4] target/riscv: add query-cpy-definitions support
Date: Mon, 10 Apr 2023 18:56:13 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 4/10/23 09:52, Daniel Henrique Barboza wrote:
This command is used by tooling like libvirt to retrieve a list of
supported CPUs. Each entry returns a CpuDefinitionInfo object that
contains more information about each CPU.

This initial support includes only the name of the CPU and its typename.
Here's what the command produces for the riscv64 target:

$ ./build/qemu-system-riscv64 -S -M virt -display none -qmp stdio
{"QMP": {"version": (...)}
{"execute": "qmp_capabilities", "arguments": {"enable": ["oob"]}}
{"return": {}}
{"execute": "query-cpu-definitions"}
{"return": [
{"name": "rv64", "typename": "rv64-riscv-cpu", "static": false, "deprecated": 
false},
{"name": "sifive-e51", "typename": "sifive-e51-riscv-cpu", "static": false, 
"deprecated": false},
{"name": "any", "typename": "any-riscv-cpu", "static": false, "deprecated": 
false},
{"name": "x-rv128", "typename": "x-rv128-riscv-cpu", "static": false, 
"deprecated": false},
{"name": "shakti-c", "typename": "shakti-c-riscv-cpu", "static": false, 
"deprecated": false},
{"name": "thead-c906", "typename": "thead-c906-riscv-cpu", "static": false, 
"deprecated": false},
{"name": "sifive-u54", "typename": "sifive-u54-riscv-cpu", "static": false, 
"deprecated": false}]
}

Next patches will implement the 'static' attribute of CpuDefinitionInfo.

Signed-off-by: Daniel Henrique Barboza<dbarboza@ventanamicro.com>
---
  qapi/machine-target.json      |  6 ++--
  target/riscv/meson.build      |  3 +-
  target/riscv/riscv-qmp-cmds.c | 53 +++++++++++++++++++++++++++++++++++
  3 files changed, 59 insertions(+), 3 deletions(-)
  create mode 100644 target/riscv/riscv-qmp-cmds.c

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]