[libvirt] [PATCH 02/12] qemu: Return perf status that affect next boot for shutoff domains

Ján Tomko jtomko at redhat.com
Sat Sep 12 10:29:02 UTC 2020


On a Friday in 2020, Lin Ma wrote:
>While we set up perf events for a shutoff domain and check the settings,
>All of perf events are reported as 'disabled', unless we add --config,
>This is redundant for a shutoff domain.
>
> # virsh domstate $GUEST
>shut off
>
> # virsh perf --domain $GUEST
>cmt            : disabled
>mbmt           : disabled
>mbml           : disabled
>......
>
> # virsh perf --domain $GUEST --enable mbmt
>mbmt           : enabled
>
> # virsh perf --domain $GUEST
>cmt            : disabled
>mbmt           : disabled
>mbml           : disabled
>......
>
>Use virDomainObjGetOneDefState instead of virDomainObjGetOneDef to fix
>the issue. After patch, The perf event status of a shutoff domain is
>reported correctly:
>
> # virsh domstate $GUEST
>shut off
>
> # virsh perf --domain $GUEST
>cmt            : disabled
>mbmt           : disabled
>mbml           : disabled
>......
>
> # virsh perf --domain $GUEST --enable mbmt
>mbmt           : enabled
>
> # virsh perf --domain $GUEST
>cmt            : disabled
>mbmt           : enabled
>mbml           : disabled
>......
>
>Signed-off-by: Lin Ma <lma at suse.de>
>---
> src/qemu/qemu_driver.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200912/1e4f6df6/attachment-0001.sig>


More information about the libvir-list mailing list