[PATCH v1 03/34] qemu: Separate out namespace handling code