[PATCH] qemu_capabilities: replace code with function call