vmm: refactor userspace's emsr_fakewrite()