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

Bibo Mao posted 3 patches 2 weeks, 4 days ago
Maintainers: Song Gao <gaosong@loongson.cn>
[PATCH 2/3] target/loongarch: Add full type support with query-cpu-model-expansion
Posted by Bibo Mao 2 weeks, 4 days ago
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>
---
 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.39.3