From 82e95ec847757c1a2b6accf0e8312925ada3dca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Date: Mon, 26 Dec 2016 22:24:40 +0100 Subject: trace: Fix dynamic event state on vCPU hot-unplug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to disable per-vCPU events on a vCPU that is hot-unplugged to keep the dynamic event state global counters consistent. Signed-off-by: LluĂ­s Vilanova Message-id: 148278748055.1404.1570530281528619895.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi --- qom/cpu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qom/cpu.c') diff --git a/qom/cpu.c b/qom/cpu.c index 03d9190f8c..93e41056d9 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -348,6 +348,8 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp) static void cpu_common_unrealizefn(DeviceState *dev, Error **errp) { CPUState *cpu = CPU(dev); + /* NOTE: latest generic point before the cpu is fully unrealized */ + trace_fini_vcpu(cpu); cpu_exec_unrealizefn(cpu); } -- cgit v1.2.1