From nobody Sat Feb 7 15:09:53 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=1670412067; cv=none; d=zohomail.com; s=zohoarc; b=egaC3YspFCfcHvhipWtMr9ZKPSsnKUY7zbFBnqnPd3WsyHSM8Alt2qDClV0baKSev9SgGrZundM0ks13oq2kS1H/0auhiH50nQ1iBK7jmJr1IELd1cTnSNQ+XLths7NC9XddcOTZtdH5t6PRbCQpli81XqlIq9+LFOeq8Sd8AT8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670412067; 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=EJwlh3JgVRwJrp4IadX53mS/pgQ3P/7aEQYkwbHIOBA=; b=oEaQNDUt51fZf+QY7wRthDBdX7PK5PjAYcZfSzT4pjSI++w9Wuq+MBicytEfIVjcA5xW7mk4E+DIp0Xs/nccbdM3WDyCCM+xjkDM23GMXul4Ar3ud5yrM8tYk6TSvFdZGp/dl18hOEjG3d9EIiD/KZZSKRhPtRe07MlfKyyWBeM= 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 1670412067225125.45774596695355; Wed, 7 Dec 2022 03:21:07 -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-594-0qDX-S-9P8KfL4beEN2J7g-1; Wed, 07 Dec 2022 06:21:01 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D9DEF857FAB; Wed, 7 Dec 2022 11:20:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C557D492B04; Wed, 7 Dec 2022 11:20:57 +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 3D80819465B2; Wed, 7 Dec 2022 11:20:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8060219465B2 for ; Wed, 7 Dec 2022 11:20:55 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7203A475060; Wed, 7 Dec 2022 11:20:55 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 167FA47505E for ; Wed, 7 Dec 2022 11:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670412066; 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=EJwlh3JgVRwJrp4IadX53mS/pgQ3P/7aEQYkwbHIOBA=; b=EvJdiAyOPBVXQ9z79ZyNVS5n5bd9ZUklQvraFjzZgwYuMwx8z3wGSn6huN84T18KcJbxuI wXZiTRx5xTFw5QNpy168SDU/8z3dAMMJG9C93FT0nZVx0l0o/kNuK9+/bsoflgKQRLY2bd QIhhYvRNb/yR8rZiV6fdpy5F6GQVLEo= X-MC-Unique: 0qDX-S-9P8KfL4beEN2J7g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/5] qemu_caps: Introduce QEMU_CAPS_SCREENSHOT_FORMAT_PNG Date: Wed, 7 Dec 2022 12:20:49 +0100 Message-Id: <7d46561084a532bf84e6499fb837558a026734b4.1670411966.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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.10 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: 1670412067502100001 Content-Type: text/plain; charset="utf-8"; x-default="true" In its v7.1.0-rc0~125^2~6 commit, QEMU gained support for taking screenshots in PNG format. Track this capability. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 + 5 files changed, 6 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 965af45cb2..2553b5b3ad 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -679,6 +679,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "query-stats-schemas", /* QEMU_CAPS_QUERY_STATS_SCHEMAS */ "sgx-epc", /* QEMU_CAPS_SGX_EPC */ "thread-context", /* QEMU_CAPS_THREAD_CONTEXT */ + "screenshot-format-png", /* QEMU_CAPS_SCREENSHOT_FORMAT_PNG = */ ); =20 =20 @@ -1562,6 +1563,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSc= hemaQueries[] =3D { { "query-display-options/ret-type/+dbus", QEMU_CAPS_DISPLAY_DBUS }, { "object-add/arg-type/+iothread/thread-pool-max", QEMU_CAPS_IOTHREAD_= THREAD_POOL_MAX }, { "query-migrate/ret-type/blocked-reasons", QEMU_CAPS_MIGRATION_BLOCKE= D_REASONS }, + { "screendump/arg-type/format/^png", QEMU_CAPS_SCREENSHOT_FORMAT_PNG }, }; =20 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index b70c02c05b..cc8b3759ea 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -658,6 +658,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_QUERY_STATS_SCHEMAS, /* accepts query-stats-schemas */ QEMU_CAPS_SGX_EPC, /* -object sgx-epc,... */ QEMU_CAPS_THREAD_CONTEXT, /* -object thread-context */ + QEMU_CAPS_SCREENSHOT_FORMAT_PNG, /* screendump command supports png fo= rmat */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_7.1.0.ppc64.xml index 2cd47a7770..1f43612703 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml @@ -166,6 +166,7 @@ + 7001000 0 42900244 diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.1.0.x86_64.xml index e9210dfd44..8a2ed2236a 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -198,6 +198,7 @@ + 7001000 0 43100244 diff --git a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.2.0.x86_64.xml index 0fa042a339..6bc739065f 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml @@ -200,6 +200,7 @@ + 7001091 0 43100245 --=20 2.37.4 From nobody Sat Feb 7 15:09:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1670412127; cv=none; d=zohomail.com; s=zohoarc; b=JPFXZUdPeR6fXdtusz6GuazTZmdV5SnR161OTKlJhTMOBoc2B5igMlZ86o/3I//rXM271uhorXkYHnOEznh4bWdGHcb/YzGS/KEb4fd0/ry6hVTAkVjA8ij6CPUhwK1aJ2ZAaikObBa+WdltUH/9aew7hy+dnEiPUQH+Jk52MtA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670412127; 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=VNb5AOhktaKDMEiNY/79hVKVlAyv0dQ21uPVPkaRJP8=; b=G/KyvMktlPabBZnrQNAV9+0J8sSDPM9vrCC0qWTSQhhZCErto1zKY/kQ2daLsBV2fs9jviy66bMlIuWWVdC8Lq8ZhUkozKdyM4Gdegm6mhFkdgv43WOHkNl3qLIKkijVUDCens63pNFudRPqCLMWTwpt6pPljWlZ5/CPbWMUwnI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 167041212721027.45594332733242; Wed, 7 Dec 2022 03:22:07 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-586-FHoMlg0aNkyd7CHKVOp6Mg-1; Wed, 07 Dec 2022 06:21:02 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3A4613804081; Wed, 7 Dec 2022 11:20:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2473340C2065; Wed, 7 Dec 2022 11:20: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 80BE21946A69; Wed, 7 Dec 2022 11:20:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2F77B1946A52 for ; Wed, 7 Dec 2022 11:20:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1160847505F; Wed, 7 Dec 2022 11:20:56 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA51A47505E for ; Wed, 7 Dec 2022 11:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670412125; 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=VNb5AOhktaKDMEiNY/79hVKVlAyv0dQ21uPVPkaRJP8=; b=Fl3ZxjXYuqr5gzEHhsqsDmZwfUd2OsunxL5sXMnJX+GkrdKrEcjfN1XOOG+vvSbZuHWpQR g7YwhiQoJmZOkLDO4scHsbRTqxVjsySrAQLOl4R5e5L/JeUyfrnkAlMM8al94GmuSuxF/u ZF3jvq3tbkjTomLrI6yT81soGD+MdRs= X-MC-Unique: FHoMlg0aNkyd7CHKVOp6Mg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/5] qemu_monitor: Debug print all arguments in qemuMonitorScreendump() Date: Wed, 7 Dec 2022 12:20:50 +0100 Message-Id: <6a111f5005dca8f19f3b0fad274fa3103fd0ac39.1670411966.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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.1 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: 1670412127929100001 Content-Type: text/plain; charset="utf-8"; x-default="true" For some reason, only @file argument is printed into debug logs. The rest of arguments was left out. Include all arguments. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/qemu/qemu_monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 80f262cec7..e697ef2518 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2855,7 +2855,8 @@ qemuMonitorScreendump(qemuMonitor *mon, unsigned int head, const char *file) { - VIR_DEBUG("file=3D%s", file); + VIR_DEBUG("device=3D%s head=3D%u file=3D%s", + device, head, file); =20 QEMU_CHECK_MONITOR(mon); =20 --=20 2.37.4 From nobody Sat Feb 7 15:09:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1670412065; cv=none; d=zohomail.com; s=zohoarc; b=JqOnN+QoiAj+bdm8JOUNPhcVmHNvid3l9D8gm6UVsUIt0+T5h/XQaPsBCFxgiTfA45Sv4p1I8sICYYzv8eIFzifV4njo4AkUKoGlw28knJxjQb84xQPFi5VYHvdToS0FHakWuLmp3OKRWKbdaVpQq3UltUADarj9peq6yBGOw5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670412065; 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=QOTucSY4hU+fGbMXsT8+Zewy53/e5QEBB0DC+LReLJQ=; b=JwrdgCLNDaJT7xY9rGpXGOPJ1vw5AZQY5t4idf2B6Jl2g0G1IoVeWK3kZOVfIUhoYoJLTWarZPTOLT965Szdfzeelbs99PRAdY7quD78IZqL1nsrjmZ676x4NC8zTv44K4ur84TBHxIy7oO9+inYVtEq6Ao1u1ozAm0j2QapnAY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1670412065945189.8157619579274; Wed, 7 Dec 2022 03:21:05 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-110-uX8hIHhLMGemUPa91dV2IQ-1; Wed, 07 Dec 2022 06:21:03 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B56351C0757F; Wed, 7 Dec 2022 11:20:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 998A6492B04; Wed, 7 Dec 2022 11:20: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 BA08319465B9; Wed, 7 Dec 2022 11:20:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BDCA419465B1 for ; Wed, 7 Dec 2022 11:20:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A462B47505E; Wed, 7 Dec 2022 11:20:56 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 49D5447505F for ; Wed, 7 Dec 2022 11:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670412065; 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=QOTucSY4hU+fGbMXsT8+Zewy53/e5QEBB0DC+LReLJQ=; b=PqtK3J9rGQR2n/xRYbtB3Y5+HmQrL1xMiviD7yEkMvqmW6oCl4Mpwowx0YWkn7uqLfFTso GBOnUVXEcIVAVikBRz6NzjYxh/lEhnXpcg2tm/Ldi9J7lygBYK6xG+WDwNlKiUqsSDTMKV x3YeinO5JzGV1nJUSJXLcsUzdOKd4Ek= X-MC-Unique: uX8hIHhLMGemUPa91dV2IQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/5] qemu_monitor: Extend qemuMonitorScreendump() for @format Date: Wed, 7 Dec 2022 12:20:51 +0100 Message-Id: <3bf4477273a2eac4ef854486c471013ef0d61f06.1670411966.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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.10 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: 1670412067504100002 Content-Type: text/plain; charset="utf-8"; x-default="true" The 'screendump' command has new argument 'format'. Let's expose this on our QMP level so that callers can specify the format, if they wish so. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_monitor.c | 7 ++++--- src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 2 ++ src/qemu/qemu_monitor_json.h | 1 + tests/qemumonitorjsontest.c | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 25a1f6e0fd..f6683cbb0a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3350,7 +3350,7 @@ qemuDomainScreenshot(virDomainPtr dom, qemuSecurityDomainSetPathLabel(driver, vm, tmp, false); =20 qemuDomainObjEnterMonitor(vm); - if (qemuMonitorScreendump(priv->mon, videoAlias, screen, tmp) < 0) { + if (qemuMonitorScreendump(priv->mon, videoAlias, screen, NULL, tmp) < = 0) { qemuDomainObjExitMonitor(vm); goto endjob; } diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index e697ef2518..734364e070 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2853,14 +2853,15 @@ int qemuMonitorScreendump(qemuMonitor *mon, const char *device, unsigned int head, + const char *format, const char *file) { - VIR_DEBUG("device=3D%s head=3D%u file=3D%s", - device, head, file); + VIR_DEBUG("device=3D%s head=3D%u format=3D%s file=3D%s", + device, head, NULLSTR(format), file); =20 QEMU_CHECK_MONITOR(mon); =20 - return qemuMonitorJSONScreendump(mon, device, head, file); + return qemuMonitorJSONScreendump(mon, device, head, format, file); } =20 =20 diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index c690fc3655..906a919f52 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -987,6 +987,7 @@ int qemuMonitorInjectNMI(qemuMonitor *mon); int qemuMonitorScreendump(qemuMonitor *mon, const char *device, unsigned int head, + const char *format, const char *file); =20 int qemuMonitorSendKey(qemuMonitor *mon, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 39f313c2af..9822097bd7 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4151,6 +4151,7 @@ int qemuMonitorJSONSendKey(qemuMonitor *mon, int qemuMonitorJSONScreendump(qemuMonitor *mon, const char *device, unsigned int head, + const char *format, const char *file) { g_autoptr(virJSONValue) cmd =3D NULL; @@ -4160,6 +4161,7 @@ int qemuMonitorJSONScreendump(qemuMonitor *mon, "s:filename", file, "S:device", device, "p:head", head, + "S:format", format, NULL); =20 if (!cmd) diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 93789480c5..484cb09830 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -337,6 +337,7 @@ int qemuMonitorJSONScreendump(qemuMonitor *mon, const char *device, unsigned int head, + const char *format, const char *file); =20 int diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 238c6c1813..59f7322711 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1212,7 +1212,7 @@ GEN_TEST_FUNC(qemuMonitorJSONDelDevice, "ide0") GEN_TEST_FUNC(qemuMonitorJSONBlockdevMirror, "jobname", true, "vdb", "targ= etnode", 1024, 1234, 31234, true, true) GEN_TEST_FUNC(qemuMonitorJSONBlockStream, "vdb", "jobname", "backingnode",= "backingfilename", 1024) GEN_TEST_FUNC(qemuMonitorJSONBlockCommit, "vdb", "jobname", "topnode", "ba= senode", "backingfilename", 1024) -GEN_TEST_FUNC(qemuMonitorJSONScreendump, "devicename", 1, "/foo/bar") +GEN_TEST_FUNC(qemuMonitorJSONScreendump, "devicename", 1, NULL, "/foo/bar") GEN_TEST_FUNC(qemuMonitorJSONOpenGraphics, "spice", "spicefd", false) GEN_TEST_FUNC(qemuMonitorJSONNBDServerAdd, "vda", "export", true, "bitmap") GEN_TEST_FUNC(qemuMonitorJSONDetachCharDev, "serial1") --=20 2.37.4 From nobody Sat Feb 7 15:09:53 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=1670412070; cv=none; d=zohomail.com; s=zohoarc; b=Fx0P3u6w/yqSgvpqKYcqfuNqLwKJ/oXe4K5U0E21DCat02K3mulFI4eYA51m/7x3/do3rnS+U1JgGAcY73mBOg+0zmpXQn4Y/1HU67I+S+mDR5VKpOu70CHQJGmVDpgC+zjvxMJFRfHszztFzjKEoa+iAC0A3q2viZBAiyagmkA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670412070; 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=Bcae+m2dEhs4NqPJP2xj/qgb1nEN7zxjBDBJHwZ9S18=; b=IRRCAbwfz4WV5m2EPJJaFyhQMEkjgyxVC4jlgXoPgovPeEdf1M6cDpXQaovosAnFgsm/0m/jlXFXwaNhSFrADme6v8b1J6zIhpxm0qUq2SJslBTQDOpVRhNfroWC/ZEHw1rhMVIrKTAseKa1lQcFnN9cfLU3zGBzUrRVdRjXaVA= 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 1670412070071474.71050737009807; Wed, 7 Dec 2022 03:21:10 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-649-c2bVsdCCP76_qjzeqCu2UQ-1; Wed, 07 Dec 2022 06:21:05 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3997A3C0ED40; Wed, 7 Dec 2022 11:21:01 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 241CD9E70; Wed, 7 Dec 2022 11:21:01 +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 08DDF19465B2; Wed, 7 Dec 2022 11:21:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5EE461946A66 for ; Wed, 7 Dec 2022 11:20:57 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4452547505F; Wed, 7 Dec 2022 11:20:57 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD66C47505E for ; Wed, 7 Dec 2022 11:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670412069; 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=Bcae+m2dEhs4NqPJP2xj/qgb1nEN7zxjBDBJHwZ9S18=; b=UiG51A1gfytEzNPiNI8ttbARcVVqAaswDileEwTONAU57zRblQGw+nsREI+JvUGOKy/Usf t9X6oixiHDz65Nas9wwub9AnLaDfYLLn6C0MF0H58DjXgn6xLsHTbzuKGUjBBK7BIZYOlt ljIJS681upflM40alRIwrLDCe1Ax0aU= X-MC-Unique: c2bVsdCCP76_qjzeqCu2UQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 4/5] qemu: Prefer PNG for domain screenshots Date: Wed, 7 Dec 2022 12:20:52 +0100 Message-Id: <8aa68499b0257481bf9a65eca0ed7961effd227b.1670411966.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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.5 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: 1670412071548100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Historically, QEMU took screenshots in PPM. While this might use to be popular format, as of v7.1.0-rc0~125^2~6 it is possible to take screenshots in PNG. This is more popular and renders almost everywhere, which is not the case for PPM (for instance, modern browsers do not render it). Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/qemu/qemu_driver.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f6683cbb0a..d509582719 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3291,6 +3291,7 @@ qemuDomainScreenshot(virDomainPtr dom, const char *videoAlias =3D NULL; char *ret =3D NULL; bool unlink_tmp =3D false; + const char *format =3D NULL; =20 virCheckFlags(0, NULL); =20 @@ -3339,6 +3340,10 @@ qemuDomainScreenshot(virDomainPtr dom, } } =20 + if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SCREENSHOT_FORMAT_PNG)) { + format =3D "png"; + } + tmp =3D g_strdup_printf("%s/qemu.screendump.XXXXXX", priv->libDir); =20 if ((tmp_fd =3D g_mkstemp_full(tmp, O_RDWR | O_CLOEXEC, S_IRUSR | S_IW= USR)) =3D=3D -1) { @@ -3350,7 +3355,7 @@ qemuDomainScreenshot(virDomainPtr dom, qemuSecurityDomainSetPathLabel(driver, vm, tmp, false); =20 qemuDomainObjEnterMonitor(vm); - if (qemuMonitorScreendump(priv->mon, videoAlias, screen, NULL, tmp) < = 0) { + if (qemuMonitorScreendump(priv->mon, videoAlias, screen, format, tmp) = < 0) { qemuDomainObjExitMonitor(vm); goto endjob; } @@ -3367,7 +3372,11 @@ qemuDomainScreenshot(virDomainPtr dom, goto endjob; } =20 - ret =3D g_strdup("image/x-portable-pixmap"); + if (STREQ_NULLABLE(format, "png")) { + ret =3D g_strdup("image/png"); + } else { + ret =3D g_strdup("image/x-portable-pixmap"); + } =20 endjob: VIR_FORCE_CLOSE(tmp_fd); --=20 2.37.4 From nobody Sat Feb 7 15:09:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1670412072; cv=none; d=zohomail.com; s=zohoarc; b=kpqmN8oBrKrDT36+sPXPm/eD3h1w3MMTZfnNgCXCB1abc8yqc5kGnP3ljSnbGQjRUEuUs1aS0xxnOd4xWzX3vPbaAX9ICi+N0FJyFPScaa9e12PolQMxslxulbdgBcSPJCFADhE+gsv7lokNnxgJAJQRyfldDOtWTmVccMUpETU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670412072; 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=wUxcsCjvVf8vMFmOtBcNMJbuvEbS6j9fQUkUu+z7n1E=; b=GRxNoSog9d6UDJBbg/qikfgcaBXkjX5o0QEsvtfHpmmM+s29RYTjmzwfezNuC6l9EDoG8d0r5frz610wsgaPyHEGr59ZUxsfv9+d20eY/eZkb526mfy4hRA0L0a4LLTGXD2N5l2/f9K8PVEcQ05kSjYis6rpzb0uSJ4Ogu2atok= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1670412072540192.73871267280572; Wed, 7 Dec 2022 03:21:12 -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-628-67b5nVTQMciHc7QJteyFRw-1; Wed, 07 Dec 2022 06:21:04 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DE1D2186E246; Wed, 7 Dec 2022 11:20:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA3719E70; Wed, 7 Dec 2022 11:20: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 7EEE719465B7; Wed, 7 Dec 2022 11:20:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E489D1946A7B for ; Wed, 7 Dec 2022 11:20:57 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D7CDA47505E; Wed, 7 Dec 2022 11:20:57 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D2ED47505F for ; Wed, 7 Dec 2022 11:20:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670412070; 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=wUxcsCjvVf8vMFmOtBcNMJbuvEbS6j9fQUkUu+z7n1E=; b=TeiO5/6kBzMeBLw4pU/nEiPJIMqoDKoPY5l/kZXU6i91TaRoEI5kAo4yiCua2aVmMTiIfP KlbGTxukCtkdvxOLorSEAwRf5JEbeqhurNpOoKngpsp0mT0bG10uIC+4BysieV7X0wAtLA G3ECbfARiep061dn5ckO6YTI0Y8lcsU= X-MC-Unique: 67b5nVTQMciHc7QJteyFRw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 5/5] NEWS: Document change of screenshot format for QEMU Date: Wed, 7 Dec 2022 12:20:53 +0100 Message-Id: <6887770015da9d4fcdf4264b85689dded326958e.1670411966.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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.5 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: 1670412073494100003 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- NEWS.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index ffffbc61b9..39f508a6ce 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -19,6 +19,10 @@ v9.0.0 (unreleased) =20 * **Improvements** =20 + * qemu: Prefer PNG for domain screenshots + + With sufficiently new QEMU (v7.1.0) screenshots change format from PPM= to PNG. + * **Bug fixes** =20 =20 --=20 2.37.4