[libvirt] [PATCH 5/7] qemu: Move common checks outside qemuBuildShmemDevLegacyStr