From nobody Sun Feb 8 18:18:34 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=1667896222; cv=none; d=zohomail.com; s=zohoarc; b=OyM4jWNVq0DDOF79vDqGn5uItt+hdCIeTYYb5AN9V/4KZc/Xa/RqX/K7R/kC5iA/7dJmlCiZMHcn3g2tF1wvXU0X5Y1PPIoL0UxaXS8PfmMu5XbCRfShHb1k0mT8mRuDAsx4nRdzYw9NXatP5I7bxj1bopswq3SBUAgTGfif2/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667896222; 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=dBf2jDgYl/mirf5gUzXVGQgOurV28MDNzxdizsoUUoA=; b=jOLEenLItNGFFwv+TL9G6aL8WRAiYfsedtazVzJB0kayA7pxfQ4F8ZW4sxBXRzrdiqk1fuSjyMKZR3xVMFkBJtylvvdyWxxVsjAMEIYhxujlSmJudSZdrw0U/hKMX0v9P2PwnF5x4DltVnqBCsWHNzTfnB+W59g1jkrAl49PRtc= 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 1667896222177552.0698122575799; Tue, 8 Nov 2022 00:30:22 -0800 (PST) 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-39-tQb8RF2dMKqTTFrVqzPKqg-1; Tue, 08 Nov 2022 03:30:17 -0500 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 CC55F101E156; Tue, 8 Nov 2022 08:30:08 +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 B88BB40C94EF; Tue, 8 Nov 2022 08:30:08 +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 852411946597; Tue, 8 Nov 2022 08:30:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 587821946597 for ; Tue, 8 Nov 2022 08:30:03 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 36F874C816; Tue, 8 Nov 2022 08:30:03 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF1E110197 for ; Tue, 8 Nov 2022 08:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667896220; 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=dBf2jDgYl/mirf5gUzXVGQgOurV28MDNzxdizsoUUoA=; b=FjqrLfMckz1RFVEW74qqejtUChjPjAWhG/77G3gLJnD5do1Fx7VatKsVrfAnJ5Qh0tQzXF Wdj9e8o3A2KMfYVMLNo4z53anTd2mf2bn6GsTMShBuT5Ohc6dpZJA+vbzSI8p/nIFawB2n zHUssdabRiaq3GqQUM8MXgyYN0SAFyk= X-MC-Unique: tQb8RF2dMKqTTFrVqzPKqg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 17/48] qemu: Assume QEMU_CAPS_QUERY_CURRENT_MACHINE Date: Tue, 8 Nov 2022 09:29:19 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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 3.1 on 10.11.54.2 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: 1667896222974100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Introduced in QEMU's commit of v4.0.0-rc0~202^2~3 the query-current-machine command is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bcdd55b089..d793c0f52d 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16307,12 +16307,8 @@ static int qemuDomainQueryWakeupSuspendSupport(virDomainObj *vm, bool *wakeupSupported) { - qemuDomainObjPrivate *priv =3D vm->privateData; int ret =3D -1; =20 - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_QUERY_CURRENT_MACHINE)) - return -1; - if (virDomainObjBeginJob(vm, VIR_JOB_QUERY) < 0) return -1; =20 @@ -16389,13 +16385,6 @@ qemuDomainPMSuspendForDuration(virDomainPtr dom, if (!qemuDomainAgentAvailable(vm, true)) goto cleanup; =20 - /* - * The case we want to handle here is when QEMU has the API (i.e. - * QEMU_CAPS_QUERY_CURRENT_MACHINE is set). Otherwise, do not interfere - * with the suspend process. This means that existing running domains, - * that don't know about this cap, will keep their old behavior of - * suspending 'in the dark'. - */ if (qemuDomainQueryWakeupSuspendSupport(vm, &wakeupSupported) =3D=3D 0= ) { if (!wakeupSupported) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", --=20 2.37.4