thermosphere: move EnterInterruptibleHypervisorCode into IrqManager

This commit is contained in:
TuxSH committed 2021-02-19 21:52:27 +00:00
1 parent 4adb675072
commit 5b56d05e11
4 files changed
+10 -4

No files matched your search

+1 -1
View File
@@ -233,7 +233,7 @@ namespace ams::hvisor {
if (taskForBottomHalf != nullptr) {
// Unmasking the irq signal is left at the discretion of the bottom half handler
exceptionEnterInterruptibleHypervisorCode();
EnterInterruptibleHypervisorCode();
taskForBottomHalf->InterruptBottomHalfHandler(irqId, srcCore);
}
}
+9 -2
View File
@@ -19,11 +19,11 @@
#include "hvisor_gicv2.hpp"
#include "hvisor_synchronization.hpp"
#include "hvisor_i_interrupt_task.hpp"
#include "hvisor_exception_stack_frame.hpp"
#include "cpu/hvisor_cpu_sysreg_general.hpp"
#include "memory_map.h"
#include "exceptions.h" // TODO
namespace ams::hvisor {
class IrqManager final {
@@ -106,6 +106,13 @@ namespace ams::hvisor {
gicd->sgir = GicV2Distributor::ForwardToAllOthers << 24 | id;
}
static void EnterInterruptibleHypervisorCode()
{
// We don't want the guest to spam us with its timer interrupts. Disable the timers.
THERMOSPHERE_SET_SYSREG(cntp_ctl_el0, 0);
THERMOSPHERE_SET_SYSREG(cntv_ctl_el0, 0);
}
static void HandleInterrupt(ExceptionStackFrame *frame);
public:
-1
View File
@@ -17,7 +17,6 @@
#pragma once
#include "defines.hpp"
#include "exceptions.h"
#include "cpu/hvisor_cpu_exception_sysregs.hpp"
#include "hvisor_irq_manager.hpp"
#include "memory_map.h"