KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch
authorWei Huang <wehuang@redhat.com>
Fri, 19 Jun 2015 13:45:05 +0000 (15:45 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 23 Jun 2015 12:12:14 +0000 (14:12 +0200)
commit25462f7f5295e2d3e9c2b31761ac95f0b3c8562f
treeed5d7df52d131213a898c34d4596d60e997c485c
parent41aac14a8dee66a720894e5979c2372c0d5afd34
KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch

This patch defines a new function pointer struct (kvm_pmu_ops) to
support vPMU for both Intel and AMD. The functions pointers defined in
this new struct will be linked with Intel and AMD functions later. In the
meanwhile the struct that maps from event_sel bits to PERF_TYPE_HARDWARE
events is renamed and moved from Intel specific code to kvm_host.h as a
common struct.

Reviewed-by: Joerg Roedel <jroedel@suse.de>
Tested-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Wei Huang <wei@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/Makefile
arch/x86/kvm/pmu.c
arch/x86/kvm/pmu.h
arch/x86/kvm/pmu_amd.c [new file with mode: 0644]
arch/x86/kvm/pmu_intel.c [new file with mode: 0644]
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c