For people who would be interested to try this series, I used attached script.

$ ./qmp_schema.sh ./build/qemu-system-x86_64 -M none > x86_64
$ ./qmp_schema.sh ./build/qemu-system-s390x -M none > s390x
$ vimdiff x86_64 s390x

----
diff --git a/qmp_schema.sh b/qmp_schema.sh
new file mode 100755
index 00000000000..576f7d71dfd
--- /dev/null
+++ b/qmp_schema.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+if [ $# -lt 1 ]; then
+    echo 'usage: qemu_cmd' 1>&2
+    exit 1
+fi
+
+qemu_cmd=$*
+
+$qemu_cmd \
+-display none \
+-qmp unix:qmp-socket,server \
+&
+
+qemu_pid=$!
+
+sleep 1
+
+qmp_session()
+{
+    cat << EOF
+    { "execute": "qmp_capabilities" }
+    { "execute": "query-qmp-schema" }
+    { "execute": "query-cpu-model-expansion",
+      "arguments": { "type": "full", "model": { "name": "max" } } }
+EOF
+}
+
+qmp_session | socat - unix-connect:qmp-socket | jq
+kill $qemu_pid


Reply via email to