qga: add command 'guest-get-cpustats'
commit1db8a0b0ea2fb72ecab36bd3143a9715c083d5d3
authorzhenwei pi <pizhenwei@bytedance.com>
Thu, 7 Jul 2022 00:56:02 +0000 (7 08:56 +0800)
committerKonstantin Kostiuk <kkostiuk@redhat.com>
Wed, 13 Jul 2022 09:19:18 +0000 (13 12:19 +0300)
treefb9e329f89c25214d7a002b48fbce58c71cedef8
parentfd89c8ab091bf7faeea04bef51d4296a53a35279
qga: add command 'guest-get-cpustats'

A vCPU thread always reaches 100% utilization when:
- guest uses idle=poll
- disable HLT vm-exit
- enable MWAIT

Add new guest agent command 'guest-get-cpustats' to get guest CPU
statistics, we can know the guest workload and how busy the CPU is.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Message-Id: <20220707005602.696557-3-pizhenwei@bytedance.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
qga/commands-posix.c
qga/commands-win32.c
qga/qapi-schema.json