If a user tries to use opcontrol with option --active-domains in dom0
and then run opcontrol in a guest, no samples are generated. When the
guest calls the xenoprof interface it resets the internal Xenoprof
state machine and profiling does not start
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
{
case XENOPROF_init:
ret = xenoprof_op_init(arg);
- if ( !ret )
+ if ( (ret == 0) &&
+ (current->domain == xenoprof_primary_profiler) )
xenoprof_state = XENOPROF_INITIALIZED;
break;