Since the kernel is the portion of the system that is
responsible for the implementation of virtual-memory paging, there must always be an "always resident" portion of the kernel which can never experience page-faults itself.
If the microprocessor, in handling a page-fault interrupt, determines that the page-fault handler itself is not resident in memory, the processor itself will halt ... quicker than a tennis match ... with a so-called "double fault."
This does
not mean that code within the kernel cannot
experience a page-fault. In fact, that's one of the reasons for the "kernel thread" architecture, which also allows kernel-code to start I/O operations and to wait for those operations to be completed. But
all of the code that is directly or indirectly responsible for handling CPU and/or hardware interrupts must at all times be permanently resident.
The kernel accomplishes this by setting up segment and page-table entries which map these areas of memory as what we old IBMers would call
"virtual = real." And these pages are locked so that no part of the virtual-memory system will ever, ever consider them eligible for swap ... "no way, no how, no matter how drunk you are."
Now, the processor can be put into virtual-memory mode by the so-called "trampoline," and it can (and does...) stay that way forever.