[PATCH 03/13] hypervisor: domain: Extract code for checking iothread usage