thermosphere: add hypervisor timer code

This commit is contained in:
TuxSH
2020-01-09 19:24:05 +00:00
parent 3d3a9925b9
commit 1eb60a2a52
10 changed files with 169 additions and 17 deletions

View File

@@ -77,5 +77,15 @@ static inline bool irqIsGuest(u16 id)
return false;
}
return id != GIC_IRQID_MAINTENANCE && id != GIC_IRQID_HYP_TIMER;
bool ret = id != GIC_IRQID_MAINTENANCE && id != GIC_IRQID_NS_PHYS_HYP_TIMER;
#if GIC_IRQID_NS_VIRT_HYP_TIMER != GIC_IRQID_SPURIOUS
ret = ret && id != GIC_IRQID_NS_VIRT_HYP_TIMER;
#endif
#if GIC_IRQID_SEC_PHYS_HYP_TIMER != GIC_IRQID_SPURIOUS
ret = ret && id != GIC_IRQID_SEC_PHYS_HYP_TIMER;
#endif
#if GIC_IRQID_SEC_VIRT_HYP_TIMER != GIC_IRQID_SPURIOUS
ret = ret && id != GIC_IRQID_SEC_VIRT_HYP_TIMER;
#endif
return ret;
}