Instruction page fault. How?

void kernel_main(){

//executes in supervisor mode

kprint("[+] Entered kernel_main in supervisor mode\n");

vmap(hades.vtable, (u64)testProcess, (u64)testProcess, ENTRY_READ | ENTRY_EXECUTE);

asm volatile (

"csrw sepc, %0\n"

"sfence.vma\n"

"sret\n"

::

"r"(testProcess)

);

};

This throws me an instruction page fault at the location of testProcess. Why? How do i jump to testProcess by directly changing the program counter

NOTE: testPrecess is defined in the kernel(I am still testing starting a process). But as you can see, I have mapped it's memory. I am also starting this process in supervisor mode and not user mode.

Github repo: https://github.com/0VISH/Hades