]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit65d9281bea508bb155f0c3d6493140d23eadc9dd
treeed5d7df52d131213a898c34d4596d60e997c485c
parent2d17addb3a6638273541b65fa9b127f142b0561b
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