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