Page MenuHomeFreeBSD

D32559.diff
No OneTemporary

D32559.diff

diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c
--- a/sys/amd64/vmm/io/vlapic.c
+++ b/sys/amd64/vmm/io/vlapic.c
@@ -83,6 +83,7 @@
#define VLAPIC_BUS_FREQ (128 * 1024 * 1024)
static void vlapic_set_error(struct vlapic *, uint32_t, bool);
+static void vlapic_callout_handler(void *arg);
static __inline uint32_t
vlapic_get_id(struct vlapic *vlapic)
@@ -710,6 +711,13 @@
return (0);
}
+static void
+vlapic_callout_reset(struct vlapic *vlapic, sbintime_t t)
+{
+ callout_reset_sbt_curcpu(&vlapic->callout, t, 0,
+ vlapic_callout_handler, vlapic, 0);
+}
+
static void
vlapic_callout_handler(void *arg)
{
@@ -765,8 +773,7 @@
}
bintime_add(&vlapic->timer_fire_bt, &vlapic->timer_period_bt);
- callout_reset_sbt(&vlapic->callout, rem_sbt, 0,
- vlapic_callout_handler, vlapic, 0);
+ vlapic_callout_reset(vlapic, rem_sbt);
}
done:
VLAPIC_TIMER_UNLOCK(vlapic);
@@ -792,8 +799,7 @@
bintime_add(&vlapic->timer_fire_bt, &vlapic->timer_period_bt);
sbt = bttosbt(vlapic->timer_period_bt);
- callout_reset_sbt(&vlapic->callout, sbt, 0,
- vlapic_callout_handler, vlapic, 0);
+ vlapic_callout_reset(vlapic, sbt);
} else
callout_stop(&vlapic->callout);
@@ -1667,8 +1673,7 @@
bintime_add(&vlapic->timer_fire_bt, &bt);
sbt = bttosbt(bt);
- callout_reset_sbt(&vlapic->callout, sbt, 0,
- vlapic_callout_handler, vlapic, 0);
+ vlapic_callout_reset(vlapic, sbt);
} else {
/* even if the CCR was 0, periodic timers should be reset */
if (vlapic_periodic_timer(vlapic)) {
@@ -1678,8 +1683,7 @@
sbt = bttosbt(vlapic->timer_period_bt);
callout_stop(&vlapic->callout);
- callout_reset_sbt(&vlapic->callout, sbt, 0,
- vlapic_callout_handler, vlapic, 0);
+ vlapic_callout_reset(vlapic, sbt);
}
}

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 14, 5:09 PM (6 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15797541
Default Alt Text
D32559.diff (1 KB)

Event Timeline