[PATCH v1 5/8] KVM/x86/vPMU: intel_pmu_read_pmc

2018-11-01 Thread Wei Wang
This patch adds the handling of guest rdpmc. If the physical counter has been assigned, directly reads the value from the hardware. Otherwise, return to the guest the virtual counter value. Signed-off-by: Wei Wang Cc: Paolo Bonzini Cc: Andi Kleen Cc: Peter Zijlstra --- arch/x86/kvm/pmu.c

[PATCH v1 5/8] KVM/x86/vPMU: intel_pmu_read_pmc

2018-11-01 Thread Wei Wang
This patch adds the handling of guest rdpmc. If the physical counter has been assigned, directly reads the value from the hardware. Otherwise, return to the guest the virtual counter value. Signed-off-by: Wei Wang Cc: Paolo Bonzini Cc: Andi Kleen Cc: Peter Zijlstra --- arch/x86/kvm/pmu.c