diff options
author | Liu, Jinsong <jinsong.liu@intel.com> | 2011-09-22 10:55:52 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-10-05 15:34:56 +0200 |
commit | a3e06bbe8445f57eb949e6474c5a9b30f24d2057 (patch) | |
tree | fc6f43d1c4424a5bdab1e39fe1e29e8b3ca47ae3 /arch/x86/kvm/lapic.h | |
parent | x86: TSC deadline definitions (diff) | |
download | linux-a3e06bbe8445f57eb949e6474c5a9b30f24d2057.tar.xz 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/kvm/lapic.h')
-rw-r--r-- | arch/x86/kvm/lapic.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index 82872432d475..138e8cc6fea6 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h @@ -42,6 +42,9 @@ int kvm_lapic_enabled(struct kvm_vcpu *vcpu); bool kvm_apic_present(struct kvm_vcpu *vcpu); int kvm_lapic_find_highest_irr(struct kvm_vcpu *vcpu); +u64 kvm_get_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu); +void kvm_set_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu, u64 data); + void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr); void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu); void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu); |