From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613057899; cv=none; d=zohomail.com; s=zohoarc; b=I6HqLh+dV//PnPTHcT/+TDbzcMfHxAlNX3yBczmwaYSzmCo35DNvGnWgIjJYDt+N2cVRj3L6Gjw5x0Lq7Nc1FEmUGVvBwHEXFjphre0TIGX0VxBK4wXDPGVvTkvDww13iX4fLVr8c/Plokrw6pFn+7l98a1TGkrONfaMopZQ8s4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057899; 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=G1/gdRZGDLj5/dBGCkPHM6xZMxYES1d7rwKlpPb4biI=; b=OtwnsxMpn+UxOfAxF+vJhCtkJa7LDKDOU0B5wfrYhIC904YFfNzjHqr/jCe6KHIZHqj/8VBG24do1AgnuuIYMiH739Howxui4zWozgEaIzJ+Ei8dCOWO1cZ8J5UN+M4eplPt2hWXNo3Rtqkaz6Vq6DonwUC7Ki28urfJ1m9eofM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1613057898787209.37717342897668; Thu, 11 Feb 2021 07:38:18 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-254-wBd-ke8hOvO5P5EuMlkGNA-1; Thu, 11 Feb 2021 10:38:15 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E13080196E; Thu, 11 Feb 2021 15:38:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B8BCC1002382; Thu, 11 Feb 2021 15:38:08 +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 7D4A04EE4D; Thu, 11 Feb 2021 15:38:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFc5ct019084 for ; Thu, 11 Feb 2021 10:38:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9242A5D74F; Thu, 11 Feb 2021 15:38:05 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C5156268D for ; Thu, 11 Feb 2021 15:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057897; 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=G1/gdRZGDLj5/dBGCkPHM6xZMxYES1d7rwKlpPb4biI=; b=YGsJP913Rbz0sT8oKLTPLdW8gz4wH2m6TBW3dU9XIvaIp/+mGO3sx5DaLsbkD6QPM/WkkB vyN76i4uCbEOOwnAIWps4XYh6qxqt+b8AB725vyAY/VfFmWO5Advw5QsV9DvuWzgbA4T8Z b0p2mE+oQVjTeNhcGCX5occF5lOR0co= X-MC-Unique: wBd-ke8hOvO5P5EuMlkGNA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 01/19] qemucapabilitiesdata: Update test data for qemu-6.0 on x86_64 Date: Thu, 11 Feb 2021 16:37:40 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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) Content-Type: text/plain; charset="utf-8" Include the 'transform' member of 'block-bitmap-mapping'. Note that this is based on uncommited patches and will be updated once they are merged. --- .../caps_6.0.0.x86_64.replies | 510 ++++++++++-------- .../caps_6.0.0.x86_64.xml | 16 +- 2 files changed, 306 insertions(+), 220 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies b/tests/q= emucapabilitiesdata/caps_6.0.0.x86_64.replies index a1e3850b59..1af61272af 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies @@ -21,7 +21,7 @@ "minor": 2, "major": 5 }, - "package": "v5.2.0-1810-g2436651b26" + "package": "v5.2.0-1934-ge7bdfa1463" }, "id": "libvirt-2" } @@ -667,6 +667,10 @@ "name": "vhost-user-vsock-device", "parent": "vhost-vsock-common" }, + { + "name": "virtio-blk-pci-transitional", + "parent": "virtio-blk-pci-base" + }, { "name": "pcie-pci-bridge", "parent": "base-pci-bridge" @@ -708,8 +712,8 @@ "parent": "pci-device" }, { - "name": "sev-guest", - "parent": "confidential-guest-support" + "name": "chardev-stdio", + "parent": "chardev-fd" }, { "name": "usb-redir", @@ -732,8 +736,8 @@ "parent": "pci-vga" }, { - "name": "virtio-blk-pci-transitional", - "parent": "virtio-blk-pci-base" + "name": "kvm-pit", + "parent": "pit-common" }, { "name": "Haswell-v1-x86_64-cpu", @@ -756,8 +760,8 @@ "parent": "generic-pc-machine" }, { - "name": "kvm-pit", - "parent": "pit-common" + "name": "sev-guest", + "parent": "confidential-guest-support" }, { "name": "ich9-usb-uhci5", @@ -811,6 +815,10 @@ "name": "usb-hub", "parent": "usb-device" }, + { + "name": "chardev-serial", + "parent": "chardev-fd" + }, { "name": "virtio-blk-device", "parent": "virtio-device" @@ -852,8 +860,8 @@ "parent": "accel" }, { - "name": "chardev-serial", - "parent": "chardev-fd" + "name": "Cooperlake-x86_64-cpu", + "parent": "x86_64-cpu" }, { "name": "vhost-user-vsock-pci", @@ -891,14 +899,14 @@ "name": "memory-backend-ram", "parent": "memory-backend" }, - { - "name": "PCIE", - "parent": "PCI" - }, { "name": "e1000e", "parent": "pci-device" }, + { + "name": "PCIE", + "parent": "PCI" + }, { "name": "n270-x86_64-cpu", "parent": "x86_64-cpu" @@ -907,10 +915,6 @@ "name": "pxb-host", "parent": "pci-host-bridge" }, - { - "name": "Cooperlake-x86_64-cpu", - "parent": "x86_64-cpu" - }, { "name": "scsi-disk", "parent": "scsi-disk-base" @@ -979,14 +983,14 @@ "name": "pci-ipmi-kcs", "parent": "pci-device" }, - { - "name": "intel-iommu-iommu-memory-region", - "parent": "qemu:iommu-memory-region" - }, { "name": "xio3130-downstream", "parent": "pcie-slot" }, + { + "name": "intel-iommu-iommu-memory-region", + "parent": "qemu:iommu-memory-region" + }, { "name": "vhost-user-vsock-pci-non-transitional", "parent": "vhost-user-vsock-pci-base" @@ -995,14 +999,14 @@ "name": "pc-i440fx-2.3-machine", "parent": "generic-pc-machine" }, - { - "name": "PCI", - "parent": "bus" - }, { "name": "microvm-machine", "parent": "x86-machine" }, + { + "name": "PCI", + "parent": "bus" + }, { "name": "sdhci-bus", "parent": "sd-bus" @@ -1104,8 +1108,8 @@ "parent": "pci-device" }, { - "name": "virtio-input-host-pci", - "parent": "virtio-input-host-pci-base-type" + "name": "virtio-9p-pci-transitional", + "parent": "virtio-9p-pci-base" }, { "name": "nvdimm", @@ -1116,8 +1120,8 @@ "parent": "generic-pc-machine" }, { - "name": "virtio-9p-pci-transitional", - "parent": "virtio-9p-pci-base" + "name": "virtio-input-host-pci", + "parent": "virtio-input-host-pci-base-type" }, { "name": "Opteron_G1-x86_64-cpu", @@ -1143,6 +1147,10 @@ "name": "i82557c", "parent": "pci-device" }, + { + "name": "i82557b", + "parent": "pci-device" + }, { "name": "virtio-scsi-device", "parent": "virtio-scsi-common" @@ -1151,10 +1159,6 @@ "name": "pxb-pcie", "parent": "pci-device" }, - { - "name": "i82557b", - "parent": "pci-device" - }, { "name": "Haswell-IBRS-x86_64-cpu", "parent": "x86_64-cpu" @@ -1172,12 +1176,8 @@ "parent": "sys-bus-device" }, { - "name": "chardev-memory", - "parent": "chardev-ringbuf" - }, - { - "name": "pc-q35-2.8-machine", - "parent": "generic-pc-machine" + "name": "i82557a", + "parent": "pci-device" }, { "name": "vhost-user-scsi-pci-non-transitional", @@ -1188,12 +1188,16 @@ "parent": "isa-device" }, { - "name": "generic-sdhci", - "parent": "sys-bus-device" + "name": "chardev-udp", + "parent": "chardev" }, { - "name": "i82557a", - "parent": "pci-device" + "name": "pc-q35-2.8-machine", + "parent": "generic-pc-machine" + }, + { + "name": "generic-sdhci", + "parent": "sys-bus-device" }, { "name": "virtio-scsi-pci-non-transitional", @@ -1212,8 +1216,8 @@ "parent": "x86_64-cpu" }, { - "name": "chardev-udp", - "parent": "chardev" + "name": "chardev-memory", + "parent": "chardev-ringbuf" }, { "name": "EPYC-Rome-v1-x86_64-cpu", @@ -1263,14 +1267,14 @@ "name": "virtio-9p-pci-non-transitional", "parent": "virtio-9p-pci-base" }, - { - "name": "Nehalem-v2-x86_64-cpu", - "parent": "x86_64-cpu" - }, { "name": "memory-backend-file", "parent": "memory-backend" }, + { + "name": "Nehalem-v2-x86_64-cpu", + "parent": "x86_64-cpu" + }, { "name": "vhost-vsock-device", "parent": "vhost-vsock-common" @@ -1331,10 +1335,6 @@ "name": "tcg-accel", "parent": "accel" }, - { - "name": "piix4-ide", - "parent": "pci-ide" - }, { "name": "virtio-balloon-pci", "parent": "virtio-balloon-pci-base" @@ -1367,6 +1367,10 @@ "name": "ES1370", "parent": "pci-device" }, + { + "name": "pc-i440fx-2.6-machine", + "parent": "generic-pc-machine" + }, { "name": "i82551", "parent": "pci-device" @@ -1384,8 +1388,8 @@ "parent": "x86_64-cpu" }, { - "name": "pc-i440fx-2.6-machine", - "parent": "generic-pc-machine" + "name": "piix4-ide", + "parent": "pci-ide" }, { "name": "SandyBridge-x86_64-cpu", @@ -1427,14 +1431,14 @@ "name": "kvm-apic", "parent": "apic-common" }, - { - "name": "isa-pit", - "parent": "pit-common" - }, { "name": "kvm64-x86_64-cpu", "parent": "x86_64-cpu" }, + { + "name": "isa-pit", + "parent": "pit-common" + }, { "name": "Broadwell-v4-x86_64-cpu", "parent": "x86_64-cpu" @@ -1499,14 +1503,6 @@ "name": "core2duo-v1-x86_64-cpu", "parent": "x86_64-cpu" }, - { - "name": "vhost-user-blk-pci-non-transitional", - "parent": "vhost-user-blk-pci-base" - }, - { - "name": "virtio-rng-pci-non-transitional", - "parent": "virtio-rng-pci-base" - }, { "name": "cirrus-vga", "parent": "pci-device" @@ -1523,13 +1519,17 @@ "name": "pc-i440fx-2.1-machine", "parent": "generic-pc-machine" }, + { + "name": "virtio-serial-pci", + "parent": "virtio-serial-pci-base" + }, { "name": "i82559er", "parent": "pci-device" }, { - "name": "virtio-serial-pci", - "parent": "virtio-serial-pci-base" + "name": "virtio-rng-pci-non-transitional", + "parent": "virtio-rng-pci-base" }, { "name": "Skylake-Client-x86_64-cpu", @@ -1539,13 +1539,17 @@ "name": "Opteron_G3-x86_64-cpu", "parent": "x86_64-cpu" }, + { + "name": "container", + "parent": "object" + }, { "name": "isa-ide", "parent": "isa-device" }, { - "name": "container", - "parent": "object" + "name": "486-v1-x86_64-cpu", + "parent": "x86_64-cpu" }, { "name": "EPYC-v3-x86_64-cpu", @@ -1556,12 +1560,12 @@ "parent": "scsi-disk-base" }, { - "name": "gpex-root", - "parent": "pci-device" + "name": "vhost-user-blk-pci-non-transitional", + "parent": "vhost-user-blk-pci-base" }, { - "name": "486-v1-x86_64-cpu", - "parent": "x86_64-cpu" + "name": "gpex-root", + "parent": "pci-device" }, { "name": "vmport", @@ -1587,14 +1591,14 @@ "name": "e1000-82545em", "parent": "e1000-base" }, - { - "name": "sdhci-pci", - "parent": "pci-device" - }, { "name": "pxb-pcie-bus", "parent": "PCIE" }, + { + "name": "sdhci-pci", + "parent": "pci-device" + }, { "name": "vhost-user-scsi", "parent": "vhost-scsi-common" @@ -1768,11 +1772,11 @@ "parent": "base-sysbus-fdc" }, { - "name": "i82559c", + "name": "AMDVI-PCI", "parent": "pci-device" }, { - "name": "AMDVI-PCI", + "name": "i82559c", "parent": "pci-device" }, { @@ -1820,11 +1824,11 @@ "parent": "vhost-user-scsi-pci-base" }, { - "name": "i82559a", + "name": "kvaser_pci", "parent": "pci-device" }, { - "name": "kvaser_pci", + "name": "i82559a", "parent": "pci-device" }, { @@ -1932,16 +1936,16 @@ "parent": "virtio-iommu-device-base" }, { - "name": "chardev-braille", - "parent": "chardev" + "name": "vmcoreinfo", + "parent": "device" }, { "name": "Icelake-Client-v1-x86_64-cpu", "parent": "x86_64-cpu" }, { - "name": "vmcoreinfo", - "parent": "device" + "name": "chardev-braille", + "parent": "chardev" }, { "name": "tpci200", @@ -1963,10 +1967,6 @@ "name": "qio-channel-socket", "parent": "qio-channel" }, - { - "name": "chardev-socket", - "parent": "chardev" - }, { "name": "coreduo-v1-x86_64-cpu", "parent": "x86_64-cpu" @@ -1984,17 +1984,13 @@ "parent": "object" }, { - "name": "hyperv-testdev", - "parent": "isa-device" + "name": "chardev-socket", + "parent": "chardev" }, { "name": "clock", "parent": "object" }, - { - "name": "virtio-net-device", - "parent": "virtio-device" - }, { "name": "Haswell-v2-x86_64-cpu", "parent": "x86_64-cpu" @@ -2003,6 +1999,10 @@ "name": "host-x86_64-cpu", "parent": "max-x86_64-cpu" }, + { + "name": "secret", + "parent": "secret_common" + }, { "name": "usb-ehci", "parent": "pci-ehci-usb" @@ -2048,8 +2048,8 @@ "parent": "scsi-disk-base" }, { - "name": "secret", - "parent": "secret_common" + "name": "Cascadelake-Server-noTSX-x86_64-cpu", + "parent": "x86_64-cpu" }, { "name": "usb-kbd", @@ -2064,16 +2064,16 @@ "parent": "device" }, { - "name": "usb-mtp", - "parent": "usb-device" + "name": "virtio-net-device", + "parent": "virtio-device" }, { "name": "filter-replay", "parent": "netfilter" }, { - "name": "Cascadelake-Server-noTSX-x86_64-cpu", - "parent": "x86_64-cpu" + "name": "usb-mtp", + "parent": "usb-device" }, { "name": "input-linux", @@ -2088,8 +2088,12 @@ "parent": "x86_64-cpu" }, { - "name": "pc-q35-5.1-machine", - "parent": "generic-pc-machine" + "name": "lsi53c810", + "parent": "lsi53c895a" + }, + { + "name": "hyperv-testdev", + "parent": "isa-device" }, { "name": "s3c-sdhci", @@ -2112,8 +2116,8 @@ "parent": "ccid-card" }, { - "name": "virtconsole", - "parent": "virtserialport" + "name": "pc-q35-5.1-machine", + "parent": "generic-pc-machine" }, { "name": "pc-i440fx-1.7-machine", @@ -2124,21 +2128,21 @@ "parent": "virtio-input-hid-device" }, { - "name": "lsi53c810", - "parent": "lsi53c895a" + "name": "virtconsole", + "parent": "virtserialport" }, { "name": "ioh3420", "parent": "pcie-root-port-base" }, - { - "name": "filter-mirror", - "parent": "netfilter" - }, { "name": "Skylake-Client-v1-x86_64-cpu", "parent": "x86_64-cpu" }, + { + "name": "filter-mirror", + "parent": "netfilter" + }, { "name": "throttle-group", "parent": "object" @@ -2235,14 +2239,14 @@ "name": "pc-dimm", "parent": "device" }, - { - "name": "virtio-net-pci-transitional", - "parent": "virtio-net-pci-base" - }, { "name": "virtio-balloon-pci-non-transitional", "parent": "virtio-balloon-pci-base" }, + { + "name": "virtio-net-pci-transitional", + "parent": "virtio-net-pci-base" + }, { "name": "ipmi-bmc-sim", "parent": "ipmi-bmc" @@ -2303,14 +2307,14 @@ "name": "pxb-bus", "parent": "PCI" }, - { - "name": "virtio-mmio", - "parent": "sys-bus-device" - }, { "name": "pentium2-x86_64-cpu", "parent": "x86_64-cpu" }, + { + "name": "virtio-mmio", + "parent": "sys-bus-device" + }, { "name": "Broadwell-v1-x86_64-cpu", "parent": "x86_64-cpu" @@ -2567,14 +2571,14 @@ "name": "cfi.pflash01", "parent": "sys-bus-device" }, - { - "name": "Skylake-Server-x86_64-cpu", - "parent": "x86_64-cpu" - }, { "name": "pc-q35-2.7-machine", "parent": "generic-pc-machine" }, + { + "name": "Skylake-Server-x86_64-cpu", + "parent": "x86_64-cpu" + }, { "name": "isa-parallel", "parent": "isa-device" @@ -2796,8 +2800,8 @@ "parent": "x86_64-cpu" }, { - "name": "kvm64-v1-x86_64-cpu", - "parent": "x86_64-cpu" + "name": "pcie-root-port", + "parent": "pcie-root-port-base" }, { "name": "IDE", @@ -2808,8 +2812,8 @@ "parent": "x86_64-cpu" }, { - "name": "pcie-root-port", - "parent": "pcie-root-port-base" + "name": "kvm64-v1-x86_64-cpu", + "parent": "x86_64-cpu" }, { "name": "mptsas1068", @@ -2907,10 +2911,6 @@ "name": "qio-channel-tls", "parent": "qio-channel" }, - { - "name": "chardev-stdio", - "parent": "chardev-fd" - }, { "name": "virtio-vga", "parent": "virtio-vga-base-type" @@ -7314,6 +7314,10 @@ "name": "xsaves", "type": "bool" }, + { + "name": "vgif", + "type": "bool" + }, { "name": "mce", "type": "bool" @@ -7443,6 +7447,10 @@ "name": "tcg-cpuid", "type": "bool" }, + { + "name": "vmx-entry-load-pkrs", + "type": "bool" + }, { "name": "x-hv-max-vps", "type": "int32" @@ -7700,6 +7708,10 @@ "name": "kvm-pv-tlb-flush", "type": "bool" }, + { + "name": "vmx-rdtsc-exit", + "type": "bool" + }, { "name": "vmx-cr8-load-exit", "type": "bool" @@ -7713,7 +7725,11 @@ "type": "bool" }, { - "name": "vmx-rdtsc-exit", + "name": "svme-addr-chk", + "type": "bool" + }, + { + "name": "vmx-exit-load-pkrs", "type": "bool" }, { @@ -7855,6 +7871,14 @@ "description": "on/off", "type": "bool" }, + { + "name": "avic", + "type": "bool" + }, + { + "name": "ds", + "type": "bool" + }, { "name": "legacy-cache", "type": "bool" @@ -7873,11 +7897,11 @@ "type": "bool" }, { - "name": "ds", + "name": "osvw", "type": "bool" }, { - "name": "osvw", + "name": "pks", "type": "bool" }, { @@ -7904,6 +7928,10 @@ "name": "vmx-cr8-store-exit", "type": "bool" }, + { + "name": "vmx-ept-1gb", + "type": "bool" + }, { "name": "nrip-save", "type": "bool" @@ -7917,7 +7945,7 @@ "type": "bool" }, { - "name": "lmce", + "name": "vmx-ept-2mb", "type": "bool" }, { @@ -7937,7 +7965,7 @@ "type": "bool" }, { - "name": "sse2", + "name": "lmce", "type": "bool" }, { @@ -7965,15 +7993,15 @@ "type": "bool" }, { - "name": "vmx-ept-1gb", + "name": "avx", "type": "bool" }, { - "name": "avx", + "name": "topoext", "type": "bool" }, { - "name": "topoext", + "name": "sse2", "type": "bool" }, { @@ -8171,7 +8199,7 @@ "type": "bool" }, { - "name": "vmx-ept-2mb", + "name": "vmx-page-walk-4", "type": "bool" }, { @@ -8239,7 +8267,7 @@ "type": "bool" }, { - "name": "vmx-page-walk-4", + "name": "v-vmsave-vmload", "type": "bool" }, { @@ -10857,6 +10885,11 @@ ], "option": "iscsi" }, + { + "parameters": [ + ], + "option": "acpi" + }, { "parameters": [ { @@ -10986,6 +11019,31 @@ ], "option": "spice" }, + { + "parameters": [ + { + "name": "resourcecontrol", + "type": "string" + }, + { + "name": "spawn", + "type": "string" + }, + { + "name": "elevateprivileges", + "type": "string" + }, + { + "name": "obsolete", + "type": "string" + }, + { + "name": "enable", + "type": "boolean" + } + ], + "option": "sandbox" + }, { "parameters": [ { @@ -11175,31 +11233,6 @@ ], "option": "fsdev" }, - { - "parameters": [ - { - "name": "resourcecontrol", - "type": "string" - }, - { - "name": "spawn", - "type": "string" - }, - { - "name": "elevateprivileges", - "type": "string" - }, - { - "name": "obsolete", - "type": "string" - }, - { - "name": "enable", - "type": "boolean" - } - ], - "option": "sandbox" - }, { "parameters": [ ], @@ -11298,11 +11331,6 @@ ], "option": "vnc" }, - { - "parameters": [ - ], - "option": "acpi" - }, { "parameters": [ { @@ -25357,6 +25385,11 @@ { "name": "alias", "type": "str" + }, + { + "name": "transform", + "default": null, + "type": "568" } ], "meta-type": "object" @@ -25384,7 +25417,7 @@ "members": [ { "name": "data", - "type": "568" + "type": "569" } ], "meta-type": "object" @@ -25760,7 +25793,7 @@ "members": [ { "name": "bus", - "type": "569" + "type": "570" }, { "name": "devices", @@ -25832,7 +25865,7 @@ "members": [ { "name": "data", - "type": "570" + "type": "571" } ], "meta-type": "object" @@ -25842,7 +25875,7 @@ "members": [ { "name": "data", - "type": "571" + "type": "572" } ], "meta-type": "object" @@ -25852,7 +25885,7 @@ "members": [ { "name": "data", - "type": "572" + "type": "573" } ], "meta-type": "object" @@ -26047,7 +26080,7 @@ "members": [ { "name": "type", - "type": "573" + "type": "574" }, { "name": "hash", @@ -26126,13 +26159,13 @@ }, { "case": "luks", - "type": "575" + "type": "576" } ], "members": [ { "name": "format", - "type": "574" + "type": "575" } ], "meta-type": "object" @@ -26158,17 +26191,17 @@ "variants": [ { "case": "full", - "type": "577" + "type": "578" }, { "case": "erasure-coded", - "type": "578" + "type": "579" } ], "members": [ { "name": "type", - "type": "576" + "type": "577" } ], "meta-type": "object" @@ -26224,7 +26257,7 @@ "variants": [ { "case": "luks", - "type": "579" + "type": "580" }, { "case": "qcow", @@ -26234,7 +26267,7 @@ "members": [ { "name": "format", - "type": "574" + "type": "575" } ], "meta-type": "object" @@ -26732,7 +26765,7 @@ "members": [ { "name": "button", - "type": "580" + "type": "581" }, { "name": "down", @@ -26746,7 +26779,7 @@ "members": [ { "name": "axis", - "type": "581" + "type": "582" }, { "name": "value", @@ -26758,11 +26791,22 @@ { "name": "568", "members": [ + { + "name": "persistent", + "default": null, + "type": "bool" + } ], "meta-type": "object" }, { "name": "569", + "members": [ + ], + "meta-type": "object" + }, + { + "name": "570", "members": [ { "name": "number", @@ -26778,21 +26822,21 @@ }, { "name": "io_range", - "type": "582" + "type": "583" }, { "name": "memory_range", - "type": "582" + "type": "583" }, { "name": "prefetchable_range", - "type": "582" + "type": "583" } ], "meta-type": "object" }, { - "name": "570", + "name": "571", "members": [ { "name": "compat", @@ -26830,12 +26874,12 @@ { "name": "encrypt", "default": null, - "type": "583" + "type": "584" }, { "name": "bitmaps", "default": null, - "type": "[584]" + "type": "[585]" }, { "name": "compression-type", @@ -26845,7 +26889,7 @@ "meta-type": "object" }, { - "name": "571", + "name": "572", "members": [ { "name": "create-type", @@ -26867,7 +26911,7 @@ "meta-type": "object" }, { - "name": "572", + "name": "573", "members": [ { "name": "cipher-alg", @@ -26904,13 +26948,13 @@ }, { "name": "slots", - "type": "[585]" + "type": "[586]" } ], "meta-type": "object" }, { - "name": "573", + "name": "574", "meta-type": "enum", "values": [ "md5", @@ -26918,7 +26962,7 @@ ] }, { - "name": "574", + "name": "575", "meta-type": "enum", "values": [ "qcow", @@ -26926,7 +26970,7 @@ ] }, { - "name": "575", + "name": "576", "members": [ { "name": "key-secret", @@ -26967,7 +27011,7 @@ "meta-type": "object" }, { - "name": "576", + "name": "577", "meta-type": "enum", "values": [ "full", @@ -26975,7 +27019,7 @@ ] }, { - "name": "577", + "name": "578", "members": [ { "name": "copies", @@ -26985,7 +27029,7 @@ "meta-type": "object" }, { - "name": "578", + "name": "579", "members": [ { "name": "data-strips", @@ -26999,7 +27043,7 @@ "meta-type": "object" }, { - "name": "579", + "name": "580", "members": [ { "name": "state", @@ -27034,7 +27078,7 @@ "meta-type": "object" }, { - "name": "580", + "name": "581", "meta-type": "enum", "values": [ "left", @@ -27047,7 +27091,7 @@ ] }, { - "name": "581", + "name": "582", "meta-type": "enum", "values": [ "x", @@ -27055,7 +27099,7 @@ ] }, { - "name": "582", + "name": "583", "members": [ { "name": "base", @@ -27069,12 +27113,12 @@ "meta-type": "object" }, { - "name": "583", + "name": "584", "tag": "format", "variants": [ { "case": "luks", - "type": "572" + "type": "573" }, { "case": "aes", @@ -27090,12 +27134,12 @@ "meta-type": "object" }, { - "name": "[584]", - "element-type": "584", + "name": "[585]", + "element-type": "585", "meta-type": "array" }, { - "name": "584", + "name": "585", "members": [ { "name": "name", @@ -27107,7 +27151,7 @@ }, { "name": "flags", - "type": "[586]" + "type": "[587]" } ], "meta-type": "object" @@ -27118,12 +27162,12 @@ "meta-type": "array" }, { - "name": "[585]", - "element-type": "585", + "name": "[586]", + "element-type": "586", "meta-type": "array" }, { - "name": "585", + "name": "586", "members": [ { "name": "active", @@ -27147,12 +27191,12 @@ "meta-type": "object" }, { - "name": "[586]", - "element-type": "586", + "name": "[587]", + "element-type": "587", "meta-type": "array" }, { - "name": "586", + "name": "587", "meta-type": "enum", "values": [ "in-use", @@ -27193,6 +27237,7 @@ "name": "base", "props": { "vmx-entry-load-rtit-ctl": false, + "svme-addr-chk": false, "cmov": true, "ia64": false, "ssb-no": false, @@ -27277,6 +27322,7 @@ "vmx-unrestricted-guest": false, "vmx-cr3-store-noexit": false, "pku": false, + "pks": false, "smx": false, "cmp-legacy": true, "avx512-4fmaps": false, @@ -27392,6 +27438,7 @@ "kvmclock": true, "vmx-zero-len-inject": false, "pschange-mc-no": true, + "v-vmsave-vmload": false, "vmx-rdrand-exit": false, "lwp": false, "amd-ssbd": true, @@ -27429,6 +27476,7 @@ "vmx-movdr-exit": false, "pse": true, "avx2": true, + "avic": false, "sep": true, "virt-ssbd": true, "vmx-cr3-load-noexit": false, @@ -27445,6 +27493,7 @@ "amd-stibp": true, "vmx-preemption-timer": false, "clflushopt": true, + "vmx-entry-load-pkrs": false, "vmx-vnmi-pending": false, "monitor": false, "vmx-vintr-pending": false, @@ -27454,6 +27503,7 @@ "pcid": false, "taa-no": false, "arch-capabilities": true, + "vgif": false, "vmx-secondary-ctls": false, "vmx-xsaves": false, "clzero": true, @@ -27488,6 +27538,7 @@ "vmx-entry-load-efer": false, "model-id": "AMD Ryzen 9 3900X 12-Core Processor ", "sha-ni": true, + "vmx-exit-load-pkrs": false, "abm": true, "vmx-ept-advanced-exitinfo": false, "avx512pf": false, @@ -27519,6 +27570,7 @@ "name": "base", "props": { "vmx-entry-load-rtit-ctl": false, + "svme-addr-chk": false, "cmov": true, "ia64": false, "ssb-no": false, @@ -27603,6 +27655,7 @@ "vmx-unrestricted-guest": false, "vmx-cr3-store-noexit": false, "pku": false, + "pks": false, "smx": false, "cmp-legacy": true, "avx512-4fmaps": false, @@ -27718,6 +27771,7 @@ "kvmclock": true, "vmx-zero-len-inject": false, "pschange-mc-no": true, + "v-vmsave-vmload": false, "vmx-rdrand-exit": false, "lwp": false, "amd-ssbd": true, @@ -27755,6 +27809,7 @@ "vmx-movdr-exit": false, "pse": true, "avx2": true, + "avic": false, "sep": true, "virt-ssbd": true, "vmx-cr3-load-noexit": false, @@ -27771,6 +27826,7 @@ "amd-stibp": true, "vmx-preemption-timer": false, "clflushopt": true, + "vmx-entry-load-pkrs": false, "vmx-vnmi-pending": false, "monitor": false, "vmx-vintr-pending": false, @@ -27780,6 +27836,7 @@ "pcid": false, "taa-no": false, "arch-capabilities": true, + "vgif": false, "vmx-secondary-ctls": false, "vmx-xsaves": false, "clzero": true, @@ -27814,6 +27871,7 @@ "vmx-entry-load-efer": false, "model-id": "AMD Ryzen 9 3900X 12-Core Processor ", "sha-ni": true, + "vmx-exit-load-pkrs": false, "abm": true, "vmx-ept-advanced-exitinfo": false, "avx512pf": false, @@ -30208,6 +30266,7 @@ "name": "base", "props": { "vmx-entry-load-rtit-ctl": false, + "svme-addr-chk": false, "cmov": true, "ia64": false, "ssb-no": false, @@ -30292,6 +30351,7 @@ "vmx-unrestricted-guest": false, "vmx-cr3-store-noexit": false, "pku": true, + "pks": true, "smx": false, "cmp-legacy": false, "avx512-4fmaps": false, @@ -30407,6 +30467,7 @@ "kvmclock": false, "vmx-zero-len-inject": false, "pschange-mc-no": false, + "v-vmsave-vmload": false, "vmx-rdrand-exit": false, "lwp": false, "amd-ssbd": false, @@ -30444,6 +30505,7 @@ "vmx-movdr-exit": false, "pse": true, "avx2": false, + "avic": false, "sep": true, "virt-ssbd": false, "vmx-cr3-load-noexit": false, @@ -30460,6 +30522,7 @@ "amd-stibp": false, "vmx-preemption-timer": false, "clflushopt": true, + "vmx-entry-load-pkrs": false, "vmx-vnmi-pending": false, "monitor": true, "vmx-vintr-pending": false, @@ -30469,6 +30532,7 @@ "pcid": false, "taa-no": false, "arch-capabilities": false, + "vgif": false, "vmx-secondary-ctls": false, "vmx-xsaves": false, "clzero": false, @@ -30503,6 +30567,7 @@ "vmx-entry-load-efer": false, "model-id": "QEMU TCG CPU version 2.5+", "sha-ni": false, + "vmx-exit-load-pkrs": false, "abm": true, "vmx-ept-advanced-exitinfo": false, "avx512pf": false, @@ -30534,6 +30599,7 @@ "name": "base", "props": { "vmx-entry-load-rtit-ctl": false, + "svme-addr-chk": false, "cmov": true, "ia64": false, "ssb-no": false, @@ -30618,6 +30684,7 @@ "vmx-unrestricted-guest": false, "vmx-cr3-store-noexit": false, "pku": true, + "pks": true, "smx": false, "cmp-legacy": false, "avx512-4fmaps": false, @@ -30733,6 +30800,7 @@ "kvmclock": false, "vmx-zero-len-inject": false, "pschange-mc-no": false, + "v-vmsave-vmload": false, "vmx-rdrand-exit": false, "lwp": false, "amd-ssbd": false, @@ -30770,6 +30838,7 @@ "vmx-movdr-exit": false, "pse": true, "avx2": false, + "avic": false, "sep": true, "virt-ssbd": false, "vmx-cr3-load-noexit": false, @@ -30786,6 +30855,7 @@ "amd-stibp": false, "vmx-preemption-timer": false, "clflushopt": true, + "vmx-entry-load-pkrs": false, "vmx-vnmi-pending": false, "monitor": true, "vmx-vintr-pending": false, @@ -30795,6 +30865,7 @@ "pcid": false, "taa-no": false, "arch-capabilities": false, + "vgif": false, "vmx-secondary-ctls": false, "vmx-xsaves": false, "clzero": false, @@ -30829,6 +30900,7 @@ "vmx-entry-load-efer": false, "model-id": "QEMU TCG CPU version 2.5+", "sha-ni": false, + "vmx-exit-load-pkrs": false, "abm": true, "vmx-ept-advanced-exitinfo": false, "avx512pf": false, diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index ddfa701798..f2ec32e46b 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -258,10 +258,11 @@ 5002050 0 43100242 - v5.2.0-1810-g2436651b26 + v5.2.0-1934-ge7bdfa1463 x86_64 + @@ -346,6 +347,7 @@ + @@ -461,6 +463,7 @@ + @@ -498,6 +501,7 @@ + @@ -514,6 +518,7 @@ + @@ -523,6 +528,7 @@ + @@ -557,6 +563,7 @@ + @@ -1470,6 +1477,7 @@ + @@ -1554,6 +1562,7 @@ + @@ -1669,6 +1678,7 @@ + @@ -1706,6 +1716,7 @@ + @@ -1722,6 +1733,7 @@ + @@ -1731,6 +1743,7 @@ + @@ -1765,6 +1778,7 @@ + --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1613057919; cv=none; d=zohomail.com; s=zohoarc; b=LqtNjiajmu4dM4TpV4woZLkoKYlFhEIsCfn9xWr6Pl/308QFroP+W/mI+Gfh2viSmZPn33BFI7GiHzAhkhgZqgYUfYKrMrVlqqnUYlYVNV38mI74o+khsMRp5xExTDtKS/gW/rv/wRpnl9VA7QeCn7YMNgWVodZl4u3Gr4zQlek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057919; 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=9ZQn84aB5HQZdaLU6lbS611dA+10ezOj6qgFt5wTpwk=; b=GylvWa8G6LJqafexKg6ohlW5gAIAnMEJMMAr0BG95hESM5U6CXSPkX2+weoZ5T8ENLtp8VAAM/zgIoYR+J7GE8MvJIsrPgfvjiYClEUhpvGTLyqYXg1nT1vjbvQOX1ZSX9nUd5NFn3wCPtYKs4HXyAiXaSktmkX7pknEiCSs5tk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1613057918689362.89987816732423; Thu, 11 Feb 2021 07:38:38 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-295-d9N5QLXgM8SAFcMbsUAFCQ-1; Thu, 11 Feb 2021 10:38:34 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A945CBBEE4; Thu, 11 Feb 2021 15:38:27 +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 7ED8710013D7; Thu, 11 Feb 2021 15:38:27 +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 3F78C18095CC; Thu, 11 Feb 2021 15:38:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFc6N3019095 for ; Thu, 11 Feb 2021 10:38:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id B07856268D; Thu, 11 Feb 2021 15:38:06 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 05C585D74F for ; Thu, 11 Feb 2021 15:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057917; 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=9ZQn84aB5HQZdaLU6lbS611dA+10ezOj6qgFt5wTpwk=; b=CIU+iPikLPVO3TTb+TIeRHBkj3/P34OYuKD7vLuHHeoG/DGpfgqQffglnhgpigM1yYMzH7 X+ui2FNx6VC/WZwEMkZxWbaiULf0Z6iFGHd/zcwx17/wXsUw5UR5x7K7hc9C7eYqysePj/ 1hi3VAZ0EGMGsYQIk95k4Q5tC16+noY= X-MC-Unique: d9N5QLXgM8SAFcMbsUAFCQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 02/19] qemu: capabilities: Introduce QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING Date: Thu, 11 Feb 2021 16:37:41 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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) Content-Type: text/plain; charset="utf-8" The capability represents qemu's ability to setup mappings for migrating block dirty bitmaps and is based on presence of the 'transform' property of the 'block-bitmap-mapping' property of 'migrate-set-parameters' QMP command. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index ccf810ff96..38555dde98 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -616,6 +616,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "vhost-user-blk", "cpu-max", "memory-backend-file.x-use-canonical-path-for-ramblock-id", + "migration-param.block-bitmap-mapping", ); @@ -1549,6 +1550,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSc= hemaQueries[] =3D { { "migrate-set-parameters/arg-type/xbzrle-cache-size", QEMU_CAPS_MIGRA= TION_PARAM_XBZRLE_CACHE_SIZE }, { "set-numa-node/arg-type/+hmat-lb", QEMU_CAPS_NUMA_HMAT }, { "netdev_add/arg-type/+vhost-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA }, + { "migrate-set-parameters/arg-type/block-bitmap-mapping/transform", QE= MU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING }, }; typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 6fd7922926..03d6ba60cf 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -596,6 +596,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_DEVICE_VHOST_USER_BLK, /* -device vhost-user-blk */ QEMU_CAPS_CPU_MAX, /* -cpu max */ QEMU_CAPS_X_USE_CANONICAL_PATH_FOR_RAMBLOCK_ID, /* -object memory-back= end-file,x-use-canonical-path-for-ramblock-id=3D */ + QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING, /* block-bitmap-mappin= g in migrate-set-parameters */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613057899; cv=none; d=zohomail.com; s=zohoarc; b=dSe65dbrukPuPuIbBGPA+UR8xR2ajipyi47c18tCjsm3WJrUlqWyheWLqDzL+PDYaIcnB2vMDYGM9vZKLMygQqm2nq1rZpxF3fNvBaNA+E14xmqeVqV/2CJ4BHpfvOto6ptFNWOf+09BuUifVfZ4oyAQK5twjWAbcJS4JEx6vY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057899; 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=DUepa+5tK31sYHl5YsOoo6WOUeAnl4fE6alMtcyg1pE=; b=L1Qs/XXWKLOM0+CvOV4FQe5MCRhL2hvtUn8SPbRjADKbefH5qd0gQWe7QVeE6Xmm3tXryPbXKvEu9DPPF1UimYbkpDHzyL8CzRgm4WUxB2LmoqxTAfYqXgMydunJ9ktkdzD1EoTWZIk2wuocDt8m+him5+m+k/Gojr4G4dJ0XUA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1613057899537858.9011581978518; Thu, 11 Feb 2021 07:38:19 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-480-NLPYhT3KOsi-Op29-bqUfg-1; Thu, 11 Feb 2021 10:38:16 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 762F0801983; Thu, 11 Feb 2021 15:38:10 +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 37D9D1D5; Thu, 11 Feb 2021 15:38:09 +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 C6D1218095CC; Thu, 11 Feb 2021 15:38:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFc7u7019105 for ; Thu, 11 Feb 2021 10:38:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id C240C5D74F; Thu, 11 Feb 2021 15:38:07 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3006B6268D for ; Thu, 11 Feb 2021 15:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057898; 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=DUepa+5tK31sYHl5YsOoo6WOUeAnl4fE6alMtcyg1pE=; b=gzlVZjfOSL0ZZU/euYMiJVehhAjJw9nOy80/am4T4SVsaNCYgbEi+Kr4u4rjj4B0iY3Axk Zc/0jm/TvDhyxDd6N+r6KGfz5ildRgbmESwEbttDRawvW8bmo9lwGfvscTOfUyF69+wQQR ALp6Gz+eiRDJaGZkx9XD5QGnTy+Km20= X-MC-Unique: NLPYhT3KOsi-Op29-bqUfg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/19] qemu: Probe whether an image is 'qcow2 v2' from query-named-block-nodes Date: Thu, 11 Feb 2021 16:37:42 +0100 Message-Id: <6b75a9ec13e10b16e2626056efb296393278c7bf.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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) Content-Type: text/plain; charset="utf-8" Such images don't support stuff like dirty bitmaps. Note that the synthetic test for detecting bitmaps is used as an example to prevent adding additional test cases. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.h | 3 +++ src/qemu/qemu_monitor_json.c | 11 +++++++++++ tests/qemublocktest.c | 2 ++ tests/qemublocktestdata/bitmap/synthetic.json | 2 +- tests/qemublocktestdata/bitmap/synthetic.out | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index b0068f2a82..7a039641ba 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -732,6 +732,9 @@ struct _qemuBlockNamedNodeData { /* the cluster size of the image is valid only when > 0 */ unsigned long long clusterSize; + + /* image version */ + bool qcow2v2; }; GHashTable * diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index d3b2a2c7a5..65c30e3bb4 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2979,6 +2979,7 @@ qemuMonitorJSONBlockGetNamedNodeDataWorker(size_t pos= G_GNUC_UNUSED, GHashTable *nodes =3D opaque; virJSONValuePtr img; virJSONValuePtr bitmaps; + virJSONValuePtr format_specific; const char *nodename; g_autoptr(qemuBlockNamedNodeData) ent =3D NULL; @@ -3001,6 +3002,16 @@ qemuMonitorJSONBlockGetNamedNodeDataWorker(size_t po= s G_GNUC_UNUSED, if ((bitmaps =3D virJSONValueObjectGetArray(val, "dirty-bitmaps"))) qemuMonitorJSONBlockGetNamedNodeDataBitmaps(bitmaps, ent); + /* query qcow2 format specific props */ + if ((format_specific =3D virJSONValueObjectGetObject(img, "format-spec= ific")) && + STREQ_NULLABLE(virJSONValueObjectGetString(format_specific, "type"= ), "qcow2")) { + virJSONValuePtr qcow2props =3D virJSONValueObjectGetObject(format_= specific, "data"); + + if (qcow2props && + STREQ_NULLABLE(virJSONValueObjectGetString(qcow2props, "compat= "), "0.10")) + ent->qcow2v2 =3D true; + } + if (virHashAddEntry(nodes, nodename, ent) < 0) return -1; diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index ddaf73359d..bbfcfee92d 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -599,6 +599,8 @@ testQemuDetectBitmapsWorker(GHashTable *nodedata, return; virBufferAsprintf(buf, "%s:\n", nodename); + if (data->qcow2v2) + virBufferAddLit(buf, " qcow2 v2\n"); virBufferAdjustIndent(buf, 1); for (i =3D 0; i < data->nbitmaps; i++) { diff --git a/tests/qemublocktestdata/bitmap/synthetic.json b/tests/qemubloc= ktestdata/bitmap/synthetic.json index 3712c8e5fc..cd468a42a2 100644 --- a/tests/qemublocktestdata/bitmap/synthetic.json +++ b/tests/qemublocktestdata/bitmap/synthetic.json @@ -12,7 +12,7 @@ "format-specific": { "type": "qcow2", "data": { - "compat": "1.1", + "compat": "0.10", "compression-type": "zlib", "lazy-refcounts": false, "bitmaps": [ diff --git a/tests/qemublocktestdata/bitmap/synthetic.out b/tests/qemublock= testdata/bitmap/synthetic.out index cde7228e01..2d9545fc9b 100644 --- a/tests/qemublocktestdata/bitmap/synthetic.out +++ b/tests/qemublocktestdata/bitmap/synthetic.out @@ -1,4 +1,5 @@ libvirt-1-format: + qcow2 v2 current: record:1 busy:0 persist:1 inconsist:1 gran:65536 dirty:0 top-ok: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0 top-inactive: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0 --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613058020; cv=none; d=zohomail.com; s=zohoarc; b=NnPUznLezzM0iSqa16eX2MzxtlW6YXcUEaAaPIZG58Qnz2tr9G4H9G3uHf+taGki6ISVWdFn/DwtxC76YYMR51Uch+aAzeYxGuU5bzmDf7NKiTLd0IuYdHYxDaH3OjPZXflRufTvxb8skYVGNUZTdPeqCT3obhBHZdwq9CcAbyU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613058020; 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=LamoqSryW3Qd+dpisi/csXQPSmZrPXKSSPXjtFsn4AU=; b=F6eNZ09mwYEa5bfllbkGIIrM/rCUmE8C9TIbK49C5j8YYSy2xDO+md7k9l8v/op0Uy7y9WZE8FDtP1H2Vro7fCa4CqHZ9p2NuOumc4zCVpzx91gtDUE5b/fOO36StkeyhemcpgYNuWjd1YIZX+lk+9izk19aVk4/UQuLSRoZKts= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1613058019627371.7920430917268; Thu, 11 Feb 2021 07:40:19 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-S1NcTvq_O-mu1B1n3mHYDA-1; Thu, 11 Feb 2021 10:38:31 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CE607801981; Thu, 11 Feb 2021 15:38:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A154919744; Thu, 11 Feb 2021 15:38:25 +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 663BDCF47; Thu, 11 Feb 2021 15:38:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFc8aA019116 for ; Thu, 11 Feb 2021 10:38:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id E96822C316; Thu, 11 Feb 2021 15:38:08 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E5595D74F for ; Thu, 11 Feb 2021 15:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613058018; 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=LamoqSryW3Qd+dpisi/csXQPSmZrPXKSSPXjtFsn4AU=; b=OtPxgzVJsSr/TOM+0oQTnXRdD5EclxHJ5omN7KlF+yTtkNMYK78O+D1x7eEEtE8qmmjFB0 9OA2UiFhkOsX2Wnqf1z/Ik2ae+qsDZjsCS0MXoXJLpoQe0WfguFdzb/tf8IvK3aV9E/U6K wOtq5fbuJaN5fBZK5QP1It7M6RfF0fw= X-MC-Unique: S1NcTvq_O-mu1B1n3mHYDA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 04/19] virDomainMigrateVersion3Full: Don't set 'cancelled' to the same value Date: Thu, 11 Feb 2021 16:37:43 +0100 Message-Id: <07792266f84164e04930eec870bdc841643e6701.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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) Content-Type: text/plain; charset="utf-8" It's already initialized to '1'. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/libvirt-domain.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index dba89a7d3a..e9688a15b4 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -3089,7 +3089,6 @@ virDomainMigrateVersion3Full(virDomainPtr domain, virTypedParamsReplaceString(¶ms, &nparams, VIR_MIGRATE_PARAM_URI, uri_out) < 0) { - cancelled =3D 1; virErrorPreserveLast(&orig_err); goto finish; } @@ -3098,7 +3097,6 @@ virDomainMigrateVersion3Full(virDomainPtr domain, VIR_MIGRATE_PARAM_URI, &uri) <=3D 0= ) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("domainMigratePrepare3 did not set uri")); - cancelled =3D 1; virErrorPreserveLast(&orig_err); goto finish; } --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613057918; cv=none; d=zohomail.com; s=zohoarc; b=lzFcoGnCoNkQJsTscKw5EQYZr2IsWKMAOXFfS0UCxzPX3o04WerbOGp3DSAqQcOLXqLGoLVlDf17jth+jcv4KWtSoGuMTElymbA/W2W23RPP+n2MzM0kjuciM06b0Mf1xX4zVGCaLJ857a169I8Q/vDlH904emLSyXq4Gs8LYJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057918; 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=F1ta91dJbVGE/1a38qGYjh/5kh6s3w+YC0gIxFDeR84=; b=BrZDj8vu8X9AvZw3p+/urqKcPVVF6QLMy5f8w3wAAu/bVZKS6SVFv7Y1ponxgNVlVXXvtQXUDJnxDs3MLNtf01diW4BfyDJ3D4m+nC03YJ0RWWmaa/Ou7VMX37D7CTeyLbleQjdVQK0rDsFFkj8kBnxRo6avwWMSKL/JtHdlP0E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1613057917990137.49331147717874; Thu, 11 Feb 2021 07:38:37 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-IHHy7CU3PeaEYcGYbG0h2A-1; Thu, 11 Feb 2021 10:38:34 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00A158799F8; Thu, 11 Feb 2021 15:38:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C92C910016F4; Thu, 11 Feb 2021 15:38:28 +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 8D2BB57DFF; Thu, 11 Feb 2021 15:38:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcANN019131 for ; Thu, 11 Feb 2021 10:38:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1788C5D74F; Thu, 11 Feb 2021 15:38:10 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CAED6268E for ; Thu, 11 Feb 2021 15:38:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057916; 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=F1ta91dJbVGE/1a38qGYjh/5kh6s3w+YC0gIxFDeR84=; b=PsPv9XIFbpN8nYsaOfz4QLoSGkfuOQgAppKhW4c+sqsO7cvCAIdYoT8RxBRzU0zTwugwWO y6iOQa27b94GMYhRobwVYUlubiNcRJ3NzwxM8DA8PAWrhL/pY5BXCNzVtAmQveWj9K+PbT MCyVVupEizw0pES/eyDlfvlySIR5NL4= X-MC-Unique: IHHy7CU3PeaEYcGYbG0h2A-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/19] qemuMigrationSrcPerformPeer2Peer3: Don't leak 'dom_xml' on cleanup Date: Thu, 11 Feb 2021 16:37:44 +0100 Message-Id: <79dd2d5d06c9154379ce6d16b8b38f50d18f71ce.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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) Content-Type: text/plain; charset="utf-8" Use g_autofree for 'dom_xml' to free it on some of the (unlikely) code paths jumping to cleanup prior to the deallocation which is done right after it's not needed any more since it's a big string. Noticed when running under valgrind: =3D=3D2204780=3D=3D 8,192 bytes in 1 blocks are definitely lost in loss rec= ord 2,539 of 2,551 =3D=3D2204780=3D=3D at 0x483BCE8: realloc (vg_replace_malloc.c:834) =3D=3D2204780=3D=3D by 0x4D890DF: g_realloc (in /usr/lib64/libglib-2.0.s= o.0.6600.4) =3D=3D2204780=3D=3D by 0x4DA3AF0: g_string_append_vprintf (in /usr/lib64= /libglib-2.0.so.0.6600.4) =3D=3D2204780=3D=3D by 0x4917293: virBufferAsprintf (virbuffer.c:307) =3D=3D2204780=3D=3D by 0x49B0B75: virDomainChrDefFormat (domain_conf.c:2= 6109) =3D=3D2204780=3D=3D by 0x49E25EF: virDomainDefFormatInternalSetRootName = (domain_conf.c:28956) =3D=3D2204780=3D=3D by 0x15F81D24: qemuDomainDefFormatBufInternal (qemu_= domain.c:6204) =3D=3D2204780=3D=3D by 0x15F8270D: qemuDomainDefFormatXMLInternal (qemu_= domain.c:6229) =3D=3D2204780=3D=3D by 0x15F8270D: qemuDomainDefFormatLive (qemu_domain.= c:6279) =3D=3D2204780=3D=3D by 0x15FD8100: qemuMigrationSrcBeginPhase (qemu_migr= ation.c:2395) =3D=3D2204780=3D=3D by 0x15FE0F0D: qemuMigrationSrcPerformPeer2Peer3 (qe= mu_migration.c:4640) =3D=3D2204780=3D=3D by 0x15FE0F0D: qemuMigrationSrcPerformPeer2Peer (qem= u_migration.c:5093) =3D=3D2204780=3D=3D by 0x15FE0F0D: qemuMigrationSrcPerformJob (qemu_migr= ation.c:5168) =3D=3D2204780=3D=3D by 0x15FE280E: qemuMigrationSrcPerform (qemu_migrati= on.c:5372) =3D=3D2204780=3D=3D by 0x15F9BA3D: qemuDomainMigratePerform3Params (qemu= _driver.c:11841) Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/qemu/qemu_migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index f44d31c971..37f0d43d24 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -4347,7 +4347,7 @@ qemuMigrationSrcPerformPeer2Peer3(virQEMUDriverPtr dr= iver, char *uri_out =3D NULL; char *cookiein =3D NULL; char *cookieout =3D NULL; - char *dom_xml =3D NULL; + g_autofree char *dom_xml =3D NULL; int cookieinlen =3D 0; int cookieoutlen =3D 0; int ret =3D -1; --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1613057929; cv=none; d=zohomail.com; s=zohoarc; b=C2mEJYzUcTO3uNAtYIcgxNe9zhaSMn9o5BrscH2CR7nvGvu1NxE1SjExhBAyp949L4/vQ8X9ITyS8Kw6SJ6cHP404Fqyg2vktiU7FwTDpORGlr1wdYfRijt100T3+QSHonmvaMpOFEnYNny5EWjlCvkGhe4Nd/dQGw4eZzJzj40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057929; 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=+p32SShRdHUHKgnjBf/iYl/gx8IyCcss/5xoEvbrTvg=; b=QddhBlnbImeAT4ypuCLuGtSskXBNpVqd5pGdrfQHq1P/DKfV9pMPTMJL3VSbLBHXZDEo4GU+jLwI3zb4XO5bql6y58T4vZFMB0AEGAOB/nyyBOgaYbi9AfnBF+ZKDu0bh7gI58TZ3GNwhVxNK0nxBfV89KsqOUOMxelDSvpZDvA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 161305792866786.77182987732931; Thu, 11 Feb 2021 07:38:48 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-497-rIHf5YV2Mc2KtXdCkhMe4g-1; Thu, 11 Feb 2021 10:38:45 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2F31D19611B9; Thu, 11 Feb 2021 15:38:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 02B5319744; Thu, 11 Feb 2021 15:38:32 +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 B5EBB58078; Thu, 11 Feb 2021 15:38:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcB1m019139 for ; Thu, 11 Feb 2021 10:38:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2F98B5D767; Thu, 11 Feb 2021 15:38:11 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7EB455D74F for ; Thu, 11 Feb 2021 15:38:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057927; 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=+p32SShRdHUHKgnjBf/iYl/gx8IyCcss/5xoEvbrTvg=; b=Ud3cCkZi+8pdiW/qLEj4Pd4Wsy+VcM8xwE+Bwr0dQ4/dxy+E0V54IjIrRov2VgW0TNPjUg u/RLqL7KUrBXvP1tN1Cnmgv6yrxkd0WNktl7bNthreZNsLL/wEaDdJ1z8WkBpTatFSFsrZ /koPkGC6qiG3uUSfp4ZfYTN0ZYQo7iM= X-MC-Unique: rIHf5YV2Mc2KtXdCkhMe4g-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/19] testutils: virTestRewrapFile: Rewrap also '.argv' files Date: Thu, 11 Feb 2021 16:37:45 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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) Content-Type: text/plain; charset="utf-8" The suffix is used for output files of 'storagevolxml2argvtest. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- tests/testutils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testutils.c b/tests/testutils.c index 7ecf7923b8..8734790457 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -332,6 +332,7 @@ virTestRewrapFile(const char *filename) g_autoptr(virCommand) cmd =3D NULL; if (!(virStringHasSuffix(filename, ".args") || + virStringHasSuffix(filename, ".argv") || virStringHasSuffix(filename, ".ldargs"))) return 0; --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1613058008; cv=none; d=zohomail.com; s=zohoarc; b=iSFsgl8M3CGJVof48Oqc/QSbqivEgrBBJijDX1zzjcMrYt+uIhM9M97Sa2z06WlyEdO9bAFNflXB+UJ2fPUXxTRvELjuvsKBLr1TimF82iCkpZkOhXLhMCQBbLK8LBUK2NSRkgrGBkSs5r6Hu2mMFlIALgvhRTDCY888TGd9rfw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613058008; 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=n9nkfzjKvnB4c965tIYiamwTlfp5zWp/NPNQzh2FI0A=; b=YrqV8pr9V9RzkEebYH91xuz2EeVk4bIZKzSAizKs/CH9HrmMCGt44yuUE9KM6zI+eJPuvq0J8uHien+MSWoFLrBelwRjyJQjwg++jl9n90XppzVefGfTR10gzUXv3CCwm7irON+AOyeBQRyc5QDW8n+rYAH+PM3qu93tifjkKvE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1613058008408625.8632943465481; Thu, 11 Feb 2021 07:40:08 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-324-IDyfmMuCPw2wn64fkfUs7g-1; Thu, 11 Feb 2021 10:38:31 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E35CDBBEE9; Thu, 11 Feb 2021 15:38:25 +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 B62381F41D; Thu, 11 Feb 2021 15:38:25 +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 7AE8E1809C91; Thu, 11 Feb 2021 15:38:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcCdc019146 for ; Thu, 11 Feb 2021 10:38:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 602F65D74F; Thu, 11 Feb 2021 15:38:12 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E5035D767 for ; Thu, 11 Feb 2021 15:38:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613058007; 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=n9nkfzjKvnB4c965tIYiamwTlfp5zWp/NPNQzh2FI0A=; b=aiOpfQkcznPt4u5B5SCrQ9BEY8pHQc6zafIiewACX9KJGr61g7b0VK7oHihYH/9omeMgPc 1kM4USOxbIgazSnBUYF+vDngYNwWCaSDhpY2d2jEfQ/heL2qKwonM7cUdTu3H1IHqsFmmW r5OOlooDGTrcStQMsu8rUM0J3fiuAVQ= X-MC-Unique: IDyfmMuCPw2wn64fkfUs7g-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 07/19] storagevolxml2argvdata: Rewrap all output files Date: Thu, 11 Feb 2021 16:37:46 +0100 Message-Id: <559ca5fea0b5e3a906d6225d7d27ca84ffb1b1ae.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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) Content-Type: text/plain; charset="utf-8" Use scripts/test-wrap-argv.py to rewrap the output files so that any further changes don't introduce churn since we are rewrapping the output automatically now. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- tests/storagevolxml2argvdata/iso-input.argv | 6 +++-- tests/storagevolxml2argvdata/iso.argv | 4 +++- .../logical-from-qcow2.argv | 6 +++-- tests/storagevolxml2argvdata/luks-cipher.argv | 8 ++++--- .../luks-convert-encrypt.argv | 23 ++++++++++++------- .../luks-convert-encrypt2fileqcow2.argv | 19 ++++++++++----- .../luks-convert-encrypt2fileraw.argv | 20 ++++++++++------ .../luks-convert-qcow2.argv | 21 +++++++++++------ .../storagevolxml2argvdata/luks-convert.argv | 20 ++++++++++------ tests/storagevolxml2argvdata/luks.argv | 8 ++++--- tests/storagevolxml2argvdata/qcow2-1.1.argv | 8 ++++--- .../storagevolxml2argvdata/qcow2-compat.argv | 8 ++++--- .../qcow2-from-logical-compat.argv | 8 ++++--- tests/storagevolxml2argvdata/qcow2-lazy.argv | 9 +++++--- ...ow2-nobacking-convert-prealloc-compat.argv | 10 +++++--- .../qcow2-nobacking-prealloc-compat.argv | 8 ++++--- .../qcow2-nocapacity-convert-prealloc.argv | 9 +++++--- .../qcow2-nocapacity.argv | 6 ++--- .../qcow2-nocow-compat.argv | 9 +++++--- tests/storagevolxml2argvdata/qcow2-nocow.argv | 9 +++++--- .../qcow2-zerocapacity.argv | 5 +++- 21 files changed, 147 insertions(+), 77 deletions(-) diff --git a/tests/storagevolxml2argvdata/iso-input.argv b/tests/storagevol= xml2argvdata/iso-input.argv index 1db0265945..203f27ca22 100644 --- a/tests/storagevolxml2argvdata/iso-input.argv +++ b/tests/storagevolxml2argvdata/iso-input.argv @@ -1,2 +1,4 @@ -qemu-img convert -f raw -O raw /var/lib/libvirt/images/test.iso \ -/var/lib/libvirt/images/sparse.img +qemu-img \ +convert \ +-f raw \ +-O raw /var/lib/libvirt/images/test.iso /var/lib/libvirt/images/sparse.img diff --git a/tests/storagevolxml2argvdata/iso.argv b/tests/storagevolxml2ar= gvdata/iso.argv index 172a255eb8..f74505ecec 100644 --- a/tests/storagevolxml2argvdata/iso.argv +++ b/tests/storagevolxml2argvdata/iso.argv @@ -1 +1,3 @@ -qemu-img create -f raw /var/lib/libvirt/images/test.iso 1024K +qemu-img \ +create \ +-f raw /var/lib/libvirt/images/test.iso 1024K diff --git a/tests/storagevolxml2argvdata/logical-from-qcow2.argv b/tests/s= toragevolxml2argvdata/logical-from-qcow2.argv index 7beded8478..c1b3cef4b9 100644 --- a/tests/storagevolxml2argvdata/logical-from-qcow2.argv +++ b/tests/storagevolxml2argvdata/logical-from-qcow2.argv @@ -1,2 +1,4 @@ -qemu-img convert -f qcow2 -O raw /var/lib/libvirt/images/OtherDemo.img \ -/dev/HostVG/Swap +qemu-img \ +convert \ +-f qcow2 \ +-O raw /var/lib/libvirt/images/OtherDemo.img /dev/HostVG/Swap diff --git a/tests/storagevolxml2argvdata/luks-cipher.argv b/tests/storagev= olxml2argvdata/luks-cipher.argv index a8a19f03ff..bb4438949c 100644 --- a/tests/storagevolxml2argvdata/luks-cipher.argv +++ b/tests/storagevolxml2argvdata/luks-cipher.argv @@ -1,5 +1,7 @@ -qemu-img create -f luks \ +qemu-img \ +create \ +-f luks \ --object secret,id=3DLuksDemo.img_encrypt0,file=3D/path/to/secretFile \ -o key-secret=3DLuksDemo.img_encrypt0,cipher-alg=3Dserpent-256,cipher-mode= =3Dcbc,\ -hash-alg=3Dsha256,ivgen-alg=3Dplain64,ivgen-hash-alg=3Dsha256 \ -/var/lib/libvirt/images/LuksDemo.img 5242880K +hash-alg=3Dsha256,ivgen-alg=3Dplain64,\ +ivgen-hash-alg=3Dsha256 /var/lib/libvirt/images/LuksDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt.argv b/tests= /storagevolxml2argvdata/luks-convert-encrypt.argv index 78bce96aaa..456ae621d1 100644 --- a/tests/storagevolxml2argvdata/luks-convert-encrypt.argv +++ b/tests/storagevolxml2argvdata/luks-convert-encrypt.argv @@ -1,11 +1,18 @@ -qemu-img create -f luks \ +qemu-img \ +create \ +-f luks \ --object secret,id=3DLuksDemo.img_encrypt0,file=3D/path/to/secretFile \ --o key-secret=3DLuksDemo.img_encrypt0 \ -/var/lib/libvirt/images/LuksDemo.img 5242880K -qemu-img convert --image-opts -n --target-image-opts \ +-o key-secret=3DLuksDemo.img_encrypt0 /var/lib/libvirt/images/LuksDemo.img= \ +5242880K +qemu-img \ +convert \ +--image-opts \ +-n \ +--target-image-opts \ --object secret,id=3DLuksDemo.img_encrypt0,file=3D/path/to/secretFile \ ---object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/inputSecretFil= e \ -driver=3Dluks,file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ -key-secret=3DOtherDemo.img_encrypt0 \ -driver=3Dluks,file.filename=3D/var/lib/libvirt/images/LuksDemo.img,\ +--object secret,id=3DOtherDemo.img_encrypt0,\ +file=3D/path/to/inputSecretFile driver=3Dluks,\ +file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ +key-secret=3DOtherDemo.img_encrypt0 driver=3Dluks,\ +file.filename=3D/var/lib/libvirt/images/LuksDemo.img,\ key-secret=3DLuksDemo.img_encrypt0 diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.ar= gv b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv index fd974f863e..1320e2ee2f 100644 --- a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv +++ b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv @@ -1,7 +1,14 @@ -qemu-img create -f qcow2 \ +qemu-img \ +create \ +-f qcow2 \ -o compat=3D0.10 /var/lib/libvirt/images/sparse-qcow2.img 1073741824K -qemu-img convert --image-opts -n --target-image-opts \ ---object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/inputSecretFil= e \ -driver=3Dluks,file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ -key-secret=3DOtherDemo.img_encrypt0 \ -driver=3Dqcow2,file.filename=3D/var/lib/libvirt/images/sparse-qcow2.img +qemu-img \ +convert \ +--image-opts \ +-n \ +--target-image-opts \ +--object secret,id=3DOtherDemo.img_encrypt0,\ +file=3D/path/to/inputSecretFile driver=3Dluks,\ +file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ +key-secret=3DOtherDemo.img_encrypt0 driver=3Dqcow2,\ +file.filename=3D/var/lib/libvirt/images/sparse-qcow2.img diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv= b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv index 82473db57b..e140850217 100644 --- a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv +++ b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv @@ -1,7 +1,13 @@ -qemu-img create -f raw \ -/var/lib/libvirt/images/sparse.img 1073741824K -qemu-img convert --image-opts -n --target-image-opts \ ---object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/inputSecretFil= e \ -driver=3Dluks,file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ -key-secret=3DOtherDemo.img_encrypt0 \ -driver=3Draw,file.filename=3D/var/lib/libvirt/images/sparse.img +qemu-img \ +create \ +-f raw /var/lib/libvirt/images/sparse.img 1073741824K +qemu-img \ +convert \ +--image-opts \ +-n \ +--target-image-opts \ +--object secret,id=3DOtherDemo.img_encrypt0,\ +file=3D/path/to/inputSecretFile driver=3Dluks,\ +file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ +key-secret=3DOtherDemo.img_encrypt0 driver=3Draw,\ +file.filename=3D/var/lib/libvirt/images/sparse.img diff --git a/tests/storagevolxml2argvdata/luks-convert-qcow2.argv b/tests/s= toragevolxml2argvdata/luks-convert-qcow2.argv index 9124f5f27c..78cd9a2a8d 100644 --- a/tests/storagevolxml2argvdata/luks-convert-qcow2.argv +++ b/tests/storagevolxml2argvdata/luks-convert-qcow2.argv @@ -1,9 +1,16 @@ -qemu-img create -f luks \ +qemu-img \ +create \ +-f luks \ --object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ --o key-secret=3DOtherDemo.img_encrypt0 \ -/var/lib/libvirt/images/OtherDemo.img 5242880K -qemu-img convert --image-opts -n --target-image-opts \ ---object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ -driver=3Dqcow2,file.filename=3D/var/lib/libvirt/images/sparse-qcow2.img \ -driver=3Dluks,file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ +-o key-secret=3DOtherDemo.img_encrypt0 /var/lib/libvirt/images/OtherDemo.i= mg \ +5242880K +qemu-img \ +convert \ +--image-opts \ +-n \ +--target-image-opts \ +--object secret,id=3DOtherDemo.img_encrypt0,\ +file=3D/path/to/secretFile driver=3Dqcow2,\ +file.filename=3D/var/lib/libvirt/images/sparse-qcow2.img driver=3Dluks,\ +file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ key-secret=3DOtherDemo.img_encrypt0 diff --git a/tests/storagevolxml2argvdata/luks-convert.argv b/tests/storage= volxml2argvdata/luks-convert.argv index 6bac814300..e4a8277d7f 100644 --- a/tests/storagevolxml2argvdata/luks-convert.argv +++ b/tests/storagevolxml2argvdata/luks-convert.argv @@ -1,9 +1,15 @@ -qemu-img create -f luks \ +qemu-img \ +create \ +-f luks \ --object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ --o key-secret=3DOtherDemo.img_encrypt0 \ -/var/lib/libvirt/images/OtherDemo.img 5242880K -qemu-img convert --image-opts -n --target-image-opts \ ---object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ -driver=3Draw,file.filename=3D/var/lib/libvirt/images/sparse.img \ -driver=3Dluks,file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ +-o key-secret=3DOtherDemo.img_encrypt0 /var/lib/libvirt/images/OtherDemo.i= mg \ +5242880K +qemu-img \ +convert \ +--image-opts \ +-n \ +--target-image-opts \ +--object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile dri= ver=3Draw,\ +file.filename=3D/var/lib/libvirt/images/sparse.img driver=3Dluks,\ +file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ key-secret=3DOtherDemo.img_encrypt0 diff --git a/tests/storagevolxml2argvdata/luks.argv b/tests/storagevolxml2a= rgvdata/luks.argv index 336238ecab..5013c8ca7f 100644 --- a/tests/storagevolxml2argvdata/luks.argv +++ b/tests/storagevolxml2argvdata/luks.argv @@ -1,4 +1,6 @@ -qemu-img create -f luks \ +qemu-img \ +create \ +-f luks \ --object secret,id=3DLuksDemo.img_encrypt0,file=3D/path/to/secretFile \ --o key-secret=3DLuksDemo.img_encrypt0 \ -/var/lib/libvirt/images/LuksDemo.img 5242880K +-o key-secret=3DLuksDemo.img_encrypt0 /var/lib/libvirt/images/LuksDemo.img= \ +5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-1.1.argv b/tests/storagevol= xml2argvdata/qcow2-1.1.argv index 71ff67378e..5ee974afe9 100644 --- a/tests/storagevolxml2argvdata/qcow2-1.1.argv +++ b/tests/storagevolxml2argvdata/qcow2-1.1.argv @@ -1,3 +1,5 @@ -qemu-img create -f qcow2 -b /dev/null \ --o backing_fmt=3Draw,compat=3D1.1 \ -/var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img \ +create \ +-f qcow2 \ +-b /dev/null \ +-o backing_fmt=3Draw,compat=3D1.1 /var/lib/libvirt/images/OtherDemo.img 52= 42880K diff --git a/tests/storagevolxml2argvdata/qcow2-compat.argv b/tests/storage= volxml2argvdata/qcow2-compat.argv index fcb6bed782..3071d7a790 100644 --- a/tests/storagevolxml2argvdata/qcow2-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-compat.argv @@ -1,3 +1,5 @@ -qemu-img create -f qcow2 -b /dev/null \ --o backing_fmt=3Draw,compat=3D0.10 \ -/var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img \ +create \ +-f qcow2 \ +-b /dev/null \ +-o backing_fmt=3Draw,compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img 5= 242880K diff --git a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv b/= tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv index f99717ad40..1971da200d 100644 --- a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv @@ -1,3 +1,5 @@ -qemu-img convert -f raw -O qcow2 \ --o compat=3D0.10 \ -/dev/HostVG/Swap /var/lib/libvirt/images/OtherDemo.img +qemu-img \ +convert \ +-f raw \ +-O qcow2 \ +-o compat=3D0.10 /dev/HostVG/Swap /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-lazy.argv b/tests/storagevo= lxml2argvdata/qcow2-lazy.argv index c3c09cefef..2621b01168 100644 --- a/tests/storagevolxml2argvdata/qcow2-lazy.argv +++ b/tests/storagevolxml2argvdata/qcow2-lazy.argv @@ -1,3 +1,6 @@ -qemu-img create -f qcow2 -b /dev/null \ --o backing_fmt=3Draw,compat=3D1.1,lazy_refcounts \ -/var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img \ +create \ +-f qcow2 \ +-b /dev/null \ +-o backing_fmt=3Draw,compat=3D1.1,\ +lazy_refcounts /var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-= compat.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc= -compat.argv index f3e230654b..87489641d5 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.= argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.= argv @@ -1,3 +1,7 @@ -qemu-img convert -f raw -O qcow2 \ --o preallocation=3Dmetadata,compat=3D0.10 \ -/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img +qemu-img \ +convert \ +-f raw \ +-O qcow2 \ +-o preallocation=3Dmetadata,\ +compat=3D0.10 /var/lib/libvirt/images/sparse.img \ +/var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.a= rgv b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv index 841d683965..a883030744 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv @@ -1,3 +1,5 @@ -qemu-img create -f qcow2 \ --o preallocation=3Dmetadata,compat=3D0.10 \ -/var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img \ +create \ +-f qcow2 \ +-o preallocation=3Dmetadata,\ +compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc= .argv b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv index 22dd9381a4..049d2d73b5 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv @@ -1,4 +1,7 @@ -qemu-img convert -f raw -O qcow2 \ --o preallocation=3Dfalloc,compat=3D0.10 \ -/var/lib/libvirt/images/sparse.img \ +qemu-img \ +convert \ +-f raw \ +-O qcow2 \ +-o preallocation=3Dfalloc,\ +compat=3D0.10 /var/lib/libvirt/images/sparse.img \ /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv b/tests/sto= ragevolxml2argvdata/qcow2-nocapacity.argv index a922d12042..30bcfb00c7 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocapacity.argv @@ -1,5 +1,5 @@ -qemu-img create \ +qemu-img \ +create \ -f qcow2 \ -b /dev/null \ --o backing_fmt=3Draw,compat=3D0.10 \ -/var/lib/libvirt/images/OtherDemo.img +-o backing_fmt=3Draw,compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv b/tests/s= toragevolxml2argvdata/qcow2-nocow-compat.argv index 826001f73b..5e327dab0b 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv @@ -1,3 +1,6 @@ -qemu-img create -f qcow2 -b /dev/null \ --o backing_fmt=3Draw,nocow=3Don,compat=3D0.10 \ -/var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img \ +create \ +-f qcow2 \ +-b /dev/null \ +-o backing_fmt=3Draw,nocow=3Don,\ +compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-nocow.argv b/tests/storagev= olxml2argvdata/qcow2-nocow.argv index e54801c78a..74eaa89835 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocow.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocow.argv @@ -1,3 +1,6 @@ -qemu-img create -f qcow2 -b /dev/null \ --o backing_fmt=3Draw,encryption=3Don,nocow=3Don \ -/var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img \ +create \ +-f qcow2 \ +-b /dev/null \ +-o backing_fmt=3Draw,encryption=3Don,\ +nocow=3Don /var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv b/tests/s= toragevolxml2argvdata/qcow2-zerocapacity.argv index 45894931ae..95dfc65d9b 100644 --- a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv +++ b/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv @@ -1 +1,4 @@ -qemu-img create -f qcow2 -o compat=3D0.10 /var/lib/libvirt/images/OtherDem= o.img 0K +qemu-img \ +create \ +-f qcow2 \ +-o compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img 0K --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1613057925; cv=none; d=zohomail.com; s=zohoarc; b=dzmS5P+zuRFq3AS9nDyPJTWfqHDrFa97v/waf6kxT4CYel0RN8ij5j5Sbj++XA8qdSBeUVK4aZWerN/rlAekZBPy2jgzstMJuuoqUel4FDj59lt6oaggdDi8Yv3xt8VLv5gIsXoqhO1D57DURQTkABqDcYk4eYmQSdngERiFFSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057925; 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=282abdpOPSvsQgQ35LB59sOd7myGuWIA26KBVuH6/N4=; b=BsG9Sd3twslSiyYaw0sJHt1P3PckInqvR1ZGYZqIyrEbWiEPBX6+0rXc/P9ogqRFZm5B83oJSV6A4QBh0T9+U2Auc2vzrZb36ZG7Kzlyssi92RS1Ul3b84e0T4JiNGFSH6lmSZZ4YOdsQ2Z3sK/zObw3tAb88DjmL/diDbtjNE4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1613057924808377.2084364583179; Thu, 11 Feb 2021 07:38:44 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-HkW3ZJ-UNc-EP9vlpx7PeQ-1; Thu, 11 Feb 2021 10:38:41 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2067C19611AE; Thu, 11 Feb 2021 15:38:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EFC5E5C1BD; Thu, 11 Feb 2021 15:38:28 +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 B4DCC57DFD; Thu, 11 Feb 2021 15:38:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcDcP019152 for ; Thu, 11 Feb 2021 10:38:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8291C5D767; Thu, 11 Feb 2021 15:38:13 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id D90105D74F for ; Thu, 11 Feb 2021 15:38:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057923; 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=282abdpOPSvsQgQ35LB59sOd7myGuWIA26KBVuH6/N4=; b=agdplEBeRWxwNlhSYO3fudVGeOwMWzlwWp6/+wmsyhdaqeifetM/GiAZPLrSb58MnoYcez BnvRcdMQQQvZkbRaJTnS2u2L3WCaG0ElkOzopan0wWlPxfVZxrLuZHjthrpMfwutV9qPyS 3e+bNniHGLg1ACPNMicXKBkHj40keRI= X-MC-Unique: HkW3ZJ-UNc-EP9vlpx7PeQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/19] storage: Format qcow2v3 volumes by default Date: Thu, 11 Feb 2021 16:37:47 +0100 Message-Id: <4dac94e44d9a9bf44b393e79e82449dfabad823a.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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) Content-Type: text/plain; charset="utf-8" Format the new volumes with 'compat=3D1.1' since the minimum supported qemu version is now 1.5 rather the pre-historic compat=3D0.10. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/storage/storage_util.c | 2 +- .../storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv | 2 +- tests/storagevolxml2argvdata/qcow2-compat.argv | 2 +- tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv | 2 +- tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv | 2 +- .../qcow2-luks-convert-encrypt2fileqcow2.argv | 2 +- tests/storagevolxml2argvdata/qcow2-luks.argv | 2 +- .../qcow2-nobacking-convert-prealloc-compat.argv | 2 +- .../storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv | 2 +- .../qcow2-nocapacity-convert-prealloc.argv | 2 +- tests/storagevolxml2argvdata/qcow2-nocapacity.argv | 2 +- tests/storagevolxml2argvdata/qcow2-nocow-compat.argv | 2 +- tests/storagevolxml2argvdata/qcow2-zerocapacity.argv | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index b5adb05826..6d8dd3cc16 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -777,7 +777,7 @@ storageBackendCreateQemuImgOpts(virStorageEncryptionInf= oDefPtr encinfo, if (info->compat) virBufferAsprintf(&buf, "compat=3D%s,", info->compat); else if (info->format =3D=3D VIR_STORAGE_FILE_QCOW2) - virBufferAddLit(&buf, "compat=3D0.10,"); + virBufferAddLit(&buf, "compat=3D1.1,"); if (info->features && info->format =3D=3D VIR_STORAGE_FILE_QCOW2) { if (virBitmapIsBitSet(info->features, diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.ar= gv b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv index 1320e2ee2f..c313a04fb3 100644 --- a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv +++ b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv @@ -1,7 +1,7 @@ qemu-img \ create \ -f qcow2 \ --o compat=3D0.10 /var/lib/libvirt/images/sparse-qcow2.img 1073741824K +-o compat=3D1.1 /var/lib/libvirt/images/sparse-qcow2.img 1073741824K qemu-img \ convert \ --image-opts \ diff --git a/tests/storagevolxml2argvdata/qcow2-compat.argv b/tests/storage= volxml2argvdata/qcow2-compat.argv index 3071d7a790..5ee974afe9 100644 --- a/tests/storagevolxml2argvdata/qcow2-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-compat.argv @@ -2,4 +2,4 @@ qemu-img \ create \ -f qcow2 \ -b /dev/null \ --o backing_fmt=3Draw,compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img 5= 242880K +-o backing_fmt=3Draw,compat=3D1.1 /var/lib/libvirt/images/OtherDemo.img 52= 42880K diff --git a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv b/= tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv index 1971da200d..dcafffc3a4 100644 --- a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv @@ -2,4 +2,4 @@ qemu-img \ convert \ -f raw \ -O qcow2 \ --o compat=3D0.10 /dev/HostVG/Swap /var/lib/libvirt/images/OtherDemo.img +-o compat=3D1.1 /dev/HostVG/Swap /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv b= /tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv index de8aef4233..891746d921 100644 --- a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv +++ b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv @@ -3,7 +3,7 @@ create \ -f qcow2 \ --object secret,id=3DOtherDemoLuks.img_encrypt0,file=3D/path/to/secretFile= \ -o encrypt.format=3Dluks,encrypt.key-secret=3DOtherDemoLuks.img_encrypt0,\ -compat=3D0.10 /var/lib/libvirt/images/OtherDemoLuks.img 5242880K +compat=3D1.1 /var/lib/libvirt/images/OtherDemoLuks.img 5242880K qemu-img \ convert \ --image-opts \ diff --git a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqc= ow2.argv b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow= 2.argv index 517156ca83..fc9c4ab825 100644 --- a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv +++ b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv @@ -1,7 +1,7 @@ qemu-img \ create \ -f qcow2 \ --o compat=3D0.10 /var/lib/libvirt/images/sparse-qcow2.img 1073741824K +-o compat=3D1.1 /var/lib/libvirt/images/sparse-qcow2.img 1073741824K qemu-img \ convert \ --image-opts \ diff --git a/tests/storagevolxml2argvdata/qcow2-luks.argv b/tests/storagevo= lxml2argvdata/qcow2-luks.argv index 4b51b374ca..c0568e10e3 100644 --- a/tests/storagevolxml2argvdata/qcow2-luks.argv +++ b/tests/storagevolxml2argvdata/qcow2-luks.argv @@ -5,4 +5,4 @@ create \ --object secret,id=3DOtherDemoLuks.img_encrypt0,file=3D/path/to/secretFile= \ -o backing_fmt=3Draw,encrypt.format=3Dluks,\ encrypt.key-secret=3DOtherDemoLuks.img_encrypt0,\ -compat=3D0.10 /var/lib/libvirt/images/OtherDemoLuks.img 5242880K +compat=3D1.1 /var/lib/libvirt/images/OtherDemoLuks.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-= compat.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc= -compat.argv index 87489641d5..c237ab0cc9 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.= argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.= argv @@ -3,5 +3,5 @@ convert \ -f raw \ -O qcow2 \ -o preallocation=3Dmetadata,\ -compat=3D0.10 /var/lib/libvirt/images/sparse.img \ +compat=3D1.1 /var/lib/libvirt/images/sparse.img \ /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.a= rgv b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv index a883030744..fa83143b5e 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv @@ -2,4 +2,4 @@ qemu-img \ create \ -f qcow2 \ -o preallocation=3Dmetadata,\ -compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img 5242880K +compat=3D1.1 /var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc= .argv b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv index 049d2d73b5..f62da6fabe 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv @@ -3,5 +3,5 @@ convert \ -f raw \ -O qcow2 \ -o preallocation=3Dfalloc,\ -compat=3D0.10 /var/lib/libvirt/images/sparse.img \ +compat=3D1.1 /var/lib/libvirt/images/sparse.img \ /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv b/tests/sto= ragevolxml2argvdata/qcow2-nocapacity.argv index 30bcfb00c7..d696af60d7 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocapacity.argv @@ -2,4 +2,4 @@ qemu-img \ create \ -f qcow2 \ -b /dev/null \ --o backing_fmt=3Draw,compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img +-o backing_fmt=3Draw,compat=3D1.1 /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv b/tests/s= toragevolxml2argvdata/qcow2-nocow-compat.argv index 5e327dab0b..b5d18ccc12 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv @@ -3,4 +3,4 @@ create \ -f qcow2 \ -b /dev/null \ -o backing_fmt=3Draw,nocow=3Don,\ -compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img 5242880K +compat=3D1.1 /var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv b/tests/s= toragevolxml2argvdata/qcow2-zerocapacity.argv index 95dfc65d9b..bc6e5ee758 100644 --- a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv +++ b/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv @@ -1,4 +1,4 @@ qemu-img \ create \ -f qcow2 \ --o compat=3D0.10 /var/lib/libvirt/images/OtherDemo.img 0K +-o compat=3D1.1 /var/lib/libvirt/images/OtherDemo.img 0K --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613058014; cv=none; d=zohomail.com; s=zohoarc; b=aK52ZvB907nayN5e1q9hYmlnfIOhWKS7yG7syvaEIzucUe2gfCHHf/JZZymCtIhdKT9VJPJYgbqcOLJaumyP64JTedf7mguL2MxaJrEz0kxr9P+8ujjiQbh//q/OQr9pPFeuxftbxPmfH4NAXdgnuKYzOgmVHNOZ5ucQvIQgzF0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613058014; 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=X2Ewh/DnjXul0y+AIDr6sDaSowHd8FSeXLsYet8gErU=; b=O7dZ5Vrujdx6TrEIyg0UyDTcCClTALY4L8zWS7GXc3J0JuvgHvKj6/nxogAgaf/ISSBS9ZurE2Eh/jCkFDkFnUmeXOA+5xlIvHo7Q27P32o7xALaNUDXXmXyqg7vnYp4+V9pujr1K1y5q9MS2y6QPdLMjsGh4id1uml4nSfcRsk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 161305801381566.55610413597981; Thu, 11 Feb 2021 07:40:13 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-SogGCwj6P6eL4yAuZDGjpg-1; Thu, 11 Feb 2021 10:38:46 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1A26119611AF; Thu, 11 Feb 2021 15:38:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA1DD60C0F; Thu, 11 Feb 2021 15:38:34 +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 AEAAB5807E; Thu, 11 Feb 2021 15:38:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcEWT019166 for ; Thu, 11 Feb 2021 10:38:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9B41D5D767; Thu, 11 Feb 2021 15:38:14 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id E63875D74F for ; Thu, 11 Feb 2021 15:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613058012; 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=X2Ewh/DnjXul0y+AIDr6sDaSowHd8FSeXLsYet8gErU=; b=ImpRr2xfdg1A2cbJys0dN8V69r+cC9r9/aAhOhEscGcPng+YYMZ8Bp3pE87pdUf0jjeRS2 Ve0YXVUlaNAfRvVQLP6IzaenlW0b7lgFSmjfIjE6hNmnOYEHIBv7Nu6sgIJwhHIEeE9fR0 XHOv/oC2OE+ACKEUL125VoCOa33JhhY= X-MC-Unique: SogGCwj6P6eL4yAuZDGjpg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 09/19] qemu: monitor: Introduce qemuMonitorBitmapRemove Date: Thu, 11 Feb 2021 16:37:48 +0100 Message-Id: <18c1760c058dc83724afd19adca585a6d0642987.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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) Content-Type: text/plain; charset="utf-8" The non-transaction wrapper is useful for code paths which want to delete individual bitmaps or for cleanup after a failed job where we want to attempt to delete every bitmap individually to prevent a failure from cleaning up the rest. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/qemu/qemu_monitor.c | 13 +++++++++++++ src/qemu/qemu_monitor.h | 5 +++++ src/qemu/qemu_monitor_json.c | 24 ++++++++++++++++++++++++ src/qemu/qemu_monitor_json.h | 6 ++++++ tests/qemumonitorjsontest.c | 2 ++ 5 files changed, 50 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 14966d4096..2fb7d6569b 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4645,6 +4645,19 @@ qemuMonitorTransactionBitmapRemove(virJSONValuePtr a= ctions, } +int +qemuMonitorBitmapRemove(qemuMonitorPtr mon, + const char *node, + const char *name) +{ + VIR_DEBUG("node=3D'%s', name=3D'%s'", node, name); + + QEMU_CHECK_MONITOR(mon); + + return qemuMonitorJSONBitmapRemove(mon, node, name); +} + + int qemuMonitorTransactionBitmapEnable(virJSONValuePtr actions, const char *node, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 7a039641ba..544611b443 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1478,6 +1478,11 @@ int qemuMonitorTransactionBitmapRemove(virJSONValuePtr actions, const char *node, const char *name); + +int +qemuMonitorBitmapRemove(qemuMonitorPtr mon, + const char *node, + const char *name); int qemuMonitorTransactionBitmapEnable(virJSONValuePtr actions, const char *node, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 65c30e3bb4..f19bb589b2 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -9253,6 +9253,30 @@ qemuMonitorJSONTransactionBitmapRemove(virJSONValueP= tr actions, } +int +qemuMonitorJSONBitmapRemove(qemuMonitorPtr mon, + const char *node, + const char *name) +{ + g_autoptr(virJSONValue) cmd =3D NULL; + g_autoptr(virJSONValue) reply =3D NULL; + + if (!(cmd =3D qemuMonitorJSONMakeCommand("block-dirty-bitmap-remove", + "s:node", node, + "s:name", name, + NULL))) + return -1; + + if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) + return -1; + + if (qemuMonitorJSONCheckError(cmd, reply) < 0) + return -1; + + return 0; +} + + int qemuMonitorJSONTransactionBitmapEnable(virJSONValuePtr actions, const char *node, diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index ba1531fee8..8e2ab24a59 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -659,6 +659,12 @@ int qemuMonitorJSONTransactionBitmapRemove(virJSONValuePtr actions, const char *node, const char *name); + +int +qemuMonitorJSONBitmapRemove(qemuMonitorPtr mon, + const char *node, + const char *name); + int qemuMonitorJSONTransactionBitmapEnable(virJSONValuePtr actions, const char *node, diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 956423f10f..af02c0b0e6 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1215,6 +1215,7 @@ GEN_TEST_FUNC(qemuMonitorJSONBlockdevTrayOpen, "foode= v", true) GEN_TEST_FUNC(qemuMonitorJSONBlockdevTrayClose, "foodev") GEN_TEST_FUNC(qemuMonitorJSONBlockdevMediumRemove, "foodev") GEN_TEST_FUNC(qemuMonitorJSONBlockdevMediumInsert, "foodev", "newnode") +GEN_TEST_FUNC(qemuMonitorJSONBitmapRemove, "foodev", "newnode") GEN_TEST_FUNC(qemuMonitorJSONJobDismiss, "jobname") GEN_TEST_FUNC(qemuMonitorJSONJobCancel, "jobname", false) GEN_TEST_FUNC(qemuMonitorJSONJobComplete, "jobname") @@ -3132,6 +3133,7 @@ mymain(void) DO_TEST_GEN(qemuMonitorJSONBlockdevTrayClose); DO_TEST_GEN(qemuMonitorJSONBlockdevMediumRemove); DO_TEST_GEN(qemuMonitorJSONBlockdevMediumInsert); + DO_TEST_GEN(qemuMonitorJSONBitmapRemove); DO_TEST_GEN(qemuMonitorJSONJobDismiss); DO_TEST_GEN(qemuMonitorJSONJobCancel); DO_TEST_GEN(qemuMonitorJSONJobComplete); --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613057930; cv=none; d=zohomail.com; s=zohoarc; b=DyVVKsMWD7KtsTihh+bnd2hrGHWVv1DpW3cy67HJK+e9CIT9evd4Itf/dGMVEEXaJZVf2zqnTIy68il2eNJCeW0mcWweGR1wg6TWScr6AXZS3u6864r2uwalmnrw8FkICLDn4ryiVA6u0CqEBM/iblMWGUsYsuDiEE0ta8LnuhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057930; 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=C07Yt5u8KMEOMfE3yj9Si9obUFAVk1aiMxH8/yhj7lI=; b=g6E7UtHZY381t76rRG/r1oE4730qW3CKXjMCBZ7dtlGFjlhMmKLRfIEWHKNpigZQKtHkxlBhDDPFELQcC5yKlOoXwsHfIxzEZjv5qda4L7x1RnKiZQg/m0gLzGrkfuggwpyzAKeAxGiL/+IH42T5Wqf13W1zS2QwphN6xp6VSe4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 161305793025021.50804271099628; Thu, 11 Feb 2021 07:38:50 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-412-CctPwR7cNy2tvh4nIiRVsg-1; Thu, 11 Feb 2021 10:38:45 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E05680196C; Thu, 11 Feb 2021 15:38:38 +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 2B80E60C47; Thu, 11 Feb 2021 15:38:38 +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 E736218077BA; Thu, 11 Feb 2021 15:38:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcF5M019179 for ; Thu, 11 Feb 2021 10:38:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id B39B85D767; Thu, 11 Feb 2021 15:38:15 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B2985D74F for ; Thu, 11 Feb 2021 15:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057929; 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=C07Yt5u8KMEOMfE3yj9Si9obUFAVk1aiMxH8/yhj7lI=; b=OVt296qnWj9ee5hPv9qxTSTiSRFGmLppzXJvsJmf1wMuKjBGwkmw7Gf7Gq1XLhGe/Zt6Bw I/y8IfxPhUpMZqNYHaVyEKLCmddWXwBnK2X+47dT4L6qnJENUS2dDN9cgLR5W2360GkFMk SpnqH7DgzYzCIc3TNq9PRfgq5vbDcy8= X-MC-Unique: CctPwR7cNy2tvh4nIiRVsg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/19] qemu: blockjob: Use qemuMonitorBitmapRemove for single bitmap removal Date: Thu, 11 Feb 2021 16:37:49 +0100 Message-Id: <4bc2af4d1fa6a224879a5c1bbb9d743cc1b9b746.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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) Content-Type: text/plain; charset="utf-8" There's no need in the cleanup steps to invoke a transaction to delete a single bitmap. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/qemu/qemu_blockjob.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 582fe45c66..aa065b1319 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -1420,7 +1420,6 @@ qemuBlockJobProcessEventFailedActiveCommit(virQEMUDri= verPtr driver, qemuDomainAsyncJob asyncJob) { qemuDomainObjPrivatePtr priv =3D vm->privateData; - g_autoptr(virJSONValue) actions =3D virJSONValueNewArray(); virDomainDiskDefPtr disk =3D job->disk; VIR_DEBUG("active commit job '%s' on VM '%s' failed", job->name, vm->d= ef->name); @@ -1428,13 +1427,12 @@ qemuBlockJobProcessEventFailedActiveCommit(virQEMUD= riverPtr driver, if (!disk) return; - ignore_value(qemuMonitorTransactionBitmapRemove(actions, disk->mirror-= >nodeformat, - "libvirt-tmp-activewri= te")); - if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0) return; - qemuMonitorTransaction(priv->mon, &actions); + qemuMonitorBitmapRemove(priv->mon, + disk->mirror->nodeformat, + "libvirt-tmp-activewrite"); if (qemuDomainObjExitMonitor(priv->driver, vm) < 0) return; @@ -1502,7 +1500,6 @@ qemuBlockJobProcessEventConcludedBackup(virQEMUDriver= Ptr driver, unsigned long long progressTotal) { g_autoptr(qemuBlockStorageSourceAttachData) backend =3D NULL; - g_autoptr(virJSONValue) actions =3D NULL; qemuBackupNotifyBlockjobEnd(vm, job->disk, newstate, job->errmsg, progressCurrent, progressTotal, asyncJob); @@ -1511,23 +1508,16 @@ qemuBlockJobProcessEventConcludedBackup(virQEMUDriv= erPtr driver, !(backend =3D qemuBlockStorageSourceDetachPrepare(job->data.backup= .store, NULL))) return; - if (job->data.backup.bitmap) { - actions =3D virJSONValueNewArray(); - - if (qemuMonitorTransactionBitmapRemove(actions, - job->disk->src->nodeformat, - job->data.backup.bitmap) < = 0) - return; - } - if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) return; if (backend) qemuBlockStorageSourceAttachRollback(qemuDomainGetMonitor(vm), bac= kend); - if (actions) - qemuMonitorTransaction(qemuDomainGetMonitor(vm), &actions); + if (job->data.backup.bitmap) + qemuMonitorBitmapRemove(qemuDomainGetMonitor(vm), + job->disk->src->nodeformat, + job->data.backup.bitmap); if (qemuDomainObjExitMonitor(driver, vm) < 0) return; --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613057924; cv=none; d=zohomail.com; s=zohoarc; b=cWrRpvEVFi2gYGZOKHt1aCHFTzjDXSbfkWyvM81C4vTVxolH8ILs6fHn9sO9T20ev4kog5Gjc2SW64b03PE/wg4DphbvqLDdgiEDOLeq7AznCF/A5UzC8zn9C3AfV0JIWAMTBUtVUAi8zaorclIx0bOWI7zWRrhF7y0taTPuG9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057924; 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=XwkpWvCyKF18E4gF+qQfCSJhl4Wkxvq6U/D8NDTxBlM=; b=e2kT1NEpO1wCTLJj9XhRrqjkIIVCT4uBWmWDaeCRpipekMZ/Qp4VQT3N9oX4Hwhc8+aidN2EWvn2NPFWRingBCN6d06u8gm7uGRvCBgvdZmzJN/BvG68jNfc2dwgc57ApU3ax0wh5xJLEdzNH9OBXLiGm7/c7YdXVKZsM2rtZW4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1613057924363728.8576725492641; Thu, 11 Feb 2021 07:38:44 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-248-3d51aqssNLCuZf4hmtgSgQ-1; Thu, 11 Feb 2021 10:38:40 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A9ED879A0D; Thu, 11 Feb 2021 15:38:32 +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 2C1465C290; Thu, 11 Feb 2021 15:38:32 +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 D108B18089D3; Thu, 11 Feb 2021 15:38:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcGvw019187 for ; Thu, 11 Feb 2021 10:38:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id CD90E5D767; Thu, 11 Feb 2021 15:38:16 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 294405D74F for ; Thu, 11 Feb 2021 15:38:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057923; 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=XwkpWvCyKF18E4gF+qQfCSJhl4Wkxvq6U/D8NDTxBlM=; b=C8O8LMzPgESLKLf/bdU/Pbk61vAbNai3gyt+ymN+qOxHleGXolQ6E4L4/ye8pfuLMF5KYy IB/YyL+GqlW+wlP0LB54njKoI4NzBbpMH45mKK5ZJ3hHJEMlRuEVB50lCjv9hBNloussKI N8Wbeq+Iecb/xEicSo0wP/3WXl67rQ4= X-MC-Unique: 3d51aqssNLCuZf4hmtgSgQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 11/19] qemu: migration_params: Add infrastructure for 'dirty-bitmaps' migration feature Date: Thu, 11 Feb 2021 16:37:50 +0100 Message-Id: <827da136e28560fa8e1d0ca9b5d2c651f95e4869.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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) Content-Type: text/plain; charset="utf-8" Add the migration capability flag and the propagation of the corresponding mapping configuration. The mapping will be produced from the bitmaps on disk depending on both sides of the migration and the necessity to perform merges. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_params.c | 24 ++++++++++++++++++++++++ src/qemu/qemu_migration_params.h | 5 +++++ 2 files changed, 29 insertions(+) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index 510dad783a..8f491e0ed2 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -63,6 +63,7 @@ struct _qemuMigrationParams { unsigned long long compMethods; /* bit-wise OR of qemuMigrationCompres= sMethod */ virBitmapPtr caps; qemuMigrationParamValue params[QEMU_MIGRATION_PARAM_LAST]; + virJSONValuePtr blockDirtyBitmapMapping; }; typedef enum { @@ -89,6 +90,7 @@ VIR_ENUM_IMPL(qemuMigrationCapability, "pause-before-switchover", "late-block-activate", "multifd", + "dirty-bitmaps", ); @@ -265,6 +267,7 @@ qemuMigrationParamsFree(qemuMigrationParamsPtr migParam= s) } virBitmapFree(migParams->caps); + virJSONValueFree(migParams->blockDirtyBitmapMapping); g_free(migParams); } @@ -524,6 +527,20 @@ qemuMigrationParamsSetCompression(virTypedParameterPtr= params, } +void +qemuMigrationParamsSetBlockDirtyBitmapMapping(qemuMigrationParamsPtr migPa= rams, + virJSONValuePtr *params) +{ + virJSONValueFree(migParams->blockDirtyBitmapMapping); + migParams->blockDirtyBitmapMapping =3D g_steal_pointer(params); + + if (migParams->blockDirtyBitmapMapping) + ignore_value(virBitmapSetBit(migParams->caps, QEMU_MIGRATION_CAP_B= LOCK_DIRTY_BITMAPS)); + else + ignore_value(virBitmapClearBit(migParams->caps, QEMU_MIGRATION_CAP= _BLOCK_DIRTY_BITMAPS)); +} + + qemuMigrationParamsPtr qemuMigrationParamsFromFlags(virTypedParameterPtr params, int nparams, @@ -747,6 +764,12 @@ qemuMigrationParamsToJSON(qemuMigrationParamsPtr migPa= rams) return NULL; } + if (migParams->blockDirtyBitmapMapping && + virJSONValueObjectAppend(params, "block-bitmap-mapping", + migParams->blockDirtyBitmapMapping) < 0) + return NULL; + migParams->blockDirtyBitmapMapping =3D NULL; + return g_steal_pointer(¶ms); } @@ -1202,6 +1225,7 @@ qemuMigrationParamsReset(virQEMUDriverPtr driver, goto cleanup; qemuMigrationParamsResetTLS(driver, vm, asyncJob, origParams, apiFlags= ); + /* We don't reset 'block-bitmap-mapping' as it can't be unset */ cleanup: virErrorRestore(&err); diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_par= ams.h index 9876101bfc..f1db42ce94 100644 --- a/src/qemu/qemu_migration_params.h +++ b/src/qemu/qemu_migration_params.h @@ -39,6 +39,7 @@ typedef enum { QEMU_MIGRATION_CAP_PAUSE_BEFORE_SWITCHOVER, QEMU_MIGRATION_CAP_LATE_BLOCK_ACTIVATE, QEMU_MIGRATION_CAP_MULTIFD, + QEMU_MIGRATION_CAP_BLOCK_DIRTY_BITMAPS, QEMU_MIGRATION_CAP_LAST } qemuMigrationCapability; @@ -132,6 +133,10 @@ qemuMigrationParamsGetULL(qemuMigrationParamsPtr migPa= rams, qemuMigrationParam param, unsigned long long *value); +void +qemuMigrationParamsSetBlockDirtyBitmapMapping(qemuMigrationParamsPtr migPa= rams, + virJSONValuePtr *params); + int qemuMigrationParamsCheck(virQEMUDriverPtr driver, virDomainObjPtr vm, --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1613057925; cv=none; d=zohomail.com; s=zohoarc; b=h16B7Q/cVB6Vhz8Mg9GGIM7TS81/mnyFm9H6/2a5QNHbZwjI+D7rwS9qEDXFiDdr1CwdZIC+krO9VoQgQM3tef59sDn1zuPEtEoYdCHwFejvYJg8m4S6kgnh3QEj/gqD+XOpOdNP2CwHTxTQeSYE7SX1y70DrrcTGlVg6U8EKds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057925; 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=UJPsGnhD7ljDkrBM6N1IFnYwNPpxbBfo1NJQxoceHBQ=; b=KR964p5exZODhz7a6IUaoHCNWzV4EhQQKDf5yrGqefohol+UgSSIMPSWT08+H25Asb9ZTUyF91uJvjtwt16isKo2O/qukwgP7DxEEM7bbupvyApb+lQdZAHHBx55qeheyBREyPLnBfsVZlYPOv6o2ch5z5hW34c3KnnugpOMXCo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1613057924593217.95413323689866; Thu, 11 Feb 2021 07:38:44 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-hnGQGs4HM2-73wwPwCseXw-1; Thu, 11 Feb 2021 10:38:37 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 584E3107ACC7; Thu, 11 Feb 2021 15:38:31 +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 2F06E5D6B1; Thu, 11 Feb 2021 15:38:31 +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 E665918089D2; Thu, 11 Feb 2021 15:38:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcH9E019203 for ; Thu, 11 Feb 2021 10:38:17 -0500 Received: by smtp.corp.redhat.com (Postfix) id DF36C5D767; Thu, 11 Feb 2021 15:38:17 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 490F45D74F for ; Thu, 11 Feb 2021 15:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057923; 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=UJPsGnhD7ljDkrBM6N1IFnYwNPpxbBfo1NJQxoceHBQ=; b=FW1BzwDR4xFsDIgdqHSDhWzZnr/VZIozqB6D+UPnBDc8mCPfsoQ2mqXs8INE6/0UO/p6Ck mLb2I9RjPJHf+Xv63gNNyASoZYyuuIseCb0GLMLOU8T2bOaMD+EiTlnMyCOB5XGTHNJKWs vWFSW/qSSLa1aa0w6g03REV65fm8KV0= X-MC-Unique: hnGQGs4HM2-73wwPwCseXw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 12/19] qemu: migration_cookie: Add XML handling for setting up bitmap migration Date: Thu, 11 Feb 2021 16:37:51 +0100 Message-Id: <3ba5864a1d10d7f5ae5991089551dac4e7c85754.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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) Content-Type: text/plain; charset="utf-8" In cases where we are copying the storage we need to ensure that also bitmaps are copied properly. This patch adds migration cookie XML infrastructure which will allow the migration sides reach consensus on which bitmaps to migrate. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/qemu/qemu_migration_cookie.c | 134 +++++++++++++++++++++++++++++++ src/qemu/qemu_migration_cookie.h | 34 ++++++++ 2 files changed, 168 insertions(+) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index 6f2b1b2f57..94ba9c83d0 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -51,6 +51,7 @@ VIR_ENUM_IMPL(qemuMigrationCookieFlag, "cpu", "allowReboot", "capabilities", + "block-dirty-bitmaps", ); @@ -116,6 +117,39 @@ qemuMigrationCookieCapsFree(qemuMigrationCookieCapsPtr= caps) G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMigrationCookieCaps, qemuMigrationCookieCapsFree); +static void +qemuMigrationBlockDirtyBitmapsDiskBitmapFree(qemuMigrationBlockDirtyBitmap= sDiskBitmapPtr bmp) +{ + if (!bmp) + return; + + g_free(bmp->bitmapname); + g_free(bmp->alias); + g_free(bmp->sourcebitmap); + g_free(bmp); +} + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMigrationBlockDirtyBitmapsDiskBitmap, + qemuMigrationBlockDirtyBitmapsDiskBitmapFree= ); + + +static void +qemuMigrationBlockDirtyBitmapsDiskFree(qemuMigrationBlockDirtyBitmapsDiskP= tr dsk) +{ + if (!dsk) + return; + + g_free(dsk->target); + if (dsk->bitmaps) + g_slist_free_full(dsk->bitmaps, + (GDestroyNotify) qemuMigrationBlockDirtyBitmapsD= iskBitmapFree); + g_free(dsk); +} + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMigrationBlockDirtyBitmapsDisk, + qemuMigrationBlockDirtyBitmapsDiskFree); + + void qemuMigrationCookieFree(qemuMigrationCookiePtr mig) { @@ -135,6 +169,9 @@ qemuMigrationCookieFree(qemuMigrationCookiePtr mig) g_clear_pointer(&mig->jobInfo, qemuDomainJobInfoFree); virCPUDefFree(mig->cpu); qemuMigrationCookieCapsFree(mig->caps); + if (mig->blockDirtyBitmaps) + g_slist_free_full(mig->blockDirtyBitmaps, + (GDestroyNotify) qemuMigrationBlockDirtyBitmapsD= iskFree); g_free(mig); } @@ -758,6 +795,48 @@ qemuMigrationCookieNBDXMLFormat(qemuMigrationCookieNBD= Ptr nbd, } +static void +qemuMigrationCookieBlockDirtyBitmapsFormat(virBufferPtr buf, + GSList *bitmaps) +{ + g_auto(virBuffer) disksBuf =3D VIR_BUFFER_INIT_CHILD(buf); + GSList *nextdisk; + + for (nextdisk =3D bitmaps; nextdisk; nextdisk =3D nextdisk->next) { + qemuMigrationBlockDirtyBitmapsDiskPtr disk =3D nextdisk->data; + g_auto(virBuffer) diskAttrBuf =3D VIR_BUFFER_INITIALIZER; + g_auto(virBuffer) diskChildBuf =3D VIR_BUFFER_INIT_CHILD(&disksBuf= ); + bool hasBitmaps =3D false; + GSList *nextbitmap; + + if (disk->skip || !disk->bitmaps) + continue; + + for (nextbitmap =3D disk->bitmaps; nextbitmap; nextbitmap =3D next= bitmap->next) { + qemuMigrationBlockDirtyBitmapsDiskBitmapPtr bitmap =3D nextbit= map->data; + + if (bitmap->skip) + continue; + + virBufferAsprintf(&diskChildBuf, + "\n", + bitmap->bitmapname, bitmap->alias); + + hasBitmaps =3D true; + } + + if (!hasBitmaps) + continue; + + virBufferAsprintf(&diskAttrBuf, " target=3D'%s'", disk->target); + virXMLFormatElement(&disksBuf, "disk", &diskAttrBuf, &diskChildBuf= ); + } + + + virXMLFormatElement(buf, "blockDirtyBitmaps", NULL, &disksBuf); +} + + int qemuMigrationCookieXMLFormat(virQEMUDriverPtr driver, virQEMUCapsPtr qemuCaps, @@ -829,6 +908,9 @@ qemuMigrationCookieXMLFormat(virQEMUDriverPtr driver, if (mig->flags & QEMU_MIGRATION_COOKIE_CAPS) qemuMigrationCookieCapsXMLFormat(buf, mig->caps); + if (mig->flags & QEMU_MIGRATION_COOKIE_BLOCK_DIRTY_BITMAPS) + qemuMigrationCookieBlockDirtyBitmapsFormat(buf, mig->blockDirtyBit= maps); + virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); return 0; @@ -1132,6 +1214,53 @@ qemuMigrationCookieXMLParseMandatoryFeatures(xmlXPat= hContextPtr ctxt, } +static int +qemuMigrationCookieBlockDirtyBitmapsParse(xmlXPathContextPtr ctxt, + qemuMigrationCookiePtr mig) +{ + g_autoslist(qemuMigrationBlockDirtyBitmapsDisk) disks =3D NULL; + g_autofree xmlNodePtr *disknodes =3D NULL; + int ndisknodes; + size_t i; + VIR_XPATH_NODE_AUTORESTORE(ctxt) + + if ((ndisknodes =3D virXPathNodeSet("./blockDirtyBitmaps/disk", ctxt, = &disknodes)) < 0) + return -1; + + for (i =3D 0; i < ndisknodes; i++) { + GSList *bitmaps =3D NULL; + qemuMigrationBlockDirtyBitmapsDiskPtr disk; + g_autofree xmlNodePtr *bitmapnodes =3D NULL; + int nbitmapnodes; + size_t j; + + ctxt->node =3D disknodes[i]; + + if ((nbitmapnodes =3D virXPathNodeSet("./bitmap", ctxt, &bitmapnod= es)) < 0) + return -1; + + for (j =3D 0; j < nbitmapnodes; j++) { + qemuMigrationBlockDirtyBitmapsDiskBitmapPtr bitmap; + + bitmap =3D g_new0(qemuMigrationBlockDirtyBitmapsDiskBitmap, 1); + bitmap->bitmapname =3D virXMLPropString(bitmapnodes[j], "name"= ); + bitmap->alias =3D virXMLPropString(bitmapnodes[j], "alias"); + bitmaps =3D g_slist_prepend(bitmaps, bitmap); + } + + disk =3D g_new0(qemuMigrationBlockDirtyBitmapsDisk, 1); + disk->target =3D virXMLPropString(disknodes[i], "target"); + disk->bitmaps =3D g_slist_reverse(bitmaps); + + disks =3D g_slist_prepend(disks, disk); + } + + mig->blockDirtyBitmaps =3D g_slist_reverse(g_steal_pointer(&disks)); + + return 0; +} + + static int qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig, virQEMUDriverPtr driver, @@ -1275,6 +1404,11 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr m= ig, !(mig->caps =3D qemuMigrationCookieCapsXMLParse(ctxt))) return -1; + if (flags & QEMU_MIGRATION_COOKIE_BLOCK_DIRTY_BITMAPS && + virXPathBoolean("boolean(./blockDirtyBitmaps)", ctxt) && + qemuMigrationCookieBlockDirtyBitmapsParse(ctxt, mig) < 0) + return -1; + return 0; } diff --git a/src/qemu/qemu_migration_cookie.h b/src/qemu/qemu_migration_coo= kie.h index ecd1a01375..8636f955da 100644 --- a/src/qemu/qemu_migration_cookie.h +++ b/src/qemu/qemu_migration_cookie.h @@ -35,6 +35,7 @@ typedef enum { QEMU_MIGRATION_COOKIE_FLAG_CPU, QEMU_MIGRATION_COOKIE_FLAG_ALLOW_REBOOT, QEMU_MIGRATION_COOKIE_FLAG_CAPS, + QEMU_MIGRATION_COOKIE_FLAG_BLOCK_DIRTY_BITMAPS, QEMU_MIGRATION_COOKIE_FLAG_LAST } qemuMigrationCookieFlags; @@ -53,6 +54,7 @@ typedef enum { QEMU_MIGRATION_COOKIE_CPU =3D (1 << QEMU_MIGRATION_COOKIE_FLAG_CPU), QEMU_MIGRATION_COOKIE_ALLOW_REBOOT =3D (1 << QEMU_MIGRATION_COOKIE_FLA= G_ALLOW_REBOOT), QEMU_MIGRATION_COOKIE_CAPS =3D (1 << QEMU_MIGRATION_COOKIE_FLAG_CAPS), + QEMU_MIGRATION_COOKIE_BLOCK_DIRTY_BITMAPS =3D (1 << QEMU_MIGRATION_COO= KIE_FLAG_BLOCK_DIRTY_BITMAPS), } qemuMigrationCookieFeatures; typedef struct _qemuMigrationCookieGraphics qemuMigrationCookieGraphics; @@ -107,6 +109,35 @@ struct _qemuMigrationCookieCaps { virBitmapPtr automatic; }; +typedef struct _qemuMigrationBlockDirtyBitmapsDiskBitmap qemuMigrationBloc= kDirtyBitmapsDiskBitmap; +typedef qemuMigrationBlockDirtyBitmapsDiskBitmap *qemuMigrationBlockDirtyB= itmapsDiskBitmapPtr; +struct _qemuMigrationBlockDirtyBitmapsDiskBitmap { + /* config */ + char *bitmapname; + char *alias; + + /* runtime */ + virTristateBool persistent; /* force persisting of the bitmap */ + char *sourcebitmap; /* optional, actual bitmap to migrate in case we n= eeded + to create a temporary one by merging */ + bool skip; /* omit this bitmap */ +}; + + +typedef struct _qemuMigrationBlockDirtyBitmapsDisk qemuMigrationBlockDirty= BitmapsDisk; +typedef qemuMigrationBlockDirtyBitmapsDisk *qemuMigrationBlockDirtyBitmaps= DiskPtr; +struct _qemuMigrationBlockDirtyBitmapsDisk { + char *target; + + GSList *bitmaps; + + /* runtime data */ + virDomainDiskDefPtr disk; /* disk object corresponding to 'target' */ + const char *nodename; /* nodename of the top level source of 'disk' */ + bool skip; /* omit this disk */ +}; + + typedef struct _qemuMigrationCookie qemuMigrationCookie; typedef qemuMigrationCookie *qemuMigrationCookiePtr; struct _qemuMigrationCookie { @@ -150,6 +181,9 @@ struct _qemuMigrationCookie { /* If flags & QEMU_MIGRATION_COOKIE_CAPS */ qemuMigrationCookieCapsPtr caps; + + /* If flags & QEMU_MIGRATION_COOKIE_BLOCK_DIRTY_BITMAPS */ + GSList *blockDirtyBitmaps; }; --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613057950; cv=none; d=zohomail.com; s=zohoarc; b=lRLQqwQ3zjra0W1fGxRhKZ79PXpRH35KX1K/N7VhCtU6WM8YyFLSVhla3t9PUBimVFz+7T2VkrvRE1v6ChqgQFNYRf1xrHsoM0hmJhImWeCfJmx/xrvhBl2xli3a2wsblNw3Vu0RTU/6tbLzbTR22Pv8JVSkHLO7KEwdmEQc31E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057950; 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=BQ1HoG146U8V8zLQ+Kd5VMgwYDySOROvXxbLzgHvUco=; b=QnOJhAvRrmmFQvNg4K3PspM/nlV3XbKkawLYCpYHoMGaBneaBfHlNENKVsdGuqak+JlrrPxMaj2N98ndOwdQuLpxLiiKmnG1XUyI8giyt7/9TdAfQO0pf5GcWJCuNE0muKkrTuRY5EVjla5XeelN/0yvUPqi2nsR/PF1saBeq9I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1613057950420744.0865119504591; Thu, 11 Feb 2021 07:39:10 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-179-_3LYBj_4Nq-C-fvW5_3i0w-1; Thu, 11 Feb 2021 10:38:47 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48DA9BBEE9; Thu, 11 Feb 2021 15:38:35 +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 2165D10013D7; Thu, 11 Feb 2021 15:38:35 +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 D9CBC18089D9; Thu, 11 Feb 2021 15:38:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcJlV019211 for ; Thu, 11 Feb 2021 10:38:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0218B37A0; Thu, 11 Feb 2021 15:38:19 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E5305D74F for ; Thu, 11 Feb 2021 15:38:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057949; 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=BQ1HoG146U8V8zLQ+Kd5VMgwYDySOROvXxbLzgHvUco=; b=ZHg2M0eXf7mvUczCkTep9fyEVvKyBQ03Sbg5ro1kv83qMZO+9oRyZUhFORMQ8bwEpt4CkG 3/mewbIVZh6s/3uuiPF+/y1mbXx6AH8TNBkhtlsqUgYzKFD3NdsNye/wKG2a8oHazhAE5U D2t6lJtU6Fjl/35QS5lR0gQY8Ga9qow= X-MC-Unique: _3LYBj_4Nq-C-fvW5_3i0w-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 13/19] qemu: migration_cookie: Add helpers for transforming the cookie into migration params Date: Thu, 11 Feb 2021 16:37:52 +0100 Message-Id: <1ab1553733cf2218104508727668cf501e317970.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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) Content-Type: text/plain; charset="utf-8" 'qemuMigrationCookieBlockDirtyBitmapsMatchDisks' maps the bitmaps from the migration cookie to actual disk objects definition pointers. 'qemuMigrationCookieBlockDirtyBitmapsToParams' converts the bitmap definitions from the migration cookie into parameters for the 'block-bitmap-mapping' migration parameter. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/qemu/qemu_migration_cookie.c | 115 +++++++++++++++++++++++++++++++ src/qemu/qemu_migration_cookie.h | 7 ++ 2 files changed, 122 insertions(+) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index 94ba9c83d0..ffb7533b6a 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -1568,3 +1568,118 @@ qemuMigrationCookieParse(virQEMUDriverPtr driver, return g_steal_pointer(&mig); } + + +/** + * qemuMigrationCookieBlockDirtyBitmapsMatchDisks: + * @def: domain definition + * @disks: list of qemuMigrationBlockDirtyBitmapsDiskPtr + * + * Matches all of the @disks to the actual domain disk definition objects + * by looking up the target. + */ +int +qemuMigrationCookieBlockDirtyBitmapsMatchDisks(virDomainDefPtr def, + GSList *disks) +{ + GSList *next; + + for (next =3D disks; next; next =3D next->next) { + qemuMigrationBlockDirtyBitmapsDiskPtr disk =3D next->data; + + if (!(disk->disk =3D virDomainDiskByTarget(def, disk->target))) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Can't find disk '%s' in domain definition"), + disk->target); + return -1; + } + + disk->nodename =3D disk->disk->src->nodeformat; + } + + return 0; +} + + +/** + * qemuMigrationCookieBlockDirtyBitmapsToParams: + * @disks: list of qemuMigrationBlockDirtyBitmapsDisk + * @mapping: filled with resulting mapping + * + * Converts @disks into the arguments for 'block-bitmap-mapping' migration + * parameter. + */ +int +qemuMigrationCookieBlockDirtyBitmapsToParams(GSList *disks, + virJSONValuePtr *mapping) +{ + g_autoptr(virJSONValue) map =3D virJSONValueNewArray(); + bool hasDisks =3D false; + GSList *nextdisk; + + for (nextdisk =3D disks; nextdisk; nextdisk =3D nextdisk->next) { + qemuMigrationBlockDirtyBitmapsDiskPtr disk =3D nextdisk->data; + g_autoptr(virJSONValue) jsondisk =3D NULL; + g_autoptr(virJSONValue) jsonbitmaps =3D virJSONValueNewArray(); + bool hasBitmaps =3D false; + GSList *nextbitmap; + + if (disk->skip || !disk->bitmaps) + continue; + + for (nextbitmap =3D disk->bitmaps; nextbitmap; nextbitmap =3D next= bitmap->next) { + qemuMigrationBlockDirtyBitmapsDiskBitmapPtr bitmap =3D nextbit= map->data; + g_autoptr(virJSONValue) jsonbitmap =3D NULL; + g_autoptr(virJSONValue) transform =3D NULL; + const char *bitmapname =3D bitmap->sourcebitmap; + + if (bitmap->skip) + continue; + + /* if there isn't an override, use the real name */ + if (!bitmapname) + bitmapname =3D bitmap->bitmapname; + + if (bitmap->persistent =3D=3D VIR_TRISTATE_BOOL_YES) { + if (virJSONValueObjectCreate(&transform, + "b:persistent", true, NULL) <= 0) + return -1; + } + + if (virJSONValueObjectCreate(&jsonbitmap, + "s:name", bitmapname, + "s:alias", bitmap->alias, + "A:transform", &transform, + NULL) < 0) + return -1; + + if (virJSONValueArrayAppend(jsonbitmaps, jsonbitmap) < 0) + return -1; + + jsonbitmap =3D NULL; + hasBitmaps =3D true; + } + + if (!hasBitmaps) + continue; + + if (virJSONValueObjectCreate(&jsondisk, + "s:node-name", disk->nodename, + "s:alias", disk->target, + "a:bitmaps", &jsonbitmaps, + NULL) < 0) + return -1; + + if (virJSONValueArrayAppend(map, jsondisk) < 0) + return -1; + + jsondisk =3D NULL; + hasDisks =3D true; + } + + if (!hasDisks) + return 0; + + *mapping =3D g_steal_pointer(&map); + return 0; +} diff --git a/src/qemu/qemu_migration_cookie.h b/src/qemu/qemu_migration_coo= kie.h index 8636f955da..f8393e0ce0 100644 --- a/src/qemu/qemu_migration_cookie.h +++ b/src/qemu/qemu_migration_cookie.h @@ -226,3 +226,10 @@ qemuMigrationCookieXMLFormat(virQEMUDriverPtr driver, virQEMUCapsPtr qemuCaps, virBufferPtr buf, qemuMigrationCookiePtr mig); + +int qemuMigrationCookieBlockDirtyBitmapsMatchDisks(virDomainDefPtr def, + GSList *disks); + +int +qemuMigrationCookieBlockDirtyBitmapsToParams(GSList *disks, + virJSONValuePtr *mapping); --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1613057926; cv=none; d=zohomail.com; s=zohoarc; b=kMRWs7fV5RNbKPajNR0M3xIGDSPrpk7ILwC5CV47xZEEpLrxzj94Vox/3e+fkG+SW4Y/G6+RZvp2A2a64/2dppQcTpIZt7ftopzxHpMrSIsJ7C5RUG6m9E4VacJ/LkoglsWLswOF/MJhMl/zCB/2QEr1wF8uMgORMJxbn9LPcj4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057926; 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=Pkcvk6JOh2Z/P6PAuf5zNgrGqoZ3irxp7wsTX8/3nKs=; b=jneHFRoJxJ9joTGYTgBEH0ZoDt0+P8Ykx572o5SWmqmw/cMUGVubgZ105IeflTrXvczNIXgXFxspcWlEFQ/15Iw3c+U4mOI1v4fPOc0+GdDgbDISS2xtJv0cRY4LR5FBhjwAq31J/YMSh/X4j2QBWSsqKynnC8H8daY1NPGo1Gw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1613057926262652.6079503765565; Thu, 11 Feb 2021 07:38:46 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-603-f1KUAmHIP0OHc1VPAoa0ww-1; Thu, 11 Feb 2021 10:38:42 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8BAD480198E; Thu, 11 Feb 2021 15:38:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E463101E249; Thu, 11 Feb 2021 15:38:34 +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 1339958079; Thu, 11 Feb 2021 15:38:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcQtW019235 for ; Thu, 11 Feb 2021 10:38:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 222EF37A0; Thu, 11 Feb 2021 15:38:26 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 779586268D for ; Thu, 11 Feb 2021 15:38:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057925; 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=Pkcvk6JOh2Z/P6PAuf5zNgrGqoZ3irxp7wsTX8/3nKs=; b=eOtf0QvldK5sp/1TNxT9FcHyj+1h3x8b4UrBINETKID8Gcia+l0D6mpl07WqfaRX8VOy+N Gg7gBRkhhVRqJSshKZgJugdo9REjwv9lydnQTu3LJR4KiHT7KGLm+3P/Jzhyy9Wl2d7ceO TxQ9RTQTKMd4EbS3m/QeHNFKbtslyO8= X-MC-Unique: f1KUAmHIP0OHc1VPAoa0ww-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 14/19] qemu: domain: Store list of temporary bitmaps for migration in status XML Date: Thu, 11 Feb 2021 16:37:53 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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) Content-Type: text/plain; charset="utf-8" Add status XML infrastructure for storing a list of block dirty bitmaps which are temporarily used when migrating a VM with VIR_MIGRATE_NON_SHARED_DISK for cleanup after a libvirtd restart during migration. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/qemu/qemu_domain.c | 90 ++++++++++++++++++++++++++++++++++++++++-- src/qemu/qemu_domain.h | 15 +++++++ 2 files changed, 102 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 53b4fb5f4f..ed37917670 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -86,6 +86,18 @@ qemuJobAllocPrivate(void) } +void +qemuDomainJobPrivateMigrateTempBitmapFree(qemuDomainJobPrivateMigrateTempB= itmapPtr bmp) +{ + if (!bmp) + return; + + g_free(bmp->nodename); + g_free(bmp->bitmapname); + g_free(bmp); +} + + static void qemuJobFreePrivate(void *opaque) { @@ -95,6 +107,9 @@ qemuJobFreePrivate(void *opaque) return; qemuMigrationParamsFree(priv->migParams); + if (priv->migTempBitmaps) + g_slist_free_full(priv->migTempBitmaps, + (GDestroyNotify) qemuDomainJobPrivateMigrateTemp= BitmapFree); VIR_FREE(priv); } @@ -165,6 +180,28 @@ qemuDomainObjPrivateXMLFormatNBDMigration(virBufferPtr= buf, return 0; } + +static void +qemuDomainObjPrivateXMLFormatMigrationBlockDirtyBitmapsTemp(virBufferPtr b= uf, + GSList *bitmap= s) +{ + g_auto(virBuffer) childBuf =3D VIR_BUFFER_INIT_CHILD(buf); + GSList *next; + + for (next =3D bitmaps; next; next =3D next->next) { + qemuDomainJobPrivateMigrateTempBitmapPtr t =3D next->data; + g_auto(virBuffer) bitmapBuf =3D VIR_BUFFER_INITIALIZER; + + virBufferAsprintf(&bitmapBuf, " name=3D'%s'", t->bitmapname); + virBufferAsprintf(&bitmapBuf, " nodename=3D'%s'", t->nodename); + + virXMLFormatElement(&childBuf, "bitmap", &bitmapBuf, NULL); + } + + virXMLFormatElement(buf, "tempBlockDirtyBitmaps", NULL, &childBuf); +} + + static int qemuDomainFormatJobPrivate(virBufferPtr buf, qemuDomainJobObjPtr job, @@ -172,9 +209,14 @@ qemuDomainFormatJobPrivate(virBufferPtr buf, { qemuDomainJobPrivatePtr priv =3D job->privateData; - if (job->asyncJob =3D=3D QEMU_ASYNC_JOB_MIGRATION_OUT && - qemuDomainObjPrivateXMLFormatNBDMigration(buf, vm) < 0) - return -1; + if (job->asyncJob =3D=3D QEMU_ASYNC_JOB_MIGRATION_OUT) { + if (qemuDomainObjPrivateXMLFormatNBDMigration(buf, vm) < 0) + return -1; + + if (priv->migTempBitmaps) + qemuDomainObjPrivateXMLFormatMigrationBlockDirtyBitmapsTemp(bu= f, + pr= iv->migTempBitmaps); + } if (priv->migParams) qemuMigrationParamsFormat(buf, priv->migParams); @@ -267,6 +309,45 @@ qemuDomainObjPrivateXMLParseJobNBD(virDomainObjPtr vm, return 0; } + +static int +qemuDomainParseJobPrivateXMLMigrationBlockDirtyBitmapsTemp(qemuDomainJobPr= ivatePtr jobPriv, + xmlXPathContext= Ptr ctxt) +{ + g_autoslist(qemuDomainJobPrivateMigrateTempBitmap) bitmaps =3D NULL; + g_autofree xmlNodePtr *nodes =3D NULL; + size_t i; + int n; + + if ((n =3D virXPathNodeSet("./tempBlockDirtyBitmaps/bitmap", ctxt, &no= des)) < 0) + return -1; + + if (n =3D=3D 0) + return 0; + + for (i =3D 0; i < n; i++) { + g_autofree char *bitmapname =3D virXMLPropString(nodes[i], "name"); + g_autofree char *nodename =3D virXMLPropString(nodes[i], "nodename= "); + qemuDomainJobPrivateMigrateTempBitmapPtr bmp; + + if (!bitmapname || !nodename) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("malformed ")); + return -1; + } + + bmp =3D g_new0(qemuDomainJobPrivateMigrateTempBitmap, 1); + bmp->nodename =3D g_steal_pointer(&nodename); + bmp->bitmapname =3D g_steal_pointer(&bitmapname); + + bitmaps =3D g_slist_prepend(bitmaps, bmp); + } + + jobPriv->migTempBitmaps =3D g_slist_reverse(g_steal_pointer(&bitmaps)); + return 0; +} + + static int qemuDomainParseJobPrivate(xmlXPathContextPtr ctxt, qemuDomainJobObjPtr job, @@ -277,6 +358,9 @@ qemuDomainParseJobPrivate(xmlXPathContextPtr ctxt, if (qemuDomainObjPrivateXMLParseJobNBD(vm, ctxt) < 0) return -1; + if (qemuDomainParseJobPrivateXMLMigrationBlockDirtyBitmapsTemp(priv, c= txt) < 0) + return -1; + if (qemuMigrationParamsParse(ctxt, &priv->migParams) < 0) return -1; diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 7453881a31..d8ed3aebe4 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -487,6 +487,20 @@ struct _qemuDomainXmlNsDef { char **capsdel; }; + +typedef struct _qemuDomainJobPrivateMigrateTempBitmap qemuDomainJobPrivate= MigrateTempBitmap; +typedef qemuDomainJobPrivateMigrateTempBitmap *qemuDomainJobPrivateMigrate= TempBitmapPtr; + +struct _qemuDomainJobPrivateMigrateTempBitmap { + char *nodename; + char *bitmapname; +}; + +void +qemuDomainJobPrivateMigrateTempBitmapFree(qemuDomainJobPrivateMigrateTempB= itmapPtr bmp); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuDomainJobPrivateMigrateTempBitmap, qemuD= omainJobPrivateMigrateTempBitmapFree); + + typedef struct _qemuDomainJobPrivate qemuDomainJobPrivate; typedef qemuDomainJobPrivate *qemuDomainJobPrivatePtr; struct _qemuDomainJobPrivate { @@ -495,6 +509,7 @@ struct _qemuDomainJobPrivate { bool spiceMigrated; /* spice migration completed */ bool dumpCompleted; /* dump completed */ qemuMigrationParamsPtr migParams; + GSList *migTempBitmaps; /* temporary block dirty bitmaps - qemuDomain= JobPrivateMigrateTempBitmap */ }; int qemuDomainObjStartWorker(virDomainObjPtr dom); --=20 2.29.2 From nobody Thu May 2 02:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613057950; cv=none; d=zohomail.com; s=zohoarc; b=jvjPYn2ymJqtxChgJX9OvPlLZpwNDn3Hrpn0Z5s0jULZJwSm9qkQ1vpgJkAj36G+S5PvRQyWNwItaq/zW9jbmvPbw5u57RO84fZYxczpjnBvpirlZZuQ7ATs6ripT9kWwpveNusFfoVhI22kRlKVp06SsVAzwO6xnaeMTui/SPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057950; 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=0gd9iBP7fVw11dILby2WwcdgLJwZuIXs590x67CJ62k=; b=mLK5mUtll1rHZCTdfcTMGDU8n305ARkQX78p6b+hs6vXXRtjCUyM5ZXWpiBjIylvaYgWnM7B10FsC4UKnLk0rs9G2uyJdy3jbgUlc/bW9aGefEcoDPVJmanJSgHfZ1n8+t+o4kaJSj+LTdb9QRNXrlB7oTPDZLR0y19uqtgNsds= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1613057950308765.034586995963; Thu, 11 Feb 2021 07:39:10 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245-wyuS-GoLOK6rvk2BsMAc3Q-1; Thu, 11 Feb 2021 10:38:45 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7EB56BBEEA; Thu, 11 Feb 2021 15:38:37 +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 5A61560C47; Thu, 11 Feb 2021 15:38:37 +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 1F20E18089E0; Thu, 11 Feb 2021 15:38:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcTPj019256 for ; Thu, 11 Feb 2021 10:38:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id 511C65D764; Thu, 11 Feb 2021 15:38:29 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACE9C5D74F for ; Thu, 11 Feb 2021 15:38:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057949; 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=0gd9iBP7fVw11dILby2WwcdgLJwZuIXs590x67CJ62k=; b=KgarvhTLg5z3qISWRe7kecL3p9WxnRRST5S5uwKJY1E6/l67boXOzyP397kvz89BHojqVN 1nDG4bcjV1T8986LsDfq6v8G8Syg9zxFFKpbQOsIxvw2dNPjjK+Exwb9+MnNd/HK/Z4O+j JV7+GzUuPoIXX0vcJvnraO0sTSp0v0g= X-MC-Unique: wyuS-GoLOK6rvk2BsMAc3Q-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 15/19] tests: qemustatusxml2xml: Add status XML from migration with bitmaps Date: Thu, 11 Feb 2021 16:37:54 +0100 Message-Id: <17fa5e03856c019408af3cd37486520dadef0a96.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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) Content-Type: text/plain; charset="utf-8" The XML sample shows the status XML when migrating with bitmaps including the element added in previous commit. It will also be used for the migration cookie test. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- .../migration-out-nbd-bitmaps-in.xml | 574 ++++++++++++++++++ .../migration-out-nbd-bitmaps-out.xml | 1 + tests/qemustatusxml2xmltest.c | 1 + 3 files changed, 576 insertions(+) create mode 100644 tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-i= n.xml create mode 120000 tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-o= ut.xml diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml b= /tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml new file mode 100644 index 0000000000..b3d24eda98 --- /dev/null +++ b/tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml @@ -0,0 +1,574 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EPYC-Rome + AMD + + + + + + + + + + + + + + + + + + + + + + + + + + -2 + + migr + 10b01607-0323-486b-afe2-3014a8a5b98b + 1024000 + 1024000 + 1 + + /machine + + + hvm + + + + + + + + + EPYC-Rome + AMD + + + + + + + + + + + + + + + + + + + + + + + + + destroy + restart + restart + + + + + + /home/pipo/git/qemu.git/build/x86_64-softmmu/qemu-system-x= 86_64 + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + + +
+ +