From nobody Sat May 4 02:49:59 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=1613735929; cv=none; d=zohomail.com; s=zohoarc; b=K+9aSq762y9fDZ6PrW2mMVLp5vi/+LOuSqit37ktvdw6ZRD1fDmP9SIKM6a3yeKhNsn8XXKDiveJPRVEO1Z4D0vxF/ROg5AHEh20Tx/mYGBR9+HCAH63USiTTQngpO1p2//99/Enf94LN139qaEZpB/nD8twUIBVghEn50lfQQU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613735929; 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=ta8Has4CRFVBQsNSuRVUvv41y5FWJSoEzXHZLfeiPcI=; b=SeFjDe31+FKQQJGPSJgOOlBRC6BT9vVS4Z6xQtdzQCkp5Bahq5iUxCNvCOCrUSjoqOJO6EX2l566t9WjUhDrCX76uOS4g9RDjj0KBJD+dpn9kkFlB3CtuLGa7IN4H14syDVx8H9pkRx1iae4QSnQqsjgi6JEp8UvF8obgbpssD8= 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 1613735929422232.0628040218471; Fri, 19 Feb 2021 03:58:49 -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-241-iQZBznRQP5iVfYKLOCLXlQ-1; Fri, 19 Feb 2021 06:58: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 3994DCE647; Fri, 19 Feb 2021 11:58:39 +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 1052F60BE5; Fri, 19 Feb 2021 11:58:39 +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 A39574E58E; Fri, 19 Feb 2021 11:58:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBwYaT008297 for ; Fri, 19 Feb 2021 06:58:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 12CA16086F; Fri, 19 Feb 2021 11:58:34 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24A806085D for ; Fri, 19 Feb 2021 11:58:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735928; 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=ta8Has4CRFVBQsNSuRVUvv41y5FWJSoEzXHZLfeiPcI=; b=NPKMwjJUap57OdfosxPHOSY9RG98PLAP/1lIwalFpCnnNoqyN1y91KRFOC4gJsJW/P0fh0 adO7j0qU/f8Ewpb+5PL8RYyy1TarJZgFnjoOtVSjQZvoasRS8rMEbehyhgDBTd5YTWCjth 9VhhFldRW4z+HWHHwpi76s8Ut0FvMDA= X-MC-Unique: iQZBznRQP5iVfYKLOCLXlQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 01/15] qemucapabilitiesdata: Update test data for qemu-6.0 on x86_64 Date: Fri, 19 Feb 2021 12:58:13 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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" Include the 'transform' member of 'block-bitmap-mapping'. This is based on qemu commit v5.2.0-2208-gc79f01c945 Signed-off-by: Peter Krempa --- .../caps_6.0.0.x86_64.replies | 741 ++++++++++-------- .../caps_6.0.0.x86_64.xml | 22 +- 2 files changed, 441 insertions(+), 322 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..04ebd04583 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-2208-gc79f01c945" }, "id": "libvirt-2" } @@ -811,6 +811,10 @@ "name": "usb-hub", "parent": "usb-device" }, + { + "name": "chardev-serial", + "parent": "chardev-fd" + }, { "name": "virtio-blk-device", "parent": "virtio-device" @@ -852,8 +856,8 @@ "parent": "accel" }, { - "name": "chardev-serial", - "parent": "chardev-fd" + "name": "Cooperlake-x86_64-cpu", + "parent": "x86_64-cpu" }, { "name": "vhost-user-vsock-pci", @@ -907,10 +911,6 @@ "name": "pxb-host", "parent": "pci-host-bridge" }, - { - "name": "Cooperlake-x86_64-cpu", - "parent": "x86_64-cpu" - }, { "name": "scsi-disk", "parent": "scsi-disk-base" @@ -1143,6 +1143,10 @@ "name": "i82557c", "parent": "pci-device" }, + { + "name": "i82557b", + "parent": "pci-device" + }, { "name": "virtio-scsi-device", "parent": "virtio-scsi-common" @@ -1151,10 +1155,6 @@ "name": "pxb-pcie", "parent": "pci-device" }, - { - "name": "i82557b", - "parent": "pci-device" - }, { "name": "Haswell-IBRS-x86_64-cpu", "parent": "x86_64-cpu" @@ -1172,12 +1172,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 +1184,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 +1212,8 @@ "parent": "x86_64-cpu" }, { - "name": "chardev-udp", - "parent": "chardev" + "name": "chardev-memory", + "parent": "chardev-ringbuf" }, { "name": "EPYC-Rome-v1-x86_64-cpu", @@ -1311,14 +1311,14 @@ "name": "isabus-bridge", "parent": "sys-bus-device" }, - { - "name": "ne2k_pci", - "parent": "pci-device" - }, { "name": "IvyBridge-v2-x86_64-cpu", "parent": "x86_64-cpu" }, + { + "name": "ne2k_pci", + "parent": "pci-device" + }, { "name": "usb-bus", "parent": "bus" @@ -1328,29 +1328,25 @@ "parent": "ide-device" }, { - "name": "tcg-accel", - "parent": "accel" + "name": "qemu:memory-region", + "parent": "object" }, { - "name": "piix4-ide", - "parent": "pci-ide" + "name": "tcg-accel", + "parent": "accel" }, { "name": "virtio-balloon-pci", "parent": "virtio-balloon-pci-base" }, - { - "name": "Cascadelake-Server-v2-x86_64-cpu", - "parent": "x86_64-cpu" - }, - { - "name": "qemu:memory-region", - "parent": "object" - }, { "name": "virtio-gpu-device", "parent": "virtio-gpu-base" }, + { + "name": "Cascadelake-Server-v2-x86_64-cpu", + "parent": "x86_64-cpu" + }, { "name": "e1000", "parent": "e1000-base" @@ -1367,6 +1363,10 @@ "name": "ES1370", "parent": "pci-device" }, + { + "name": "pc-i440fx-2.6-machine", + "parent": "generic-pc-machine" + }, { "name": "i82551", "parent": "pci-device" @@ -1384,8 +1384,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", @@ -1403,14 +1403,14 @@ "name": "pc-q35-6.0-machine", "parent": "generic-pc-machine" }, - { - "name": "vhost-user-backend", - "parent": "object" - }, { "name": "mioe3680_pci", "parent": "pci-device" }, + { + "name": "vhost-user-backend", + "parent": "object" + }, { "name": "vmxnet3", "parent": "pci-device" @@ -1479,14 +1479,14 @@ "name": "ati-vga", "parent": "pci-device" }, - { - "name": "pentium3-x86_64-cpu", - "parent": "x86_64-cpu" - }, { "name": "kvm-i8259", "parent": "pic-common" }, + { + "name": "pentium3-x86_64-cpu", + "parent": "x86_64-cpu" + }, { "name": "isa-serial", "parent": "isa-device" @@ -1495,6 +1495,10 @@ "name": "imx.usbphy", "parent": "sys-bus-device" }, + { + "name": "x-remote-object", + "parent": "object" + }, { "name": "core2duo-v1-x86_64-cpu", "parent": "x86_64-cpu" @@ -1527,6 +1531,10 @@ "name": "i82559er", "parent": "pci-device" }, + { + "name": "remote-pcihost", + "parent": "pcie-host-bridge" + }, { "name": "virtio-serial-pci", "parent": "virtio-serial-pci-base" @@ -1679,14 +1687,14 @@ "name": "pci-ohci", "parent": "pci-device" }, - { - "name": "virtio-tablet-device", - "parent": "virtio-input-hid-device" - }, { "name": "Haswell-x86_64-cpu", "parent": "x86_64-cpu" }, + { + "name": "virtio-tablet-device", + "parent": "virtio-input-hid-device" + }, { "name": "ccid-card-passthru", "parent": "ccid-card" @@ -1844,8 +1852,8 @@ "parent": "chardev-spice" }, { - "name": "tls-creds-x509", - "parent": "tls-creds" + "name": "qio-channel-command", + "parent": "qio-channel" }, { "name": "Opteron_G3-v1-x86_64-cpu", @@ -1860,8 +1868,8 @@ "parent": "virtio-blk-pci-base" }, { - "name": "qio-channel-command", - "parent": "qio-channel" + "name": "tls-creds-x509", + "parent": "tls-creds" }, { "name": "pc-i440fx-2.4-machine", @@ -1932,21 +1940,21 @@ "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": "tpci200", "parent": "pci-device" }, + { + "name": "chardev-braille", + "parent": "chardev" + }, { "name": "rocker", "parent": "pci-device" @@ -1963,10 +1971,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 +1988,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" @@ -2004,17 +2004,21 @@ "parent": "max-x86_64-cpu" }, { - "name": "usb-ehci", - "parent": "pci-ehci-usb" + "name": "secret", + "parent": "secret_common" }, { - "name": "pc-i440fx-2.11-machine", - "parent": "generic-pc-machine" + "name": "usb-ehci", + "parent": "pci-ehci-usb" }, { "name": "pxb", "parent": "pci-device" }, + { + "name": "pc-i440fx-2.11-machine", + "parent": "generic-pc-machine" + }, { "name": "AC97", "parent": "pci-device" @@ -2023,6 +2027,10 @@ "name": "vmgenid", "parent": "device" }, + { + "name": "Westmere-v2-x86_64-cpu", + "parent": "x86_64-cpu" + }, { "name": "virtio-pmem", "parent": "virtio-device" @@ -2031,6 +2039,10 @@ "name": "nvme-bus", "parent": "bus" }, + { + "name": "virtconsole", + "parent": "virtserialport" + }, { "name": "virtio-net-pci-non-transitional", "parent": "virtio-net-pci-base" @@ -2048,8 +2060,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,21 +2076,25 @@ "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", "parent": "object" }, + { + "name": "ccid-card-emulated", + "parent": "ccid-card" + }, { "name": "pc-q35-2.9-machine", "parent": "generic-pc-machine" @@ -2088,36 +2104,36 @@ "parent": "x86_64-cpu" }, { - "name": "pc-q35-5.1-machine", - "parent": "generic-pc-machine" + "name": "hyperv-testdev", + "parent": "isa-device" }, { "name": "s3c-sdhci", "parent": "generic-sdhci" }, { - "name": "tpm-tis", - "parent": "isa-device" + "name": "filter-mirror", + "parent": "netfilter" }, { "name": "fw_cfg_mem", "parent": "fw_cfg" }, { - "name": "Westmere-v2-x86_64-cpu", - "parent": "x86_64-cpu" + "name": "pc-i440fx-1.7-machine", + "parent": "generic-pc-machine" }, { - "name": "ccid-card-emulated", - "parent": "ccid-card" + "name": "tpm-tis", + "parent": "isa-device" }, { - "name": "virtconsole", - "parent": "virtserialport" + "name": "pc-q35-5.1-machine", + "parent": "generic-pc-machine" }, { - "name": "pc-i440fx-1.7-machine", - "parent": "generic-pc-machine" + "name": "x-pci-proxy-dev", + "parent": "pci-device" }, { "name": "virtio-mouse-device", @@ -2131,14 +2147,14 @@ "name": "ioh3420", "parent": "pcie-root-port-base" }, - { - "name": "filter-mirror", - "parent": "netfilter" - }, { "name": "Skylake-Client-v1-x86_64-cpu", "parent": "x86_64-cpu" }, + { + "name": "x-remote-machine", + "parent": "machine" + }, { "name": "throttle-group", "parent": "object" @@ -2548,36 +2564,36 @@ "parent": "pci-device" }, { - "name": "Cooperlake-v1-x86_64-cpu", - "parent": "x86_64-cpu" + "name": "virtio-balloon-device", + "parent": "virtio-device" }, { - "name": "Cascadelake-Server-v3-x86_64-cpu", + "name": "Cooperlake-v1-x86_64-cpu", "parent": "x86_64-cpu" }, { - "name": "Nehalem-IBRS-x86_64-cpu", + "name": "Cascadelake-Server-v3-x86_64-cpu", "parent": "x86_64-cpu" }, - { - "name": "virtio-balloon-device", - "parent": "virtio-device" - }, { "name": "cfi.pflash01", "parent": "sys-bus-device" }, { - "name": "Skylake-Server-x86_64-cpu", - "parent": "x86_64-cpu" + "name": "isa-parallel", + "parent": "isa-device" }, { "name": "pc-q35-2.7-machine", "parent": "generic-pc-machine" }, { - "name": "isa-parallel", - "parent": "isa-device" + "name": "Skylake-Server-x86_64-cpu", + "parent": "x86_64-cpu" + }, + { + "name": "Nehalem-IBRS-x86_64-cpu", + "parent": "x86_64-cpu" }, { "name": "pentium2-v1-x86_64-cpu", @@ -2675,14 +2691,14 @@ "name": "virtio-pmem-pci", "parent": "virtio-pmem-pci-base" }, - { - "name": "virtio-tablet-pci", - "parent": "virtio-tablet-pci-base-type" - }, { "name": "accel", "parent": "object" }, + { + "name": "virtio-tablet-pci", + "parent": "virtio-tablet-pci-base-type" + }, { "name": "dc390", "parent": "am53c974" @@ -2796,8 +2812,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 +2824,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", @@ -7314,6 +7330,10 @@ "name": "xsaves", "type": "bool" }, + { + "name": "vgif", + "type": "bool" + }, { "name": "mce", "type": "bool" @@ -7443,6 +7463,10 @@ "name": "tcg-cpuid", "type": "bool" }, + { + "name": "vmx-entry-load-pkrs", + "type": "bool" + }, { "name": "x-hv-max-vps", "type": "int32" @@ -7700,6 +7724,10 @@ "name": "kvm-pv-tlb-flush", "type": "bool" }, + { + "name": "vmx-rdtsc-exit", + "type": "bool" + }, { "name": "vmx-cr8-load-exit", "type": "bool" @@ -7713,7 +7741,11 @@ "type": "bool" }, { - "name": "vmx-rdtsc-exit", + "name": "svme-addr-chk", + "type": "bool" + }, + { + "name": "vmx-exit-load-pkrs", "type": "bool" }, { @@ -7855,6 +7887,14 @@ "description": "on/off", "type": "bool" }, + { + "name": "avic", + "type": "bool" + }, + { + "name": "ds", + "type": "bool" + }, { "name": "legacy-cache", "type": "bool" @@ -7873,11 +7913,11 @@ "type": "bool" }, { - "name": "ds", + "name": "osvw", "type": "bool" }, { - "name": "osvw", + "name": "pks", "type": "bool" }, { @@ -7904,6 +7944,10 @@ "name": "vmx-cr8-store-exit", "type": "bool" }, + { + "name": "vmx-ept-1gb", + "type": "bool" + }, { "name": "nrip-save", "type": "bool" @@ -7917,7 +7961,7 @@ "type": "bool" }, { - "name": "lmce", + "name": "vmx-ept-2mb", "type": "bool" }, { @@ -7937,7 +7981,7 @@ "type": "bool" }, { - "name": "sse2", + "name": "lmce", "type": "bool" }, { @@ -7965,15 +8009,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 +8215,7 @@ "type": "bool" }, { - "name": "vmx-ept-2mb", + "name": "vmx-page-walk-4", "type": "bool" }, { @@ -8239,7 +8283,7 @@ "type": "bool" }, { - "name": "vmx-page-walk-4", + "name": "v-vmsave-vmload", "type": "bool" }, { @@ -8646,21 +8690,28 @@ "deprecated": false, "default-ram-id": "pc.ram" }, + { + "hotpluggable-cpus": false, + "name": "x-remote", + "numa-mem-supported": false, + "cpu-max": 1, + "deprecated": false + }, { "hotpluggable-cpus": true, - "name": "pc-i440fx-1.7", - "numa-mem-supported": true, + "name": "pc-q35-5.1", + "numa-mem-supported": false, "default-cpu-type": "qemu64-x86_64-cpu", - "cpu-max": 255, + "cpu-max": 288, "deprecated": false, "default-ram-id": "pc.ram" }, { "hotpluggable-cpus": true, - "name": "pc-q35-5.1", - "numa-mem-supported": false, + "name": "pc-i440fx-1.7", + "numa-mem-supported": true, "default-cpu-type": "qemu64-x86_64-cpu", - "cpu-max": 288, + "cpu-max": 255, "deprecated": false, "default-ram-id": "pc.ram" }, @@ -10857,134 +10908,10 @@ ], "option": "iscsi" }, - { - "parameters": [ - { - "name": "rendernode", - "type": "string" - }, - { - "name": "gl", - "type": "boolean" - }, - { - "name": "head", - "type": "number" - }, - { - "name": "display", - "type": "string" - }, - { - "name": "seamless-migration", - "type": "boolean" - }, - { - "name": "playback-compression", - "type": "boolean" - }, - { - "name": "agent-mouse", - "type": "boolean" - }, - { - "name": "streaming-video", - "type": "string" - }, - { - "name": "zlib-glz-wan-compression", - "type": "string" - }, - { - "name": "jpeg-wan-compression", - "type": "string" - }, - { - "name": "image-compression", - "type": "string" - }, - { - "name": "plaintext-channel", - "type": "string" - }, - { - "name": "tls-channel", - "type": "string" - }, - { - "name": "tls-ciphers", - "type": "string" - }, - { - "name": "x509-dh-key-file", - "type": "string" - }, - { - "name": "x509-cacert-file", - "type": "string" - }, - { - "name": "x509-cert-file", - "type": "string" - }, - { - "name": "x509-key-password", - "type": "string" - }, - { - "name": "x509-key-file", - "type": "string" - }, - { - "name": "x509-dir", - "type": "string" - }, - { - "name": "sasl", - "type": "boolean" - }, - { - "name": "disable-agent-file-xfer", - "type": "boolean" - }, - { - "name": "disable-copy-paste", - "type": "boolean" - }, - { - "name": "disable-ticketing", - "type": "boolean" - }, - { - "name": "password", - "type": "string" - }, - { - "name": "unix", - "type": "boolean" - }, - { - "name": "ipv6", - "type": "boolean" - }, - { - "name": "ipv4", - "type": "boolean" - }, - { - "name": "addr", - "type": "string" - }, - { - "name": "tls-port", - "type": "number" - }, - { - "name": "port", - "type": "number" - } + { + "parameters": [ ], - "option": "spice" + "option": "acpi" }, { "parameters": [ @@ -11205,6 +11132,135 @@ ], "option": "smbios" }, + { + "parameters": [ + { + "name": "rendernode", + "type": "string" + }, + { + "name": "gl", + "type": "boolean" + }, + { + "name": "head", + "type": "number" + }, + { + "name": "display", + "type": "string" + }, + { + "name": "seamless-migration", + "type": "boolean" + }, + { + "name": "playback-compression", + "type": "boolean" + }, + { + "name": "agent-mouse", + "type": "boolean" + }, + { + "name": "streaming-video", + "type": "string" + }, + { + "name": "zlib-glz-wan-compression", + "type": "string" + }, + { + "name": "jpeg-wan-compression", + "type": "string" + }, + { + "name": "image-compression", + "type": "string" + }, + { + "name": "plaintext-channel", + "type": "string" + }, + { + "name": "tls-channel", + "type": "string" + }, + { + "name": "tls-ciphers", + "type": "string" + }, + { + "name": "x509-dh-key-file", + "type": "string" + }, + { + "name": "x509-cacert-file", + "type": "string" + }, + { + "name": "x509-cert-file", + "type": "string" + }, + { + "name": "x509-key-password", + "type": "string" + }, + { + "name": "x509-key-file", + "type": "string" + }, + { + "name": "x509-dir", + "type": "string" + }, + { + "name": "sasl", + "type": "boolean" + }, + { + "name": "disable-agent-file-xfer", + "type": "boolean" + }, + { + "name": "disable-copy-paste", + "type": "boolean" + }, + { + "name": "disable-ticketing", + "type": "boolean" + }, + { + "name": "password", + "type": "string" + }, + { + "name": "unix", + "type": "boolean" + }, + { + "name": "ipv6", + "type": "boolean" + }, + { + "name": "ipv4", + "type": "boolean" + }, + { + "name": "addr", + "type": "string" + }, + { + "name": "tls-port", + "type": "number" + }, + { + "name": "port", + "type": "number" + } + ], + "option": "spice" + }, { "parameters": [ { @@ -11298,11 +11354,6 @@ ], "option": "vnc" }, - { - "parameters": [ - ], - "option": "acpi" - }, { "parameters": [ { @@ -19431,6 +19482,7 @@ }, { "name": "gpa", + "default": null, "type": "int" } ], @@ -25357,6 +25409,11 @@ { "name": "alias", "type": "str" + }, + { + "name": "transform", + "default": null, + "type": "568" } ], "meta-type": "object" @@ -25384,7 +25441,7 @@ "members": [ { "name": "data", - "type": "568" + "type": "569" } ], "meta-type": "object" @@ -25760,7 +25817,7 @@ "members": [ { "name": "bus", - "type": "569" + "type": "570" }, { "name": "devices", @@ -25832,7 +25889,7 @@ "members": [ { "name": "data", - "type": "570" + "type": "571" } ], "meta-type": "object" @@ -25842,7 +25899,7 @@ "members": [ { "name": "data", - "type": "571" + "type": "572" } ], "meta-type": "object" @@ -25852,7 +25909,7 @@ "members": [ { "name": "data", - "type": "572" + "type": "573" } ], "meta-type": "object" @@ -26047,7 +26104,7 @@ "members": [ { "name": "type", - "type": "573" + "type": "574" }, { "name": "hash", @@ -26126,13 +26183,13 @@ }, { "case": "luks", - "type": "575" + "type": "576" } ], "members": [ { "name": "format", - "type": "574" + "type": "575" } ], "meta-type": "object" @@ -26158,17 +26215,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 +26281,7 @@ "variants": [ { "case": "luks", - "type": "579" + "type": "580" }, { "case": "qcow", @@ -26234,7 +26291,7 @@ "members": [ { "name": "format", - "type": "574" + "type": "575" } ], "meta-type": "object" @@ -26732,7 +26789,7 @@ "members": [ { "name": "button", - "type": "580" + "type": "581" }, { "name": "down", @@ -26746,7 +26803,7 @@ "members": [ { "name": "axis", - "type": "581" + "type": "582" }, { "name": "value", @@ -26758,11 +26815,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 +26846,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 +26898,12 @@ { "name": "encrypt", "default": null, - "type": "583" + "type": "584" }, { "name": "bitmaps", "default": null, - "type": "[584]" + "type": "[585]" }, { "name": "compression-type", @@ -26845,7 +26913,7 @@ "meta-type": "object" }, { - "name": "571", + "name": "572", "members": [ { "name": "create-type", @@ -26867,7 +26935,7 @@ "meta-type": "object" }, { - "name": "572", + "name": "573", "members": [ { "name": "cipher-alg", @@ -26904,13 +26972,13 @@ }, { "name": "slots", - "type": "[585]" + "type": "[586]" } ], "meta-type": "object" }, { - "name": "573", + "name": "574", "meta-type": "enum", "values": [ "md5", @@ -26918,7 +26986,7 @@ ] }, { - "name": "574", + "name": "575", "meta-type": "enum", "values": [ "qcow", @@ -26926,7 +26994,7 @@ ] }, { - "name": "575", + "name": "576", "members": [ { "name": "key-secret", @@ -26967,7 +27035,7 @@ "meta-type": "object" }, { - "name": "576", + "name": "577", "meta-type": "enum", "values": [ "full", @@ -26975,7 +27043,7 @@ ] }, { - "name": "577", + "name": "578", "members": [ { "name": "copies", @@ -26985,7 +27053,7 @@ "meta-type": "object" }, { - "name": "578", + "name": "579", "members": [ { "name": "data-strips", @@ -26999,7 +27067,7 @@ "meta-type": "object" }, { - "name": "579", + "name": "580", "members": [ { "name": "state", @@ -27034,7 +27102,7 @@ "meta-type": "object" }, { - "name": "580", + "name": "581", "meta-type": "enum", "values": [ "left", @@ -27047,7 +27115,7 @@ ] }, { - "name": "581", + "name": "582", "meta-type": "enum", "values": [ "x", @@ -27055,7 +27123,7 @@ ] }, { - "name": "582", + "name": "583", "members": [ { "name": "base", @@ -27069,12 +27137,12 @@ "meta-type": "object" }, { - "name": "583", + "name": "584", "tag": "format", "variants": [ { "case": "luks", - "type": "572" + "type": "573" }, { "case": "aes", @@ -27090,12 +27158,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 +27175,7 @@ }, { "name": "flags", - "type": "[586]" + "type": "[587]" } ], "meta-type": "object" @@ -27118,12 +27186,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 +27215,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 +27261,7 @@ "name": "base", "props": { "vmx-entry-load-rtit-ctl": false, + "svme-addr-chk": false, "cmov": true, "ia64": false, "ssb-no": false, @@ -27277,6 +27346,7 @@ "vmx-unrestricted-guest": false, "vmx-cr3-store-noexit": false, "pku": false, + "pks": false, "smx": false, "cmp-legacy": true, "avx512-4fmaps": false, @@ -27392,6 +27462,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 +27500,7 @@ "vmx-movdr-exit": false, "pse": true, "avx2": true, + "avic": false, "sep": true, "virt-ssbd": true, "vmx-cr3-load-noexit": false, @@ -27445,6 +27517,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 +27527,7 @@ "pcid": false, "taa-no": false, "arch-capabilities": true, + "vgif": false, "vmx-secondary-ctls": false, "vmx-xsaves": false, "clzero": true, @@ -27488,6 +27562,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 +27594,7 @@ "name": "base", "props": { "vmx-entry-load-rtit-ctl": false, + "svme-addr-chk": false, "cmov": true, "ia64": false, "ssb-no": false, @@ -27603,6 +27679,7 @@ "vmx-unrestricted-guest": false, "vmx-cr3-store-noexit": false, "pku": false, + "pks": false, "smx": false, "cmp-legacy": true, "avx512-4fmaps": false, @@ -27718,6 +27795,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 +27833,7 @@ "vmx-movdr-exit": false, "pse": true, "avx2": true, + "avic": false, "sep": true, "virt-ssbd": true, "vmx-cr3-load-noexit": false, @@ -27771,6 +27850,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 +27860,7 @@ "pcid": false, "taa-no": false, "arch-capabilities": true, + "vgif": false, "vmx-secondary-ctls": false, "vmx-xsaves": false, "clzero": true, @@ -27814,6 +27895,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 +30290,7 @@ "name": "base", "props": { "vmx-entry-load-rtit-ctl": false, + "svme-addr-chk": false, "cmov": true, "ia64": false, "ssb-no": false, @@ -30292,6 +30375,7 @@ "vmx-unrestricted-guest": false, "vmx-cr3-store-noexit": false, "pku": true, + "pks": true, "smx": false, "cmp-legacy": false, "avx512-4fmaps": false, @@ -30407,6 +30491,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 +30529,7 @@ "vmx-movdr-exit": false, "pse": true, "avx2": false, + "avic": false, "sep": true, "virt-ssbd": false, "vmx-cr3-load-noexit": false, @@ -30460,6 +30546,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 +30556,7 @@ "pcid": false, "taa-no": false, "arch-capabilities": false, + "vgif": false, "vmx-secondary-ctls": false, "vmx-xsaves": false, "clzero": false, @@ -30503,6 +30591,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 +30623,7 @@ "name": "base", "props": { "vmx-entry-load-rtit-ctl": false, + "svme-addr-chk": false, "cmov": true, "ia64": false, "ssb-no": false, @@ -30618,6 +30708,7 @@ "vmx-unrestricted-guest": false, "vmx-cr3-store-noexit": false, "pku": true, + "pks": true, "smx": false, "cmp-legacy": false, "avx512-4fmaps": false, @@ -30733,6 +30824,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 +30862,7 @@ "vmx-movdr-exit": false, "pse": true, "avx2": false, + "avic": false, "sep": true, "virt-ssbd": false, "vmx-cr3-load-noexit": false, @@ -30786,6 +30879,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 +30889,7 @@ "pcid": false, "taa-no": false, "arch-capabilities": false, + "vgif": false, "vmx-secondary-ctls": false, "vmx-xsaves": false, "clzero": false, @@ -30829,6 +30924,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, @@ -30972,21 +31068,28 @@ "deprecated": false, "default-ram-id": "pc.ram" }, + { + "hotpluggable-cpus": false, + "name": "x-remote", + "numa-mem-supported": false, + "cpu-max": 1, + "deprecated": false + }, { "hotpluggable-cpus": true, - "name": "pc-i440fx-1.7", - "numa-mem-supported": true, + "name": "pc-q35-5.1", + "numa-mem-supported": false, "default-cpu-type": "qemu64-x86_64-cpu", - "cpu-max": 255, + "cpu-max": 288, "deprecated": false, "default-ram-id": "pc.ram" }, { "hotpluggable-cpus": true, - "name": "pc-q35-5.1", - "numa-mem-supported": false, + "name": "pc-i440fx-1.7", + "numa-mem-supported": true, "default-cpu-type": "qemu64-x86_64-cpu", - "cpu-max": 288, + "cpu-max": 255, "deprecated": false, "default-ram-id": "pc.ram" }, diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index 23fb5b7393..e68df54071 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -259,10 +259,11 @@ 5002050 0 43100242 - v5.2.0-1810-g2436651b26 + v5.2.0-2208-gc79f01c945 x86_64 + @@ -347,6 +348,7 @@ + @@ -462,6 +464,7 @@ + @@ -499,6 +502,7 @@ + @@ -515,6 +519,7 @@ + @@ -524,6 +529,7 @@ + @@ -558,6 +564,7 @@ + @@ -1436,8 +1443,9 @@ - + + @@ -1471,6 +1479,7 @@ + @@ -1555,6 +1564,7 @@ + @@ -1670,6 +1680,7 @@ + @@ -1707,6 +1718,7 @@ + @@ -1723,6 +1735,7 @@ + @@ -1732,6 +1745,7 @@ + @@ -1766,6 +1780,7 @@ + @@ -3175,8 +3190,9 @@ - + + --=20 2.29.2 From nobody Sat May 4 02:49:59 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 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 1613735941060306.8053069848497; Fri, 19 Feb 2021 03:59:01 -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-604-6EsxzPC5O6qPIOs0QoU07w-1; Fri, 19 Feb 2021 06:58:58 -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 B6FE380196E; Fri, 19 Feb 2021 11:58:52 +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 948615B69C; Fri, 19 Feb 2021 11:58:52 +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 5F36AA6F6; Fri, 19 Feb 2021 11:58:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBwbDV008314 for ; Fri, 19 Feb 2021 06:58:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 521876085D; Fri, 19 Feb 2021 11:58:37 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFFF160873 for ; Fri, 19 Feb 2021 11:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735940; 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=grmtkq3TuMZcXi2NXn6ecyWnE4udK8KhdeJfJpI2Zgk=; b=go84NDZWVhrwYg2zsIIVEf0ljLcSt7Z0Ir43BbeznXGc4j0LDwpLJ7izrI/jhlo2WZtZ84 Y8IGx37CSDn//j9Ax/shiLyDiIxNh56vqNKsRJwKz6vH9sclnKztPIYHAhbdE+aS2N6xZH UY3lXINcP+CS/eVgJIJWrvAKDfmJgj0= X-MC-Unique: 6EsxzPC5O6qPIOs0QoU07w-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 02/15] qemu: capabilities: Introduce QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING Date: Fri, 19 Feb 2021 12:58:14 +0100 Message-Id: <7feae1179cc24b8ecae71e14bc2085a4c465f74c.1613735605.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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" 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 | 3 +++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + 3 files changed, 5 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3f8593a9e5..600952a53a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -617,6 +617,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "cpu-max", "memory-backend-file.x-use-canonical-path-for-ramblock-id", "vnc-opts", + "migration-param.block-bitmap-mapping", ); @@ -1550,6 +1551,8 @@ 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/bitmaps/transf= orm", + QEMU_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 38574eef16..a5b6c7f104 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -597,6 +597,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ 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_VNC_OPTS, /* -vnc uses QemuOpts parser instead of custom cod= e */ + 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; diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index e68df54071..e7e6254293 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -256,6 +256,7 @@ + 5002050 0 43100242 --=20 2.29.2 From nobody Sat May 4 02:49:59 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=1613735930; cv=none; d=zohomail.com; s=zohoarc; b=gtjCNa1p3DNqHdKvO11GoriVLIvlrpFXTwzS7AyOBX3yo9q2+XeWhF59YjWK571LywD1TIupqNLHadQBHRyF2wxs51KlS1L4hGlMc/nO3+DNorIz4U9006z7AEChj8VhRckWWxoSuC14K0HrG3EABPnqcUGGq5Iq/qXcRG5RxU4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613735930; 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=q0/RmtgssjVc/DjDs12aB96dt5o9lKwXoRjyeP9BPo4=; b=CT9putitEV7O2IZNZrFjm5HYYE9Ewd7rpzxr9zXyNsl60q254kbSxoJAcoM7HFeMRITmEcON1CB+WC0peF1pU2at2YqnV6Zh4bYi5y3kEEKdeO24IuOrchX1QJ+QmeFI6Fk6ELWiDQ4OUzfDg13XkwsyYKpos+dwGKnqz7aYXpI= 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 1613735929695561.9967611033163; Fri, 19 Feb 2021 03:58:49 -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-495-oOXaKr56MTaRtvMScHNe7g-1; Fri, 19 Feb 2021 06:58:46 -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 E002C107ACED; Fri, 19 Feb 2021 11:58:40 +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 B372019C71; Fri, 19 Feb 2021 11:58:40 +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 757CB49; Fri, 19 Feb 2021 11:58:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBwcxq008322 for ; Fri, 19 Feb 2021 06:58:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id 67C146086F; Fri, 19 Feb 2021 11:58:38 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC0EE6085D for ; Fri, 19 Feb 2021 11:58:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735928; 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=q0/RmtgssjVc/DjDs12aB96dt5o9lKwXoRjyeP9BPo4=; b=Qr6ZJkt5AJKR60+yqNv6KoyQJiA7eFehApkiJmDdR4ELV81diwi0vAf9skn8Ng7kpe98Rd G6bSFYYTfRM6cZJOvdZlmhhTwqGmtJf5X+gYyEQR2h4dF2T0wU2XBXic6/BbkiD5jl+Y8W SH3VmjURZpkpc+1ijabTnDfITWP+yEA= X-MC-Unique: oOXaKr56MTaRtvMScHNe7g-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 03/15] qemu: Probe whether an image is 'qcow2 v2' from query-named-block-nodes Date: Fri, 19 Feb 2021 12:58:15 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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" 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 Reviewed-by: Jiri Denemark --- 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 32dc96ee82..0108703a33 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 f8c78d9093..3a07306365 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2978,6 +2978,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; @@ -3000,6 +3001,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 Sat May 4 02:49:59 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=1613735945; cv=none; d=zohomail.com; s=zohoarc; b=XMYQA50cMSlhUvub9Pqzht6C/PNY2J8hOQ6292x8MxHm0ssnNqOuGWL3rIlodwgfSKS1C85qCHAlDI+9FSEoG1TLlsAgO1ZWs+AD/fqt3yOclOTaRgZDkJelKTmHvZm4573yW1FXvt985vAxyYusyOhBjJoCC/dpyqS3xQNFrb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613735945; 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=OQnPOwrsJBfFOPlfXvl0oL9cFCuCxOvqXt6MB1ROTj0=; b=PAc4L+Qn98sG3qOJ0HmjjincCtf1RLMKnFksxNwxrh+4PMge5hE87RtYzqDu9pGUaw4dxHbggRMxZFm8vq3psdq0/kvGKo0XTAubs4NZIJNs2+hBSu3m6u9jpUef9sjMFFJrVeXpNakP6XEDVsNnuRp97mXdUDPTNZrW2K1XROU= 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 1613735945984950.191584508244; Fri, 19 Feb 2021 03:59:05 -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-539-eonHp_ogMUqc-imZIHLJTg-1; Fri, 19 Feb 2021 06:59:02 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 863F91083E9B; Fri, 19 Feb 2021 11:58:55 +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 6370717C5F; Fri, 19 Feb 2021 11:58:55 +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 2BA1257DFC; Fri, 19 Feb 2021 11:58:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBwdUK008329 for ; Fri, 19 Feb 2021 06:58:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id 65C786087C; Fri, 19 Feb 2021 11:58:39 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id C73DC6086F for ; Fri, 19 Feb 2021 11:58:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735944; 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=OQnPOwrsJBfFOPlfXvl0oL9cFCuCxOvqXt6MB1ROTj0=; b=ALE5FCo7FzgMKTKkdVjwVs8cs0a4/Df/dwqwBUy8AElYcwgD2lySapgucVw9jZUkyjyra1 18NXjZ101ZklaJZ40tTP9qF4HBeDh1EH/C7X2Nk9hQHiN9hdlaPgjH0/npeY6RpkAcnO9h 9/ao/+36fTePjpbtyFO6IjffSbLgcnY= X-MC-Unique: eonHp_ogMUqc-imZIHLJTg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 04/15] qemu: migration: Create qcow2 v3 images for VIR_MIGRATE_NON_SHARED_DISK Date: Fri, 19 Feb 2021 12:58:16 +0100 Message-Id: <1d4d44debae7f96266af5a15d8e98caa7363a54c.1613735605.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.11 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 the new format when pre-creating the image for the user. Users wishing to use the legacy format can always provide their own images or use hared storage. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/qemu/qemu_migration.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index e8e35c1c7c..94b9b34ca0 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -180,6 +180,7 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn, char *volStr =3D NULL; g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; const char *format =3D NULL; + const char *compat =3D NULL; unsigned int flags =3D 0; VIR_DEBUG("Precreate disk type=3D%s", virStorageTypeToString(disk->src= ->type)); @@ -212,8 +213,11 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn, if (!(pool =3D virStoragePoolLookupByTargetPath(*conn, basePath))) goto cleanup; format =3D virStorageFileFormatTypeToString(disk->src->format); - if (disk->src->format =3D=3D VIR_STORAGE_FILE_QCOW2) + if (disk->src->format =3D=3D VIR_STORAGE_FILE_QCOW2) { flags |=3D VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA; + /* format qcow2v3 image */ + compat =3D "1.1"; + } break; case VIR_STORAGE_TYPE_VOLUME: @@ -261,6 +265,8 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn, virBufferAddLit(&buf, "\n"); virBufferAdjustIndent(&buf, 2); virBufferAsprintf(&buf, "\n", format); + if (compat) + virBufferAsprintf(&buf, "%s\n", compat); virBufferAdjustIndent(&buf, -2); virBufferAddLit(&buf, "\n"); virBufferAdjustIndent(&buf, -2); --=20 2.29.2 From nobody Sat May 4 02:49:59 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 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 1613735945752249.52639663138382; Fri, 19 Feb 2021 03:59:05 -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-482-bUd61a4oNlGVapuu_KS-yg-1; Fri, 19 Feb 2021 06:59:00 -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 7C8AF192AB7F; Fri, 19 Feb 2021 11:58:55 +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 5A1845D9C6; Fri, 19 Feb 2021 11:58:55 +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 1F5CA1809C8F; Fri, 19 Feb 2021 11:58:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBwhIT008352 for ; Fri, 19 Feb 2021 06:58:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7FBAB60938; Fri, 19 Feb 2021 11:58:43 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9A4B6087C for ; Fri, 19 Feb 2021 11:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735944; 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=BDovlsWg4vgCfK2nL9Rp3DKTEBS8esi0dpuAMWGeKVo=; b=C9VoEkIFPfeiSVNkWDm+FZk6k3sC7+2kgqfcxY9lu0nzI9X57Pt/eDPkwZcrsxJymSnM8G YRDeCrItWQbvM2Ip9IGOD9MKkw2FwOCbWsjuKrGlM11mhSziMO5gV0qcQ7nz4O2N+5B7T8 +vt+la75L446I8UNmb1wq8k5vEjx1TA= X-MC-Unique: bUd61a4oNlGVapuu_KS-yg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 05/15] qemu: monitor: Introduce qemuMonitorBitmapRemove Date: Fri, 19 Feb 2021 12:58:17 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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" 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 151f69acef..ed35da17e1 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4653,6 +4653,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 0108703a33..d25c26343a 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 3a07306365..03224d4af2 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -9252,6 +9252,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 31652d4207..3dd1eb24c7 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 5a5976dbe4..82c74e2ef9 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 Sat May 4 02:49:59 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=1613735948; cv=none; d=zohomail.com; s=zohoarc; b=VhpJYcPuMgjKFFj54ll9T/CQ8vyoUKROe1c9m5KL8eK0jpmZYPf5EdybyWLVFn0LPUMzuKlC1s48SL+u3SWbB8Q7ssMhmjj95OcnrClTFkE3P0jz6g2EPTaYxXdyUO/Ga3z8KVwy4+WCnvBHaFj9VSw/ZQ4trXnxQl8et4AfJ5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613735948; 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=hq9zLZbFHbfl/pMwCmB4ceg6ryDXKooyjxmPOX5n/Ro=; b=JbfEb86gZAjOxoUKdNBWPoDTw1nf3sVdAiley1t2L7YOb3cxGRE/tGGgQKOnLfubZDtD2TYjfJ+ZhMigfXYgFWsCG4uNPRWD64fZcZjLEGPv7D/FoSRXyCBoP4V1kzbUoA17DO4AroICRL+UTdKpoqvHIpv7bV8Ple9NQD5kC+s= 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 161373594841229.54294471567789; Fri, 19 Feb 2021 03:59: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-35-en4Kc9pjN7C8e_RcYxq1Hw-1; Fri, 19 Feb 2021 06:59:05 -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 876EF1083EA5; Fri, 19 Feb 2021 11:58:58 +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 5E94410016FD; Fri, 19 Feb 2021 11:58:58 +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 262861809C92; Fri, 19 Feb 2021 11:58:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBwkOa008368 for ; Fri, 19 Feb 2021 06:58:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id ED5C960938; Fri, 19 Feb 2021 11:58:46 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F4D36087C for ; Fri, 19 Feb 2021 11:58:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735947; 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=hq9zLZbFHbfl/pMwCmB4ceg6ryDXKooyjxmPOX5n/Ro=; b=iDKZLscNdAs1Xq+l3/0k1oaYw8ekY7CJZtdUA1ZKrOktWizfmDS6F4RMAfK51d91/WuRQa ZP9wIMO/LqXzRkveej7PFvA9i1agLXueT0GfKs0SM/avlcv9/yvH3If8NIv1jGR1at8YMo 9Qn+R83E6Ib0RM06Zmgz4LT9B10N4dY= X-MC-Unique: en4Kc9pjN7C8e_RcYxq1Hw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 06/15] qemu: blockjob: Use qemuMonitorBitmapRemove for single bitmap removal Date: Fri, 19 Feb 2021 12:58:18 +0100 Message-Id: <230b1d351648c6090ea7985d40979fab48f7a290.1613735605.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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" 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 Sat May 4 02:49:59 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=1613735948; cv=none; d=zohomail.com; s=zohoarc; b=Mh2w4A7vn+IlgfeVWy1BUosgoIcbrkYHt+T5o1r9aF69sQnJ8FSg6bPX8Es6UQK0r77KgZl2l+Y/EES8wCceyYljx+CaHDVlYjdiBFyagheNbO6vpWbWj3LFvkY5YDPR/M/Aovqmo7xeutxYsdaLVjiWeaGzIY1rgsMdAzbAFt8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613735948; 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=tiQdLLw5APzyhz42Js5lMHUktJOwEY2ldbJ/an5sQKs=; b=mcGOhr+QawDZhQwQycQX6/7mcNfLChVisTVCPZHnatWwcBLiT1R0tc5Ada4IYsnCvjliUkL8LCRP/ibSy7sNUqqtxK7yJ1rhRjMBs3Gwovdp/cRXxWrgW+6pRlKTJ+Gp3eEGz/x6pRuloUSNcy3FKvIzenNJ9pjn143KISb6riA= 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 1613735947643897.5229152553105; Fri, 19 Feb 2021 03:59:07 -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-314-0YSJKeQ5NF21rI8bm41Ikg-1; Fri, 19 Feb 2021 06:59:04 -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 6DA1B1083EA4; Fri, 19 Feb 2021 11:58:58 +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 4B7F55C1BB; Fri, 19 Feb 2021 11:58:58 +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 1233D57DFF; Fri, 19 Feb 2021 11:58:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBwrOQ008384 for ; Fri, 19 Feb 2021 06:58:53 -0500 Received: by smtp.corp.redhat.com (Postfix) id EB3FF6087C; Fri, 19 Feb 2021 11:58:53 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47D876085D for ; Fri, 19 Feb 2021 11:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735946; 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=tiQdLLw5APzyhz42Js5lMHUktJOwEY2ldbJ/an5sQKs=; b=DqtCPCq9KT9t5bVHq+26OTLOTPXqQDE9XfGMDubxsJrHZjp83kd3U1s/PnXRsQeTqsVRK5 u3pzArjDI1hf03IGgGNJbMoW/0mBb6LXyPi0AwwpZ62RqPYdOC1AnfHhR0xRUyHnO4MZbk S3uvzWpC2EPxbqHzCDW2BfNPsy8rqBw= X-MC-Unique: 0YSJKeQ5NF21rI8bm41Ikg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 07/15] qemu: migration_params: Add infrastructure for 'dirty-bitmaps' migration feature Date: Fri, 19 Feb 2021 12:58:19 +0100 Message-Id: <59d990b504bb3611d833660866bf546c9e58acc0.1613735605.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 | 29 +++++++++++++++++++++++++++++ src/qemu/qemu_migration_params.h | 5 +++++ 2 files changed, 34 insertions(+) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index 510dad783a..e9b4601510 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,17 @@ qemuMigrationParamsToJSON(qemuMigrationParamsPtr migPa= rams) return NULL; } + if (migParams->blockDirtyBitmapMapping) { + g_autoptr(virJSONValue) mapping =3D virJSONValueCopy(migParams->bl= ockDirtyBitmapMapping); + + if (!mapping) + return NULL; + + if (virJSONValueObjectAppend(params, "block-bitmap-mapping", mappi= ng) < 0) + return NULL; + mapping =3D NULL; + } + return g_steal_pointer(¶ms); } @@ -1202,6 +1230,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 Sat May 4 02:49:59 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 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 1613736007806409.38344357633105; Fri, 19 Feb 2021 04:00:07 -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-347-u4d85U8JMym0NpcKyZoU5g-1; Fri, 19 Feb 2021 06:59:06 -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 E89F81083E93; Fri, 19 Feb 2021 11:58:59 +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 C63475C1BB; Fri, 19 Feb 2021 11:58:59 +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 831C958073; Fri, 19 Feb 2021 11:58:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBwwJo008414 for ; Fri, 19 Feb 2021 06:58:58 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5F39F60C5B; Fri, 19 Feb 2021 11:58:58 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id B269660918 for ; Fri, 19 Feb 2021 11:58:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613736006; 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=11iDNQuDu4CD0sMCmV0vYtHwxE22MYIejjs3ORMU+m4=; b=gsBMNcuxg46/eGu9P528/HtcE8+C9nguV/3oT01+1p7AhI8e5G4+IcP1TvNLDXtHOcoqqk 0cLkqQN7f6LzEDyILfDRSya6ooeiswS31hMWW1CEWmpSxNc1QTyqpwi2xs6ShzlYWjN6fs XR41OnvgjRGGqQWzPN/8y7r4Eurt8EI= X-MC-Unique: u4d85U8JMym0NpcKyZoU5g-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 08/15] qemu: migration_cookie: Add XML handling for setting up bitmap migration Date: Fri, 19 Feb 2021 12:58:20 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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" 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 | 146 +++++++++++++++++++++++++++++++ src/qemu/qemu_migration_cookie.h | 34 +++++++ 2 files changed, 180 insertions(+) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index 6f2b1b2f57..0f8555cbb0 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,65 @@ 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++) { + g_autoslist(qemuMigrationBlockDirtyBitmapsDiskBitmap) 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); + + if (!bitmap->bitmapname || !bitmap->alias) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("malformed in migrati= on cookie")); + return -1; + } + } + + disk =3D g_new0(qemuMigrationBlockDirtyBitmapsDisk, 1); + disk->target =3D virXMLPropString(disknodes[i], "target"); + disk->bitmaps =3D g_slist_reverse(g_steal_pointer(&bitmaps)); + + disks =3D g_slist_prepend(disks, disk); + + if (!disk->target) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("malformed in migration c= ookie")); + return -1; + } + } + + mig->blockDirtyBitmaps =3D g_slist_reverse(g_steal_pointer(&disks)); + + return 0; +} + + static int qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig, virQEMUDriverPtr driver, @@ -1275,6 +1416,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 Sat May 4 02:49:59 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=1613736008; cv=none; d=zohomail.com; s=zohoarc; b=ROJ8nB4tY+SsEi6JwRrQinp0zptLW+whwsj8T9sbcpVQW11CTja9/VLPBXG9YWfYi92xAq5A402YSOAgKPJy2FX43zpuRfB0UXHHoyKTyDLt17QrFZAU2FX62nJpPS8LD+FveL0ZI96/30KIbG65WQBUiNrJVF9e0wO9YhyhZqw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613736008; 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=ZW33DeuwDOzvUqD0oG88DBk98YwFQkUyQawFpNFA4Zw=; b=XfXL9xsqs6P/Jupd4KbCUEfmzesda+TxT+GiIKJFcglG+WdXqdBfjMsnIlHcO0C0UeLdGgaa3jY330nwbtlNJV0VlB49vx9yjwpyQ7nmRgdmTjmLT1WHkq4bR+sK4adKfI43xgG9AyHyNzAUVxvxKHcGscFUb5Se+19KTU1M7VI= 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 1613736007701809.2622893809219; Fri, 19 Feb 2021 04:00:07 -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-189-nV8qSGgvOy6jwJoaISX60g-1; Fri, 19 Feb 2021 06:59:09 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B6CDD107ACE6; Fri, 19 Feb 2021 11:59:03 +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 8E2896085D; Fri, 19 Feb 2021 11:59:03 +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 51BA758077; Fri, 19 Feb 2021 11:59:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBx2dD008459 for ; Fri, 19 Feb 2021 06:59:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 427E86085D; Fri, 19 Feb 2021 11:59:02 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id A62FE60873 for ; Fri, 19 Feb 2021 11:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613736005; 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=ZW33DeuwDOzvUqD0oG88DBk98YwFQkUyQawFpNFA4Zw=; b=OR09Emj6dIzp6rAezln0YttbUKnM9lW4u9ciyyDSD+FQ2epqA7Zub72yAZsUp540yeF1At DGfoT7mzNKNlATXvJN+XPQJWaLQFL7YX2o0pxARjl8vkH6qlQZa8ZUJwAyaJwbeVsbireJ mbVg7Hgwk1XUiTAErKuwVI6J2+Cybbs= X-MC-Unique: nV8qSGgvOy6jwJoaISX60g-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 09/15] qemu: migration_cookie: Add helpers for transforming the cookie into migration params Date: Fri, 19 Feb 2021 12:58:21 +0100 Message-Id: <2cd5d144340fbe95ede75dfc64ba466e2f7c547f.1613735605.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.13 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 | 8 +++ 2 files changed, 123 insertions(+) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index 0f8555cbb0..186fe7bc9e 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -1580,3 +1580,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..e50dee7ba7 100644 --- a/src/qemu/qemu_migration_cookie.h +++ b/src/qemu/qemu_migration_cookie.h @@ -226,3 +226,11 @@ 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 Sat May 4 02:49:59 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=1613735955; cv=none; d=zohomail.com; s=zohoarc; b=A8l0GxxBHlE/0CgdwqAmCzIbffPWLJFgPpQFtg/QtU9EDs5dleEMzKLyA/uftHeY6aZ19/GC+KAvY7duq6OG8Ja8+RiqxyVK6zcWeJUjevB6mO8zmjmwDt+GfdJuBRi4gXpRYQNu7fZfSGLriviDCHM5zla2AjMtwj6hpD+IbBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613735955; 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=4oolUYqaqi9IsUavuMCHuV7iR2NJncUsJtMAOuFcigY=; b=Ndn7clbCFpDyY5PmSUZ0oHEsJqqwcesb+lUL6kBlk14QKzIEyPl76kae8PGtCi0NCQe4uwmFRFtFLy9RZ9wktAv9BjQjvYHyBTDiDLBQEcDrB9LgBe8iVVySZhOYlx4dugO5ee+JnYLW+X12QrWjJQt+kZZ/6Ylv8f2ZENI1KRc= 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 1613735955126566.4914474898966; Fri, 19 Feb 2021 03:59:15 -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-218-yg_sjXPBNhmRhstkWG-n3Q-1; Fri, 19 Feb 2021 06:59:11 -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 9FF6C107ACF3; Fri, 19 Feb 2021 11:59:06 +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 7E43B5D6AD; Fri, 19 Feb 2021 11:59:06 +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 4607D18089C9; Fri, 19 Feb 2021 11:59:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBx3ji008475 for ; Fri, 19 Feb 2021 06:59:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 523DB6085D; Fri, 19 Feb 2021 11:59:03 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id A787A6086F for ; Fri, 19 Feb 2021 11:59:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735954; 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=4oolUYqaqi9IsUavuMCHuV7iR2NJncUsJtMAOuFcigY=; b=Y/cWSChGNXN0IP46ctxAyvGjyCvI2Fz9liz6qYluyXtH9i1sDcj/iEaMlVrVVQ9uq8rsBR KBhFttiT/EvDaecehjXY0QDIv57m4Ww4vxg7O8rma7HlmeYJEKMDyLZZF2F/VZapXcmsuN DV9hpyV6eteNyRM1Nf/fqrKUbp040v8= X-MC-Unique: yg_sjXPBNhmRhstkWG-n3Q-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 10/15] qemu: domain: Store list of temporary bitmaps for migration in status XML Date: Fri, 19 Feb 2021 12:58:22 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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" 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 | 87 ++++++++++++++++++++++++++++++++++++++++-- src/qemu/qemu_domain.h | 15 ++++++++ 2 files changed, 99 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 541d592bbe..bb14fe2e33 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); g_free(priv); } @@ -165,6 +180,28 @@ qemuDomainObjPrivateXMLFormatNBDMigration(virBufferPtr= buf, return 0; } + +static void +qemuDomainObjPrivateXMLFormatMigrateTempBitmap(virBufferPtr buf, + GSList *bitmaps) +{ + 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,12 @@ 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; + + qemuDomainObjPrivateXMLFormatMigrateTempBitmap(buf, priv->migTempB= itmaps); + } if (priv->migParams) qemuMigrationParamsFormat(buf, priv->migParams); @@ -267,6 +307,44 @@ qemuDomainObjPrivateXMLParseJobNBD(virDomainObjPtr vm, return 0; } + +static int +qemuDomainObjPrivateXMLParseMigrateTempBitmap(qemuDomainJobPrivatePtr jobP= riv, + xmlXPathContextPtr 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++) { + qemuDomainJobPrivateMigrateTempBitmapPtr bmp; + + bmp =3D g_new0(qemuDomainJobPrivateMigrateTempBitmap, 1); + bmp->nodename =3D virXMLPropString(nodes[i], "nodename"); + bmp->bitmapname =3D virXMLPropString(nodes[i], "name"); + + bitmaps =3D g_slist_prepend(bitmaps, bmp); + + if (!bmp->bitmapname || !bmp->nodename) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("malformed in status = XML")); + return -1; + } + + } + + jobPriv->migTempBitmaps =3D g_slist_reverse(g_steal_pointer(&bitmaps)); + return 0; +} + + static int qemuDomainParseJobPrivate(xmlXPathContextPtr ctxt, qemuDomainJobObjPtr job, @@ -277,6 +355,9 @@ qemuDomainParseJobPrivate(xmlXPathContextPtr ctxt, if (qemuDomainObjPrivateXMLParseJobNBD(vm, ctxt) < 0) return -1; + if (qemuDomainObjPrivateXMLParseMigrateTempBitmap(priv, ctxt) < 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 9a7d997d65..949307229b 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 Sat May 4 02:49:59 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 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 1613735958308874.3976729327641; Fri, 19 Feb 2021 03:59: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-488-XDHARlpQPrSHD7RWFL11yg-1; Fri, 19 Feb 2021 06:59:14 -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 A60D2108C1E1; Fri, 19 Feb 2021 11:59: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 82C3B60C61; Fri, 19 Feb 2021 11:59: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 1D1145807A; Fri, 19 Feb 2021 11:59:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBx4sG008500 for ; Fri, 19 Feb 2021 06:59:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id 751DA6085D; Fri, 19 Feb 2021 11:59:04 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id BED826086F for ; Fri, 19 Feb 2021 11:59:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735957; 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=wd0IH+LUHXu5Jjx/jIZ81Ljch2FITT5AObzbvkarWb8=; b=UDu8jYpDR3fk4OwFRc2ahhAvJvGlQsdf/l/68cAxk2YwnRBsXakRvKpKpKuqTOynkzxipy ulcD7gGFPbm0ZpIh4JWu+ashmGOllailS4BVfYbswv63EwIqY2NT/9ZEl4xktIQ1xT7+tG CE759/+aAApuCKP+XkeQFw8Quq/2rOE= X-MC-Unique: XDHARlpQPrSHD7RWFL11yg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 11/15] tests: qemustatusxml2xml: Add status XML from migration with bitmaps Date: Fri, 19 Feb 2021 12:58:23 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + + +
+ +