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>
This commit is contained in:
zhenwei pi 2022-07-07 08:56:02 +08:00 committed by Konstantin Kostiuk
parent fd89c8ab09
commit 1db8a0b0ea
3 changed files with 176 additions and 0 deletions

View file

@ -2543,3 +2543,9 @@ GuestDiskStatsInfoList *qmp_guest_get_diskstats(Error **errp)
error_setg(errp, QERR_UNSUPPORTED);
return NULL;
}
GuestCpuStatsList *qmp_guest_get_cpustats(Error **errp)
{
error_setg(errp, QERR_UNSUPPORTED);
return NULL;
}