From nobody Thu Apr 17 18:07:03 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695043818; cv=none; d=zohomail.com; s=zohoarc; b=YwrqX1BMIVtVfieS48Wp0eqW7QXCrLiFukUJl0KEIF+i/uf1X4oOLcvGzDitg3D0trJb15apOXKY6SwsR5JOIZKxX4PS8hjlO/6LlKldCg800dVVYC7XJThHbX52xFgX1jkrSPejtgFQES6++IhWrPGxScgotrqdiSybtgO4y44= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695043818; 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=1SF6ufDjHCysFHDhUXbRIQFNqcPE/00mDEjAFrgOPD0=; b=ZjsjxpjAHJyboOMV4MhLCMDV85FNC5vCmYcJZX0V1ADRKPoqSRnUHQBLg0ew1oX/+ZqUUSJOlSTmXAQzHErStbeozUy5ySSo6ex+gglQesIRa1KBZxXZ9B9a1PS9witwvc/KZP8Jz+vCps23oLag29TQdigRvSa3ReuN0VrqL0g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1695043818279232.4914258469064; Mon, 18 Sep 2023 06:30:18 -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-192-yS07cptFMvyg0KaxH2yVAQ-1; Mon, 18 Sep 2023 09:30:14 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0AFF4185A78E; Mon, 18 Sep 2023 13:30:09 +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 E3E1940C2011; Mon, 18 Sep 2023 13:30:08 +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 65EF319465B9; Mon, 18 Sep 2023 13:29:50 +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 33240194658D for ; Mon, 18 Sep 2023 13:29:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 166081C5BB; Mon, 18 Sep 2023 13:29:39 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.226.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD9C21C554 for ; Mon, 18 Sep 2023 13:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695043817; 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=1SF6ufDjHCysFHDhUXbRIQFNqcPE/00mDEjAFrgOPD0=; b=Mj2GHH0UTPXRSbBxdD9mclb8yyc4UZdYedH9vDXDMbDAdY1sMbIRdGKYO1ZqadS73KzgBM HtRNR/i7Y2jv7+o1bLA68v+3PtvrQRk7/qEliqdW+6airqRw0DraU0uRDV73ufsvJ0XDrQ Tzf1Y7reR58qXL3hVFEL0TZFOT5saVM= X-MC-Unique: yS07cptFMvyg0KaxH2yVAQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v3 09/10] capabilities: report full external snapshot support Date: Mon, 18 Sep 2023 15:29:26 +0200 Message-ID: <5a29b5df570aa781e6b989bcdfa11f55b98da08b.1695043512.git.phrdina@redhat.com> In-Reply-To: References: 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.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695043820303100001 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 Reviewed-by: Peter Krempa --- docs/formatcaps.rst | 7 +++++++ 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, 24 insertions(+) diff --git a/docs/formatcaps.rst b/docs/formatcaps.rst index bb8bc663d2..95502c511f 100644 --- a/docs/formatcaps.rst +++ b/docs/formatcaps.rst @@ -134,6 +134,12 @@ The ```` element will typically wrap up the fo= llowing elements: creating external disk snapshots is supported. If absent, creating e= xternal 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 deleting and + reverting external snapshots including memory state. Support for cre= ation + of external snapshots is reported via the ``disksnapshot`` feature f= lag. + Management applications can now switch from internal snapshots to ex= ternal + snapshots. :since:`Since 9.7.0` =20 Examples ~~~~~~~~ @@ -318,6 +324,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 3a1bfbf74d..83119e871a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1122,6 +1122,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