[libvirt] [PATCH 2/5] qemu_process: graphics: extract port allocation into function