Closed gagachang closed 2 months ago
Correct - at the initial entry to the TSM s-mode interrupts are disabled - see the note on page 31 (copied below):
Interruptible TSM with no re-entrancy - In this model, after the initial entry to the TSM with S- mode interrupts disabled, the TSM enables interrupts during execution of the TSM security routines. The TSM may install its interrupt handlers at this entry (or may be installed via the TEECALL flow as shown below).
Correct - at the initial entry to the TSM s-mode interrupts are disabled - see the note on page 31 (copied below):
It's clear, thanks!
Host OS/VMM invokes sbi_covh_run_tvm_vcpu() to run TVM. If there is an interrupt/exception during TVM execution, TVM will exit and sbi_covh_run_tvm_vcpu() will be returned to host OS/VMM. The TSM updates the host’s
scause
CSR. The host should use thescause
field to determine whether the exit was caused by an interrupt or exception.However, if sbi_covh_run_tvm_vcpu() is invoked with host's interrupt enabled, there can be another interrupt taken immediately after sbi_covh_run_tvm_vcpu() returns. Which causing the value of
scause
overwritten by new interrupt.Am I correct ? sbi_covh_run_tvm_vcpu() requires host OS/VMM disables interrupts first.