virt: Add a func to enable/disable cpu

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
@liyangfnst maybe it is better just return a special value here? Raise error in basic functions will make problems for negative testing. So better just let basic functions return what they get to other scripts.