Re: KVM PMU virtualization

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

 



On Mon, 2010-03-01 at 12:11 +0100, Joerg Roedel wrote:
> 
> 1. Enhance perf to count pmu events only when cpu is in guest mode.

No enhancements needed, only hardware support for Intel doesn't provide
this iirc.

> 2. For every emulated performance counter the guest activates kvm
>    allocates a perf_event and configures it for the guest (we may allow
>    kvm to specify the counter index, the guest would be able to use
>    rdpmc unintercepted then). Event filtering is also done in this step.

rdpmc can never be used unintercepted, for perf might be multiplexing
the actual hw.

> 3. Before vmrun the guest activates all its counters, 

Right, this is could be used to approximate the guest only counting. I'm
not sure how the OS and USR bits interact with guest stuff - if the PMU
isn't aware of the virtualized priv levels then those will not work as
expected.

> this can fail if
>    the host uses them or the requested pmc index is not available for some
>    reason.

perf doesn't know about pmc indexes at the interface level, nor is that
needed I think.

> 4. Some additional magic to reinject pmu events into the guest

Right, that is needed, and might be 'interesting' since we get them from
NMI context.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux