qemuBuildCommandLine: Don't avoid '-S' flag for 'domxml-to-native' conversion

The commandline generated from our XML->native convertor is the majority
of cases not usable without libvirt anyways and the situation will not
improve any more.

As of such there's no much utility of avoiding the use of stopped CPUs
flag in such case.

Remove the QEMU_BUILD_COMMAND_LINE_CPUS_RUNNING flag and the associated
logic.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Peter Krempa 2022-05-16 13:51:13 +02:00
parent 2afaa6894e
commit bab089d379
3 changed files with 2 additions and 8 deletions

View File

@ -10444,8 +10444,7 @@ qemuBuildCommandLine(virDomainObj *vm,
qemuBuildCompatDeprecatedCommandLine(cmd, cfg, def, qemuCaps);
if (!(flags & QEMU_BUILD_COMMAND_LINE_CPUS_RUNNING))
virCommandAddArg(cmd, "-S"); /* freeze CPU */
virCommandAddArg(cmd, "-S"); /* freeze CPUs during startup */
if (qemuBuildMasterKeyCommandLine(cmd, priv) < 0)
return NULL;

View File

@ -43,10 +43,6 @@
VIR_ENUM_DECL(qemuVideo);
VIR_ENUM_DECL(qemuSoundCodec);
typedef enum {
QEMU_BUILD_COMMAND_LINE_CPUS_RUNNING = 1 << 0,
} qemuBuildCommandLineFlags;
virCommand *qemuBuildCommandLine(virDomainObj *vm,
const char *migrateURI,
virDomainMomentObj *snapshot,

View File

@ -6339,7 +6339,6 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
virQEMUDriver *driver = conn->privateData;
g_autoptr(virDomainObj) vm = NULL;
g_autoptr(virCommand) cmd = NULL;
unsigned int commandlineflags = QEMU_BUILD_COMMAND_LINE_CPUS_RUNNING;
size_t i;
virCheckFlags(0, NULL);
@ -6391,7 +6390,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
if (qemuConnectDomainXMLToNativePrepareHost(vm) < 0)
return NULL;
if (!(cmd = qemuProcessCreatePretendCmdBuild(vm, NULL, commandlineflags)))
if (!(cmd = qemuProcessCreatePretendCmdBuild(vm, NULL, 0)))
return NULL;
return virCommandToString(cmd, false);