提交 64bc75f7 编写于 作者: P Peter Krempa

qemu: domain: Don't infer vcpu state

Use the state information (online, hotpluggable) provided by the monitor
code rather than trying to infer it. This fixes an issue where on
architectures that require hotplug of multiple threads at once the
sub-cores would get updated as offline on daemon restart thus creating
an invalid configuration.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1375783
上级 2a0e68be
...@@ -5941,15 +5941,11 @@ qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver, ...@@ -5941,15 +5941,11 @@ qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
vcpupriv->enable_id = info[i].id; vcpupriv->enable_id = info[i].id;
if (hotplug && state) { if (hotplug && state) {
vcpu->online = !!info[i].qom_path; vcpu->online = info[i].online;
if (info[i].hotpluggable)
/* mark cpus that don't have an alias as non-hotpluggable */ vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES;
if (vcpu->online) { else
if (vcpupriv->alias) vcpu->hotpluggable = VIR_TRISTATE_BOOL_NO;
vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES;
else
vcpu->hotpluggable = VIR_TRISTATE_BOOL_NO;
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册