Re: [PATCH v1 3/4] qemu_domain.c: do not launch ppc64 guests with 'pmu' setting

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

 





On 3/23/20 2:28 PM, Andrea Bolognani wrote:
On Thu, 2020-03-19 at 18:44 -0300, Daniel Henrique Barboza wrote:
The Perfomance Monitoring Unit (PMU) feature is not available for
the Power architecture. The "<pmu/>" feature will always have a value
'on' or 'off' after saving the domain XML, and both will be rejected
by QEMU when launching. This is the error message for
"<pmu state='on'/>":

qemu-kvm: can't apply global host-powerpc64-cpu.pmu=on: Property '.pmu' not found

A similar error message is thrown for "<pmu state='off'/>".

This patch prevents the pseries guest from launching with any
pmu setting with a more informative error message:

error: unsupported configuration: The 'pmu' feature is not
supported for architecture 'ppc64' or machine type 'pseries'

I don't think this is right. While you are correct that PMU can't be
configured for pSeries guests, I think that's because of the opposite
reason: it's always on, and can't be turned off.

For comparison's sake: in an x86 guest with <pmu state='on'/> I get

   $ perf list | grep -E 'Hardware.*event'
     branch-instructions OR branches  [Hardware event]
     branch-misses                    [Hardware event]
     bus-cycles                       [Hardware event]
     cache-misses                     [Hardware event]
     cache-references                 [Hardware event]
     cpu-cycles OR cycles             [Hardware event]
     instructions                     [Hardware event]
     ref-cycles                       [Hardware event]
     L1-dcache-load-misses            [Hardware cache event]
     L1-dcache-loads                  [Hardware cache event]
     L1-dcache-stores                 [Hardware cache event]
     L1-icache-load-misses            [Hardware cache event]
     branch-load-misses               [Hardware cache event]
     branch-loads                     [Hardware cache event]
     dTLB-load-misses                 [Hardware cache event]
     dTLB-loads                       [Hardware cache event]
     dTLB-store-misses                [Hardware cache event]
     dTLB-stores                      [Hardware cache event]
     iTLB-load-misses                 [Hardware cache event]
     iTLB-loads                       [Hardware cache event]

whereas when I turn off PMU all of those are gone.

In a pSeries guest running on POWER8, without any configuration,
I get:

   $ perf list | grep -E 'Hardware.*event'
     branch-instructions OR branches                  [Hardware event]
     branch-misses                                    [Hardware event]
     cache-misses                                     [Hardware event]
     cache-references                                 [Hardware event]
     cpu-cycles OR cycles                             [Hardware event]
     instructions                                     [Hardware event]
     stalled-cycles-backend OR idle-cycles-backend    [Hardware event]
     stalled-cycles-frontend OR idle-cycles-frontend  [Hardware event]
     L1-dcache-load-misses                            [Hardware cache event]
     L1-dcache-loads                                  [Hardware cache event]
     L1-dcache-prefetches                             [Hardware cache event]
     L1-dcache-store-misses                           [Hardware cache event]
     L1-icache-load-misses                            [Hardware cache event]
     L1-icache-loads                                  [Hardware cache event]
     L1-icache-prefetches                             [Hardware cache event]
     LLC-load-misses                                  [Hardware cache event]
     LLC-loads                                        [Hardware cache event]
     LLC-prefetches                                   [Hardware cache event]
     LLC-store-misses                                 [Hardware cache event]
     LLC-stores                                       [Hardware cache event]
     branch-load-misses                               [Hardware cache event]
     branch-loads                                     [Hardware cache event]
     dTLB-load-misses                                 [Hardware cache event]
     iTLB-load-misses                                 [Hardware cache event]

So it seems to me that, if anything, the PMU feature should be
treated like the <panic/> device, that is, automatically added to
pSeries guests if it's not present already.


I'll check it out how <panic/> is implemented. As long as we don't end up putting
"Property '.pmu' not found" in the QEMU command line (which will cause an error) then
I think it's ok to have it in the XML.



David, what's your opinion on the matter?





[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