mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-13 19:25:13 +00:00
92a989b9d4
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
27 lines
596 B
Bash
Executable File
27 lines
596 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -z "${CPU_GATHER_PY}" ]; then
|
|
echo >&2 "Do not call this script directly. Use 'cpu-gather.py' instead."
|
|
exit 1
|
|
fi
|
|
|
|
model_expansion()
|
|
{
|
|
mode=$1
|
|
model=$2
|
|
|
|
echo '{"execute":"query-cpu-model-expansion","arguments":' \
|
|
'{"type":"'"$mode"'","model":'"$model"'},"id":"model-expansion"}'
|
|
}
|
|
|
|
$qemu -machine accel=kvm -cpu host -nodefaults -nographic -qmp stdio <<EOF
|
|
{"execute":"qmp_capabilities"}
|
|
$(
|
|
if [ "x$model" != x ]; then
|
|
model_expansion full "$model"
|
|
fi
|
|
)
|
|
{"execute":"query-cpu-definitions","id":"definitions"}
|
|
{"execute":"quit"}
|
|
EOF
|