From nobody Sat Feb 7 21:16:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554153540518890.755160873729; Mon, 1 Apr 2019 14:19:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ECEF43087BB3; Mon, 1 Apr 2019 21:18:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D095260610; Mon, 1 Apr 2019 21:18:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0FFA41803389; Mon, 1 Apr 2019 21:18:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x31LIhLP012345 for ; Mon, 1 Apr 2019 17:18:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4C49A1974C; Mon, 1 Apr 2019 21:18:43 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46FD019936 for ; Mon, 1 Apr 2019 21:18:41 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 120D5309707A for ; Mon, 1 Apr 2019 21:18:40 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id v20so12489982qtv.12 for ; Mon, 01 Apr 2019 14:18:40 -0700 (PDT) Received: from rekt.ibmmodules.com ([2804:431:f700:6702:8bc5:7364:e3c:ea55]) by smtp.gmail.com with ESMTPSA id l129sm5781689qkb.44.2019.04.01.14.18.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Apr 2019 14:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yRXKNOOOAEKHXzUP1GYkkz6WSJz55/dKrwgdWE8STrw=; b=H8aKkgtVRIb/AIeHThcR2KxNk3J3h2Zle+iityfOCjbjORyfLbdpvHJDhZdiyaW8CQ +F4TTskjJh8xw0uqiDGPD9aTFUoHxpbNaQQK8fs9dGoUE8I21xT4nOq4ViXq4dI5RD0O /JNr5S2nUUZM5EKNc0gXb4GNskDOYxZjA9KVq3vktuQuQosWI4sRwx4Wge7Be9amDDMV PppaUeaiP0+wRhDi2yz4uRVClGl1NESZtsDLp45CSmIcDeRgaKoLtf45vp48QE9CDCtl d2cQenmPQ0f2QibAEe/VCsxNhxmQGimrGBhEsasflFxwG4vhYUIYiqUASP0vxE9hkc86 h55Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yRXKNOOOAEKHXzUP1GYkkz6WSJz55/dKrwgdWE8STrw=; b=s4MLRmps/6GBNnWRa5MhcfBGMaJ70Qbq//aSHGoCyqZ6SdtYzmBozRboW23WhG6kfZ czw+U4e0b8/53b4UggnqGeRvi22gu+YNU5K63kH+2rvdi1cGeSoZkBmdTp5Oq4nN1Hpc bFqJl6uAnS2asXRbuT63ytt5FLqkapcfF7uwH8SgXR/0xUrWPRNAph+X74gyNh/rgyUG kxjDlXgfex7BCCfrJ7Z9k2lY1TqjM+vqt7P7WexccYsqwZsI30Kk/jJI7pOJhTS36+MQ sOoTgp3s1xuzvBYa8zII0K70X6D0OYhh66o0/19kl0VKIIX+ICI4gYMfXM7pRgJEY2Oc +eAw== X-Gm-Message-State: APjAAAUs02ioy8eCMOn8wRCtCikKHBN7Vl5t3ezUATLU7scLw3lIdPBP 1Um4lEmtmcOuVCEnH6KBvtXokjr5 X-Google-Smtp-Source: APXvYqzSw9+uNqIDI3xppOxEwa/2k5Ff/TDFf5sYGdWOX2GV8mUwa9hTODq0T3IExgKybm10BTQ8sw== X-Received: by 2002:ac8:33cf:: with SMTP id d15mr56115261qtb.149.1554153518385; Mon, 01 Apr 2019 14:18:38 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 1 Apr 2019 18:18:24 -0300 Message-Id: <20190401211826.8598-2-danielhb413@gmail.com> In-Reply-To: <20190401211826.8598-1-danielhb413@gmail.com> References: <20190401211826.8598-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 01 Apr 2019 21:18:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 01 Apr 2019 21:18:40 +0000 (UTC) for IP:'209.85.160.194' DOMAIN:'mail-qt1-f194.google.com' HELO:'mail-qt1-f194.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.12 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.194 mail-qt1-f194.google.com 209.85.160.194 mail-qt1-f194.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH 1/3] adding QEMU_CAPS_QUERY_CURRENT_MACHINE and QEMU_CAPS_WAKEUP_SUSPEND_SUPPORT X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 01 Apr 2019 21:18:58 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" QEMU commit 46ea94ca9cf ("qmp: query-current-machine with wakeup-suspend-support") added a new QMP command called 'query-current-machine' that retrieves guest parameters that can vary in the same machine model (e.g. ACPI support for x86 VMs depends on the '--no-acpi' option). Currently, this API has a single flag, 'wakeup-suspend-support', that indicates whether the guest has the capability of waking up from suspended state. The original intent of this new API is to avoid situations such as [1], where an user can execute "virsh dompmsuspend" in a guest that can't wake up due to lack of support, making the guest unusable. This is currently the case for any non-x86 arch guests and for some x86 guests that starts with --no-acpi (q35 machines implements suspend support even with the --no-acpi flag). This is the Libvirt side of this API that will be available in QEMU 4.0. QEMU_CAPS_QUERY_CURRENT_MACHINE is a new virQEMUCapsCommands that will indicate if the QEMU binary supports the 'query-current-machine' API. QEMU_CAPS_WAKEUP_SUSPEND_SUPPORT is a flag that reflects the 'wakeup-suspend-support' value for the current QEMU instance. In the next patches these two caps will be populated and used in qemu_driver.c, 'qemuDomainPMSuspendForDuration', to complete the fix for [1]. [1] https://github.com/open-power-host-os/qemu/issues/31 Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 5 +++++ src/qemu/qemu_capabilities.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 56228e7a36..318198cbdd 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -523,6 +523,10 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "nvdimm.unarmed", "scsi-disk.device_id", "virtio-pci-non-transitional", + "query-current-machine", + + /* 330 */ + "wakeup-suspend-support", ); =20 =20 @@ -978,6 +982,7 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] =3D= { { "query-cpus-fast", QEMU_CAPS_QUERY_CPUS_FAST }, { "qom-list-properties", QEMU_CAPS_QOM_LIST_PROPERTIES }, { "blockdev-del", QEMU_CAPS_BLOCKDEV_DEL }, + { "query-current-machine", QEMU_CAPS_QUERY_CURRENT_MACHINE }, }; =20 struct virQEMUCapsStringFlags virQEMUCapsMigration[] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 06c7606e2f..633f2690a3 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -506,6 +506,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for= syntax-check */ QEMU_CAPS_DEVICE_NVDIMM_UNARMED, /* -device nvdimm,unarmed=3D */ QEMU_CAPS_SCSI_DISK_DEVICE_ID, /* 'device_id' property of scsi disk */ QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, /* virtio *-pci-{non-}transitional = devices */ + QEMU_CAPS_QUERY_CURRENT_MACHINE, /* query-current-machine command */ + + /* 330 */ + QEMU_CAPS_WAKEUP_SUSPEND_SUPPORT, /* query-current-machine API flag */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list