[PATCH 3/5] qemu: Make IOThread changing more robust