[libvirt] [PATCH 2/5] qemu: Move memory size detection to the top of the function