Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107405785
D32559.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32559.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D32559: vlapic: Schedule callouts on the local CPU
Attached
Detach File
Event Timeline
Log In to Comment