xen: move p2m handling to separate file