]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Add support for VMware backdoor Pseudo-PMCs
authorArbel Moshe <arbel.moshe@oracle.com>
Mon, 12 Mar 2018 11:12:53 +0000 (13:12 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 16 Mar 2018 21:02:01 +0000 (22:02 +0100)
commitead167f5eae9e674de8235cf2ecf6dbf6eae6ba2
tree9fbeb2ebc8c352acdbaab0c13857de719467a76b
parent0720e8345f525036d9adc8a581705cd62e921eed
KVM: x86: Add support for VMware backdoor Pseudo-PMCs

VMware exposes the following Pseudo PMCs:
0x10000: Physical host TSC
0x10001: Elapsed real time in ns
0x10002: Elapsed apparent time in ns

For more info refer to:
https://www.vmware.com/files/pdf/techpaper/Timekeeping-In-VirtualMachines.pdf

VMware allows access to these Pseduo-PMCs even when read via RDPMC
in Ring3 and CR4.PCE=0. Therefore, commit modifies x86 emulator
to allow access to these PMCs in this situation. In addition,
emulation of these PMCs were added to kvm_pmu_rdpmc().

Signed-off-by: Arbel Moshe <arbel.moshe@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c
arch/x86/kvm/pmu.c
arch/x86/kvm/pmu.h
arch/x86/kvm/x86.c