1. A computer-implemented method for thread context restoration in a configuration comprising a core configurable between a single thread (ST) mode and a multithreading (MT) mode, the ST mode addressing a primary thread and the MT mode addressing the primary thread and one or more secondary threads on shared resources of the core, the method comprising: based on switching from the MT mode to the ST mode, disabling the one or more secondary threads, wherein a thread context comprising program accessible register values and program counter values of the one or more secondary threads is made unavailable to programs; querying a last-specified maximum MT level in the ST mode to determine a last-set program-specified maximum thread-id of the configuration; and based on the last-set program-specified maximum thread-id indicating MT, obtaining the thread context of the one or more secondary threads by performing a) and b) comprising: a) executing a set MT instruction to resume the MT mode; and b) based on being in the resumed MT mode, accessing the thread context of the one or more secondary threads.