thermosphere: fix guest access to irq 25, etc; we don't need to raise VI manually

See Armv8a TRM "Virtual IRQ exception"
This commit is contained in:
TuxSH 2019-12-26 00:05:36 +00:00
parent cdf3bc6942
commit 676a895cca
3 changed files with 47 additions and 35 deletions

View file

@ -15,7 +15,6 @@
*/
#include "irq.h"
#include "platform/interrupt_config.h"
#include "core_ctx.h"
#include "debug_log.h"
#include "vgic.h"
@ -134,11 +133,6 @@ void initIrq(void)
recursiveSpinlockUnlockRestoreIrq(&g_irqManager.lock, flags);
}
bool isGuestIrq(u16 id)
{
return true;
}
void handleIrqException(ExceptionStackFrame *frame, bool isLowerEl, bool isA32)
{
(void)isLowerEl;
@ -178,6 +172,8 @@ void handleIrqException(ExceptionStackFrame *frame, bool isLowerEl, bool isA32)
// Priority drop
gicc->eoir = iar;
isGuestInterrupt = isGuestInterrupt && irqIsGuest(irqId);
recursiveSpinlockLock(&g_irqManager.lock);
if (!isGuestInterrupt) {