The processor maintains current privilege level in CPL field. I want to know about all possible scenarios when CPL field changes from 3 to 0 and vice versa. For example, CPL field might change from 3 to 0 when a system call is invoked by a user process.
Moreover, please try to elaborate what goes on inside the kernel/CPU before CPL field is changed.
Note: I have read a few posts explaining how protection is enforced by the CPU using CPL, RPL and DPL. I am unable to understand when and how does the CPL change.