KVM: emulate lapic tsc deadline timer for guest
authorLiu, Jinsong <jinsong.liu@intel.com>
Thu, 22 Sep 2011 08:55:52 +0000 (16:55 +0800)
committerAvi Kivity <avi@redhat.com>
Wed, 5 Oct 2011 13:34:56 +0000 (15:34 +0200)
commita3e06bbe8445f57eb949e6474c5a9b30f24d2057
treefc6f43d1c4424a5bdab1e39fe1e29e8b3ca47ae3
parentb90dfb0419a79a90395e04fee3fbda3c12ba8237
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>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/kvm_timer.h
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/x86.c