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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 11, 2020 at 03:06:09PM +0800, 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@xxxxxxx>
> ---
Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux