diff options
author | Liu, Jinsong <jinsong.liu@intel.com> | 2011-09-22 16:55:52 +0800 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-10-05 15:34:56 +0200 |
commit | a3e06bbe8445f57eb949e6474c5a9b30f24d2057 (patch) | |
tree | fc6f43d1c4424a5bdab1e39fe1e29e8b3ca47ae3 /arch/x86/include/asm | |
parent | b90dfb0419a79a90395e04fee3fbda3c12ba8237 (diff) | |
download | blackbird-op-linux-a3e06bbe8445f57eb949e6474c5a9b30f24d2057.tar.gz blackbird-op-linux-a3e06bbe8445f57eb949e6474c5a9b30f24d2057.zip |
KVM: emulate lapic tsc deadline timer for guest
This patch emulate lapic tsc deadline timer for guest:
Enumerate tsc deadline timer capability by CPUID;
Enable tsc deadline timer mode by lapic MMIO;
Start tsc deadline timer by WRMSR;
[jan: use do_div()]
[avi: fix for !irqchip_in_kernel()]
[marcelo: another fix for !irqchip_in_kernel()]
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index ab62711ccb78..b4973f4dab98 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -674,6 +674,8 @@ u8 kvm_get_guest_memory_type(struct kvm_vcpu *vcpu, gfn_t gfn); extern bool tdp_enabled; +u64 vcpu_tsc_khz(struct kvm_vcpu *vcpu); + /* control of guest tsc rate supported? */ extern bool kvm_has_tsc_control; /* minimum supported tsc_khz for guests */ |