[svsm-devel] [RFC] task/schedule: Idle process?

Jörg Rödel joro at 8bytes.org
Thu Sep 7 10:47:16 CEST 2023


Hi Carlos,

On Wed, Sep 06, 2023 at 09:29:00AM -0500, Carlos Bilbao wrote:
> The PR for the scheduler (#64) is still under review. In traditional OSs,
> it makes sense to include an idle userspace process that does nothing and
> is always there to be scheduled. So I was wondering if we should do the
> same for the SVSM.
> 
> Currently, SVSM schedules the "root" task responsible for running the
> request loop. However, in the event of a SvsmReqError:FatalError, this
> process may terminate prematurely. This raises the question: should we
> introduce an idle process in SVSM, or is it irrelevant in that context?
> 
> My first intuition is that if we don't have an idle process, then the SVSM
> itself would terminate, and perhaps that would difficult further debugging
> of potential errors. Or maybe it would not?

Yes, we plan with an idle process. It will be the (kernel-only) process
that gives control back to the guest OS by switching the VMPL.

The idea is that we have a runqueue and execute tasks from that as
long as any of them is runable. Once no process is runable anymore the
idle task is selected by the scheduler and switches back to the guest
VMPL.

Regards,

	Joerg


More information about the Svsm-devel mailing list