From nobody Mon Feb 9 06:33:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1652714045; cv=none; d=zohomail.com; s=zohoarc; b=VXd6vMXzv3BYfjSk3aROAgZ1MqpXKR3a8DruW89GpGnCLgpmPVUln9YqF8H1iVWab1699XcSGdRdUXe8q3rxGhaLmwbFmDjF6VIgqWReew8WAbPm2fqlmZXA1SdKL3wuCJEfG/v4cSjixWWwq/L02eMZaAHdME5S1BoYEew/ucg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652714045; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4v+k43UtrxexoDNoTbUjgA46ry+v4oLj0VC5HdrPzVE=; b=gyTCHj1ELUuWasHwxaRBmfN4+3q9f3x04k4a5OhN1DhI6bmcHPENxRxbdgN4n3O3S9iCu2pj8VnsjDtd+tMgVYh7A1VJh8WqZWniqWJDA+mIubi5jugZIe8mImc8EmQ2sTsBy4Eds9eSMQHNKoIYm1seR3IXrocNkIbNbadLXd8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652714045437825.384430217681; Mon, 16 May 2022 08:14:05 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-534-Ly3ibavxPcqoSIIK7wkxoA-1; Mon, 16 May 2022 11:13:04 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 37CEA185A7BA; Mon, 16 May 2022 15:12:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 212324010E22; Mon, 16 May 2022 15:12:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E51081947055; Mon, 16 May 2022 15:12:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EEBDA194706E for ; Mon, 16 May 2022 15:12:53 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D20BA492C14; Mon, 16 May 2022 15:12:53 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 306EB401E74 for ; Mon, 16 May 2022 15:12:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652714044; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=4v+k43UtrxexoDNoTbUjgA46ry+v4oLj0VC5HdrPzVE=; b=hl65ioTxmimWNa4KwlrRnbI9ySbA+nbOyA0j0dsy47kFJQB20sLbkhNpx21JbYps0C3izd ytTJFvDLYC/DxM8DtnACbRkfrg3UP/D6XBwh8LmO2wCJyCmxL4xZM+Mk4exwrxqnWMwdI6 IA7u3mu8wHzyTrKWXA64E9dTNJMkP6c= X-MC-Unique: Ly3ibavxPcqoSIIK7wkxoA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/11] qemuBuildCommandLine: Don't avoid '-S' flag for 'domxml-to-native' conversion Date: Mon, 16 May 2022 17:12:40 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652714047135100003 Content-Type: text/plain; charset="utf-8" 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 --- src/qemu/qemu_command.c | 3 +-- src/qemu/qemu_command.h | 4 ---- src/qemu/qemu_driver.c | 3 +-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8705f0018c..25b8dcb10a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10436,8 +10436,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; diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 72b0401c7b..087ab52ee5 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -43,10 +43,6 @@ VIR_ENUM_DECL(qemuVideo); VIR_ENUM_DECL(qemuSoundCodec); -typedef enum { - QEMU_BUILD_COMMAND_LINE_CPUS_RUNNING =3D 1 << 0, -} qemuBuildCommandLineFlags; - virCommand *qemuBuildCommandLine(virDomainObj *vm, const char *migrateURI, virDomainMomentObj *snapshot, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2ca264d9f9..5f4990b09c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6339,7 +6339,6 @@ static char *qemuConnectDomainXMLToNative(virConnectP= tr conn, virQEMUDriver *driver =3D conn->privateData; g_autoptr(virDomainObj) vm =3D NULL; g_autoptr(virCommand) cmd =3D NULL; - unsigned int commandlineflags =3D QEMU_BUILD_COMMAND_LINE_CPUS_RUNNING; size_t i; virCheckFlags(0, NULL); @@ -6391,7 +6390,7 @@ static char *qemuConnectDomainXMLToNative(virConnectP= tr conn, if (qemuConnectDomainXMLToNativePrepareHost(vm) < 0) return NULL; - if (!(cmd =3D qemuProcessCreatePretendCmdBuild(vm, NULL, commandlinefl= ags))) + if (!(cmd =3D qemuProcessCreatePretendCmdBuild(vm, NULL, 0))) return NULL; return virCommandToString(cmd, false); --=20 2.35.3