[PULL 2/8] target/loongarch: Add full type support with query-cpu-model-expansion

Song Gao posted 8 patches 1 month, 1 week ago
Maintainers: Song Gao <gaosong@loongson.cn>, Bibo Mao <maobibo@loongson.cn>, Jiaxun Yang <jiaxun.yang@flygoat.com>
There is a newer version of this series
[PULL 2/8] target/loongarch: Add full type support with query-cpu-model-expansion
Posted by Song Gao 1 month, 1 week ago
From: Bibo Mao <maobibo@loongson.cn>

On LoongArch with QMP command query-cpu-model-expansion, only static
type is supported, full type is not supported. Here add full type support
with QMP cpu model query command.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
---
 target/loongarch/loongarch-qmp-cmds.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/loongarch/loongarch-qmp-cmds.c b/target/loongarch/loongarch-qmp-cmds.c
index f89f67ce47..6a95080fe4 100644
--- a/target/loongarch/loongarch-qmp-cmds.c
+++ b/target/loongarch/loongarch-qmp-cmds.c
@@ -58,7 +58,8 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type,
     const char *name;
     int i;
 
-    if (type != CPU_MODEL_EXPANSION_TYPE_STATIC) {
+    if ((type != CPU_MODEL_EXPANSION_TYPE_STATIC) &&
+        (type != CPU_MODEL_EXPANSION_TYPE_FULL)) {
         error_setg(errp, "The requested expansion type is not supported");
         return NULL;
     }
-- 
2.52.0