Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F98096969
D39093.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
D39093.diff
View Options
diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c
--- a/sys/arm/arm/generic_timer.c
+++ b/sys/arm/arm/generic_timer.c
@@ -655,8 +655,13 @@
}
#ifdef __aarch64__
- /* Use the virtual timer if we have one. */
- if (sc->irqs[GT_VIRT].res != NULL) {
+ /*
+ * Use the virtual timer when we can't use the hypervisor.
+ * A hypervisor guest may change the virtual timer registers while
+ * executing so any use of the virtual timer interrupt needs to be
+ * coordinated with the virtual machine manager.
+ */
+ if (!HAS_PHYS) {
sc->physical = false;
first_timer = GT_VIRT;
last_timer = GT_VIRT;
@@ -687,12 +692,9 @@
}
}
- /* Disable the virtual timer until we are ready */
- if (sc->irqs[GT_VIRT].res != NULL)
- arm_tmr_disable(false);
- /* And the physical */
- if ((sc->irqs[GT_PHYS_SECURE].res != NULL ||
- sc->irqs[GT_PHYS_NONSECURE].res != NULL) && HAS_PHYS)
+ /* Disable the timers until we are ready */
+ arm_tmr_disable(false);
+ if (HAS_PHYS)
arm_tmr_disable(true);
arm_tmr_timecount.tc_frequency = sc->clkfreq;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 3, 8:17 AM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13436341
Default Alt Text
D39093.diff (1 KB)
Attached To
Mode
D39093: Use the physical timer when able
Attached
Detach File
Event Timeline
Log In to Comment