First post, by superfury
What happens when an IRET is executed while both the NT(Nested Task) and VM(Virtual 8086 mode) flags in EFLAGS are set, while EFLAGS.IOPL is 3? Will the CPU perform a return to the parent task(undocumented behaviour)? Or will the CPU ignore the NT flag and perform a V86-mode IRET to the caller in V86 mode(just like in real mode)?
Edit: http://nicolascormier.com/documentation/hardw … 386/Chap15.html
Chapter 15.3.1:
A task switch to or from a V86 task may be due to any of three causes: […]
A task switch to or from a V86 task may be due to any of three causes:
1. An interrupt that vectors to a task gate.
2. An action of the scheduler of the 80386 operating system.
3. An IRET when the NT flag is set.
So the NT flag has higher priority than a normal V86 mode IRET to the same task's calling interrupt(when both VM and NT are set), instead of relying on IOPL to either throw a #GP(0) fault or plain real-mode style IRET?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io