[libvirt] [PATCH] qemu: Simplify the codes