Page MenuHomeFreeBSD

D39093.diff
No OneTemporary

D39093.diff

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

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)

Event Timeline