Kernel adaptation for x86 and x86-64