From nobody Sat May 18 15:49:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1692891005; cv=none; d=zohomail.com; s=zohoarc; b=g4TUDuwpxRR/V8QRX5Gt15/dgkj2+hpm0UsJ0DSrtW8vTP/v1KnGbBAoYSmqMiROSwaJHvOSb8aYrhu1vix/vQBhRHXBYYaA/MaiWE4hDNqBzK8Xf+048cCP/YQKveg8zMX3zKL8/v4lTIG8ihLa/8tvswi7Ty0niosY/FWZatY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692891005; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=GNeBqpjMmR4319Vc01rXablXijy7KhnsD771ASvvhjQ=; b=m4rC/GX2+iCsjQErkPh8RyCB1qaCzbEkm9iUosaycvSMms3R+3M5agqGDC30HX0pDMK3ou6124DCldNFn33hj3YJH44mOiActbgTxkOQ5vGrAKbUpQgZxhqpU4Id7NqLWod0zlfTNU16BxNooCypnHRHIWp1yWFG1BFk/k2ZwtM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1692891005470742.6943027511811; Thu, 24 Aug 2023 08:30:05 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-685-NFqEhe6vMmyo_Xn3bTxkpQ-1; Thu, 24 Aug 2023 11:30:00 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0BCEB101038F; Thu, 24 Aug 2023 15:29:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7DBB492C13; Thu, 24 Aug 2023 15:29:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CAE7919465A0; Thu, 24 Aug 2023 15:29:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BF0801946589 for ; Thu, 24 Aug 2023 15:29:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 983096B595; Thu, 24 Aug 2023 15:29:56 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.226.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 385096B2B3 for ; Thu, 24 Aug 2023 15:29:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692891004; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GNeBqpjMmR4319Vc01rXablXijy7KhnsD771ASvvhjQ=; b=bH53cWhnVlbPxLyzFEehhLpY4uifXv5VlzXVtIvdwSGd6WoM8fozeco28unKDJPhnCqquy CkG/zxQprA23NI26z86judamXXDalMi27uy8tEyjveweIkazPxxNv9XlhzfB8YIUvuWRAj zeINxoRO1YokzMuj+m0SIOsRH0zLtRQ= X-MC-Unique: NFqEhe6vMmyo_Xn3bTxkpQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH] capabilities: report full external snapshot support Date: Thu, 24 Aug 2023 17:29:49 +0200 Message-ID: <96386335016deb084c08e15bfe156a68ead5d3af.1692890863.git.phrdina@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1692891006865100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Now that deleting and reverting external snapshots is implemented we can report that in capabilities so management applications can use that information and start using external snapshots. Signed-off-by: Pavel Hrdina --- docs/formatcaps.rst | 6 ++++++ src/conf/capabilities.c | 1 + src/conf/capabilities.h | 1 + src/conf/schemas/capability.rng | 5 +++++ src/qemu/qemu_capabilities.c | 1 + tests/qemucaps2xmloutdata/caps.aarch64+hvf.xml | 1 + tests/qemucaps2xmloutdata/caps.aarch64.xml | 1 + tests/qemucaps2xmloutdata/caps.ppc.xml | 1 + tests/qemucaps2xmloutdata/caps.ppc64.xml | 1 + tests/qemucaps2xmloutdata/caps.riscv64.xml | 1 + tests/qemucaps2xmloutdata/caps.s390x.xml | 1 + tests/qemucaps2xmloutdata/caps.sparc.xml | 1 + tests/qemucaps2xmloutdata/caps.x86_64+hvf.xml | 1 + tests/qemucaps2xmloutdata/caps.x86_64.xml | 1 + 14 files changed, 23 insertions(+) diff --git a/docs/formatcaps.rst b/docs/formatcaps.rst index f7e5342654..0e056914b8 100644 --- a/docs/formatcaps.rst +++ b/docs/formatcaps.rst @@ -134,6 +134,11 @@ The ```` element will typically wrap up the fo= llowing elements: external disk snapshots are supported. If absent, external snapshots= may still be supported, but it requires attempting the API and checking = for an error to find out for sure. :since:`Since 1.2.3` + ``externalSnapshot`` + If this element is present, the hypervisor supports creating, deleti= ng and + reverting external snapshots including memory state and management + applications can switch from internal snapshots to external snapshot= s. + :since:`Since 9.7.0` =20 Examples ~~~~~~~~ @@ -318,6 +323,7 @@ capabilities enabled in the chip and BIOS you will see: + =20 diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 56768ce6e0..34f04cb7d3 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -508,6 +508,7 @@ static const struct virCapsGuestFeatureInfo virCapsGues= tFeatureInfos[VIR_CAPS_GU [VIR_CAPS_GUEST_FEATURE_TYPE_DEVICEBOOT] =3D { "deviceboot", false }, [VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT] =3D { "disksnapshot", true = }, [VIR_CAPS_GUEST_FEATURE_TYPE_HAP] =3D { "hap", true }, + [VIR_CAPS_GUEST_FEATURE_TYPE_EXTERNAL_SNAPSHOT] =3D { "externalSnapsho= t", false }, }; =20 =20 diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h index c78e3e52fa..9eaf6e2807 100644 --- a/src/conf/capabilities.h +++ b/src/conf/capabilities.h @@ -40,6 +40,7 @@ typedef enum { VIR_CAPS_GUEST_FEATURE_TYPE_DEVICEBOOT, VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT, VIR_CAPS_GUEST_FEATURE_TYPE_HAP, + VIR_CAPS_GUEST_FEATURE_TYPE_EXTERNAL_SNAPSHOT, =20 VIR_CAPS_GUEST_FEATURE_TYPE_LAST } virCapsGuestFeatureType; diff --git a/src/conf/schemas/capability.rng b/src/conf/schemas/capability.= rng index 83b414961a..b1968df258 100644 --- a/src/conf/schemas/capability.rng +++ b/src/conf/schemas/capability.rng @@ -493,6 +493,11 @@ + + + + + diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 40eacf0f4d..05cc11218a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1121,6 +1121,7 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps, virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_DEVI= CEBOOT); virCapabilitiesAddGuestFeatureWithToggle(guest, VIR_CAPS_GUEST_FEATURE= _TYPE_DISKSNAPSHOT, true, false); + virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_EXTE= RNAL_SNAPSHOT); =20 if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_TCG)) { virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_QEMU, diff --git a/tests/qemucaps2xmloutdata/caps.aarch64+hvf.xml b/tests/qemucap= s2xmloutdata/caps.aarch64+hvf.xml index b53a886b90..b9a5b5a1d6 100644 --- a/tests/qemucaps2xmloutdata/caps.aarch64+hvf.xml +++ b/tests/qemucaps2xmloutdata/caps.aarch64+hvf.xml @@ -21,6 +21,7 @@ + =20 diff --git a/tests/qemucaps2xmloutdata/caps.aarch64.xml b/tests/qemucaps2xm= loutdata/caps.aarch64.xml index 5dca6d3102..61512ed740 100644 --- a/tests/qemucaps2xmloutdata/caps.aarch64.xml +++ b/tests/qemucaps2xmloutdata/caps.aarch64.xml @@ -21,6 +21,7 @@ + =20 diff --git a/tests/qemucaps2xmloutdata/caps.ppc.xml b/tests/qemucaps2xmlout= data/caps.ppc.xml index e7ba391795..86d6b85ae0 100644 --- a/tests/qemucaps2xmloutdata/caps.ppc.xml +++ b/tests/qemucaps2xmloutdata/caps.ppc.xml @@ -19,6 +19,7 @@ + =20 diff --git a/tests/qemucaps2xmloutdata/caps.ppc64.xml b/tests/qemucaps2xmlo= utdata/caps.ppc64.xml index 85623f3980..90859f9594 100644 --- a/tests/qemucaps2xmloutdata/caps.ppc64.xml +++ b/tests/qemucaps2xmloutdata/caps.ppc64.xml @@ -20,6 +20,7 @@ + =20 diff --git a/tests/qemucaps2xmloutdata/caps.riscv64.xml b/tests/qemucaps2xm= loutdata/caps.riscv64.xml index 09b7eb7f2f..c6fa950211 100644 --- a/tests/qemucaps2xmloutdata/caps.riscv64.xml +++ b/tests/qemucaps2xmloutdata/caps.riscv64.xml @@ -19,6 +19,7 @@ + =20 diff --git a/tests/qemucaps2xmloutdata/caps.s390x.xml b/tests/qemucaps2xmlo= utdata/caps.s390x.xml index bb82a15040..6379ab73e6 100644 --- a/tests/qemucaps2xmloutdata/caps.s390x.xml +++ b/tests/qemucaps2xmloutdata/caps.s390x.xml @@ -20,6 +20,7 @@ + =20 diff --git a/tests/qemucaps2xmloutdata/caps.sparc.xml b/tests/qemucaps2xmlo= utdata/caps.sparc.xml index 9d977c4102..b5b158e430 100644 --- a/tests/qemucaps2xmloutdata/caps.sparc.xml +++ b/tests/qemucaps2xmloutdata/caps.sparc.xml @@ -19,6 +19,7 @@ + =20 diff --git a/tests/qemucaps2xmloutdata/caps.x86_64+hvf.xml b/tests/qemucaps= 2xmloutdata/caps.x86_64+hvf.xml index 356819a6c6..f5e49ba4db 100644 --- a/tests/qemucaps2xmloutdata/caps.x86_64+hvf.xml +++ b/tests/qemucaps2xmloutdata/caps.x86_64+hvf.xml @@ -22,6 +22,7 @@ + =20 diff --git a/tests/qemucaps2xmloutdata/caps.x86_64.xml b/tests/qemucaps2xml= outdata/caps.x86_64.xml index 35359780c4..8dd1439a80 100644 --- a/tests/qemucaps2xmloutdata/caps.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps.x86_64.xml @@ -22,6 +22,7 @@ + =20 --=20 2.41.0