Calling virCPUUpdateLive on a domain with no guest CPU configuration
does not make sense. Especially when doing so would crash libvirtd.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
{
int rc;
- if (!def->cpu ||
- (def->cpu->mode == VIR_CPU_MODE_CUSTOM &&
- !def->cpu->model))
- return 0;
-
rc = virCPUCheckFeature(def->os.arch, def->cpu, "invtsc");
if (rc < 0) {
qemuProcessVerifyHypervFeatures(def, cpu) < 0)
goto cleanup;
+ if (!def->cpu ||
+ (def->cpu->mode == VIR_CPU_MODE_CUSTOM &&
+ !def->cpu->model)) {
+ ret = 0;
+ goto cleanup;
+ }
+
if (qemuProcessVerifyCPUFeatures(def, cpu) < 0)
goto cleanup;