Someone Wrote on stack-overflow What is a privileged instruction? :
... a privileged instruction is a processorop-code (assembler instruction) which can only be executed in"supervisor" (or Ring-0) mode. These types of instructions tend to beused to access I/O devices and protected data structures from thewindows kernel.
And quoting from my book:
I/O Instructions can run when CPL <= IOPL
Privileged Instructions can run when CPL == 0
Isn't every I/O Instruction a Privileged Instruction since we need to acess memory which needs privilege as only OS can do it , please give an example for such one.
Isn't every Privileged Instruction an I/O Instruction? Can someone give an example where this isn't the case?
Note: I'm referring to linux where CPL can hold only 2 values 0 (privileged) and 3 (non privileged).