]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: process: Move cpu flag querying after code probing cpus
authorPeter Krempa <pkrempa@redhat.com>
Mon, 7 Feb 2022 09:54:43 +0000 (10:54 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 7 Feb 2022 17:04:52 +0000 (18:04 +0100)
Upcoming changes will require that we have a proper QOM path for cpus
when querying the flags as qemu is going to change it.

By moving the flag probing code later we'll already probe the QOM paths
so no re-query will be needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_process.c

index 10e76583cf43e36aaccf3ad31163da4d3688fc8d..f99b14b846e098cbeb2e5816975ab86268beb9bb 100644 (file)
@@ -7573,10 +7573,6 @@ qemuProcessLaunch(virConnectPtr conn,
     if (qemuConnectAgent(driver, vm) < 0)
         goto cleanup;
 
-    VIR_DEBUG("Verifying and updating provided guest CPU");
-    if (qemuProcessUpdateAndVerifyCPU(driver, vm, asyncJob) < 0)
-        goto cleanup;
-
     VIR_DEBUG("setting up hotpluggable cpus");
     if (qemuDomainHasHotpluggableStartupVcpus(vm->def)) {
         if (qemuDomainRefreshVcpuInfo(driver, vm, asyncJob, false) < 0)
@@ -7598,6 +7594,10 @@ qemuProcessLaunch(virConnectPtr conn,
 
     qemuDomainVcpuPersistOrder(vm->def);
 
+    VIR_DEBUG("Verifying and updating provided guest CPU");
+    if (qemuProcessUpdateAndVerifyCPU(driver, vm, asyncJob) < 0)
+        goto cleanup;
+
     VIR_DEBUG("Detecting IOThread PIDs");
     if (qemuProcessDetectIOThreadPIDs(driver, vm, asyncJob) < 0)
         goto cleanup;