From 2bfe11c8fac96db4f94abbe818fbc964a6744130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Date: Mon, 19 Sep 2016 14:55:07 +0200 Subject: trace: Properly initialize dynamic event states in hot-plugged vCPUs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Message-id: 147428970768.15111.7664565956870423529.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi --- qom/cpu.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qom/cpu.c') diff --git a/qom/cpu.c b/qom/cpu.c index f783b5a6bd..f87fffabd1 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -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) -- cgit v1.2.1