KVM: x86: Allow marking an exception as reinjected
[safe/jmp/linux-2.6] / arch / x86 / kernel / vmiclock_32.c
index 33a788d..5e1ff66 100644 (file)
@@ -68,7 +68,7 @@ unsigned long long vmi_sched_clock(void)
        return cycles_2_ns(vmi_timer_ops.get_cycle_counter(VMI_CYCLES_AVAILABLE));
 }
 
-/* paravirt_ops.get_tsc_khz = vmi_tsc_khz */
+/* x86_platform.calibrate_tsc = vmi_tsc_khz */
 unsigned long vmi_tsc_khz(void)
 {
        unsigned long long khz;
@@ -79,11 +79,7 @@ unsigned long vmi_tsc_khz(void)
 
 static inline unsigned int vmi_get_timer_vector(void)
 {
-#ifdef CONFIG_X86_IO_APIC
-       return FIRST_DEVICE_VECTOR;
-#else
-       return FIRST_EXTERNAL_VECTOR;
-#endif
+       return IRQ0_VECTOR;
 }
 
 /** vmi clockchip */
@@ -171,7 +167,7 @@ static int vmi_timer_next_event(unsigned long delta,
 {
        /* Unfortunately, set_next_event interface only passes relative
         * expiry, but we want absolute expiry.  It'd be better if were
-        * were passed an aboslute expiry, since a bunch of time may
+        * were passed an absolute expiry, since a bunch of time may
         * have been stolen between the time the delta is computed and
         * when we set the alarm below. */
        cycle_t now = vmi_timer_ops.get_cycle_counter(vmi_counter(VMI_ONESHOT));
@@ -202,7 +198,6 @@ static struct irqaction vmi_clock_action  = {
        .name           = "vmi-timer",
        .handler        = vmi_timer_interrupt,
        .flags          = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
-       .mask           = CPU_MASK_ALL,
 };
 
 static void __devinit vmi_time_init_clockevent(void)
@@ -227,7 +222,7 @@ static void __devinit vmi_time_init_clockevent(void)
        evt->min_delta_ns = clockevent_delta2ns(1, evt);
        evt->cpumask = cpumask_of(cpu);
 
-       printk(KERN_WARNING "vmi: registering clock event %s. mult=%lu shift=%u\n",
+       printk(KERN_WARNING "vmi: registering clock event %s. mult=%u shift=%u\n",
               evt->name, evt->mult, evt->shift);
        clockevents_register_device(evt);
 }
@@ -284,7 +279,7 @@ void __devinit vmi_time_ap_init(void)
 /** vmi clocksource */
 static struct clocksource clocksource_vmi;
 
-static cycle_t read_real_cycles(void)
+static cycle_t read_real_cycles(struct clocksource *cs)
 {
        cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
        return max(ret, clocksource_vmi.cycle_last);