Re: [PATCH 7/9] KVM: Expose the architectural performance monitoring CPUID leaf

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

 



On Tue, Nov 01, 2011 at 11:43:14AM -0600, David Ahern wrote:
> 
> 
> On 11/01/2011 10:40 AM, Gleb Natapov wrote:
> >>>> If PERF_EVENTS is disabled in the host kernel will KVM return the right
> >>>> thing for the guest that might have PERF_EVENTS enabled?
> >>>>
> >>> With correct implementation of perf_get_x86_pmu_capability() it should.
> >>> PERF_EVENTS disable version should set cap.version to zero, so guest will
> >>> find that vcpu does not provide architectural PMU.
> >>
> >> Ok.
> >>
> >> I was also thinking about kvm-kmod where newer KVM source is compiled
> >> against older kernels - which at one point had PERF_EVENTS as a
> >> configurable parameter. In this case it is possible to have perf events
> >> disabled host side yet enabled guest side.
> >>
> > KVM PMU implementation uses host perf events to talk to HW. Without host
> > perf infrastructure KVM will not be able to provide PMU to a guest. Or
> > are you saying that we should support compiling KVM with !PERF_EVENTS? I'd
> > rather just make KVM select PERF_EVENTS.
> 
> Strictly speaking KVM does not require PERF_EVENTS; it only requires it
> if a PMU is to be offered to the guest -- which is a new KVM feature.
> 
> Not requiring PERF_EVENTS makes kvm-kmod a bit simpler, a use case where
> the kvm source deals with a pre-configured kernel.
> 
Making kvm-kmod life simpler is not consideration for new KVM features
and in KVM we usually do note make optional features, but just select
required subsystem.  That said it shouldn't be hard to make KVM PMU be
dependant on PERF_EVENTS, but since I can't disable PERF_EVENTS right now
I can't test it either, so for now I'll just add select PERF_EVENTS to
KVM.

--
			Gleb.
--
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