aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/pmtimer.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-12-20 10:37:23 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-12-20 10:37:23 +0000
commitddc35d1cc994bde1c3560c5dc30a4adc944ef4ac (patch)
tree70de5fedc1a3be62d38992962caac2b15647da6d /xen/arch/x86/hvm/pmtimer.c
parent625141e5d7a0076eddf421cd7afccefce9cb000e (diff)
downloadxen-ddc35d1cc994bde1c3560c5dc30a4adc944ef4ac.tar.gz
xen-ddc35d1cc994bde1c3560c5dc30a4adc944ef4ac.tar.bz2
xen-ddc35d1cc994bde1c3560c5dc30a4adc944ef4ac.zip
[HVM] Enable more than one platform timer (PIT/RTC/HPET)
programmed as periodic timer and adds them to abstract layer, which keeps track of pending_intr_nr to avoid time interrupt lost and sync'ed timer with TSC. It also makes some cleanup to the time related code. Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Diffstat (limited to 'xen/arch/x86/hvm/pmtimer.c')
-rw-r--r--xen/arch/x86/hvm/pmtimer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/pmtimer.c b/xen/arch/x86/hvm/pmtimer.c
index b435fbdf9f..28be242f84 100644
--- a/xen/arch/x86/hvm/pmtimer.c
+++ b/xen/arch/x86/hvm/pmtimer.c
@@ -55,6 +55,14 @@ void pmtimer_init(struct vcpu *v, int base)
register_portio_handler(v->domain, base, 4, handle_pmt_io);
}
+void pmtimer_migrate_timers(struct vcpu *v)
+{
+ struct PMTState *vpmt = &v->domain->arch.hvm_domain.pl_time.vpmt;
+
+ if (vpmt->vcpu == v)
+ migrate_timer(&vpmt->timer, v->processor);
+}
+
void pmtimer_deinit(struct domain *d)
{
PMTState *s = &d->arch.hvm_domain.pl_time.vpmt;