How does the user to kernel mode switch occur before the Interrupt Gate descriptor is accessed?
<p>I am currently reading &quot;Understanding the Linux Kernel&quot;. I am studying the Interrupts and Exceptions chapter.</p>
<p>I found that when setting up IDT we can use five kinds of gate descriptors in Linux terminology</p>
<ol>
<li>Task Gate (DPL: 0)</li>
<li>Interrupt gate (DPL: 0)</li>
<li>Trap gate (DPL: 0)</li>
<li>System Interrupt gate (DPL: 3)</li>
<li>System gate (DPL: 3)</li>
</ol>
<p>Now i realize that the ones with DPL 3 can be accessed from the user mode.
But what about the ones with DPL 0 ? Particularly, interrupt gate.</p>
<p>If an I/O APIC interrupt occurs in User mode, it wouldn't be able to access the Interrupt gate.</p>
<p>So my question is, How does the user mode the kernel mode switch occur before the Interrupt gate is accessed?</p>