trace: Properly initialize dynamic event states in hot-plugged vCPUs

Every time a vCPU is hot-plugged, it will "inherit" its tracing state
from the global state array. That is, if *any* existing vCPU has an
event enabled, new vCPUs will have too.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Message-id: 147428970768.15111.7664565956870423529.stgit@fimbulvetr.bsc.es
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Lluís Vilanova 2016-09-19 14:55:07 +02:00 committed by Stefan Hajnoczi
parent 331f5eb28a
commit 2bfe11c8fa
8 changed files with 54 additions and 33 deletions

View file

@ -333,6 +333,9 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp)
cpu_synchronize_post_init(cpu);
cpu_resume(cpu);
}
/* NOTE: latest generic point where the cpu is fully realized */
trace_init_vcpu(cpu);
}
static void cpu_common_initfn(Object *obj)