From nobody Sat May 18 23:23:24 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=1692894133; cv=none; d=zohomail.com; s=zohoarc; b=iD3y584iMXv1cxgaj4isGrwq9CK7USocx8zV/ypyeFLtdwpkOV0cav8PM8M23ytPWhCtXPl0FcXcRaMvn1zSmM/FUzJs+XHur7GYh9tE0tZMmR1QybQFRNVrOrKK2iKOCDxHd9fdGRbCGWfDlA7sPYWuHyhe+47dNXDDql3G4p4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692894133; 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=Tl0JtMz6Bc6+VK1yJ8V5qy054RoyLEHW+TZY/lwNV40=; b=G08JEl4u1ZPcGG29Qlceuf2hBIg/WdXirekC8vn1NUffL/N/uSWjctHFHMRlvm0R7QSmFFiD0Uz9U0o1u0qesFwOIQXvsgsr1arwOnIW8gsjyq2UKfGWGREivkcGbi2kV0iW4CDaxdp42b9QI1r6/wef09aA7//ZP9BhpOGa1/w= 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 1692894133721723.6029918858263; Thu, 24 Aug 2023 09:22:13 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-215-7SS7U4r6N7GhSwjGUvmT4g-1; Thu, 24 Aug 2023 12:22:09 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7BFEC3C0D863; Thu, 24 Aug 2023 16:22:04 +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 C1E1D1121314; Thu, 24 Aug 2023 16:22:03 +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 8E30C19465BC; Thu, 24 Aug 2023 16:21:52 +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 E01241946589 for ; Thu, 24 Aug 2023 16:21:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C0B3A568FF; Thu, 24 Aug 2023 16:21:50 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.226.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 621AE6B2B3 for ; Thu, 24 Aug 2023 16:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692894132; 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=Tl0JtMz6Bc6+VK1yJ8V5qy054RoyLEHW+TZY/lwNV40=; b=BFYxFHiDAxtvs0vXWTEDPu4HNA31QbLbbpHXalbJXItM62FX4m4kIElboAr9HkIF1QQCG5 mOYwzMPiuBRdrSa8489ZyvqVARvsbuGaS66yPdGKqCFmKY24wQyLLU0gMx8D42012bq6su ch+9ymhydvR+nhzflgIMA4JojFW70Yc= X-MC-Unique: 7SS7U4r6N7GhSwjGUvmT4g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/2] capabilities: reword disksnapshot feature to mention creating snapshots Date: Thu, 24 Aug 2023 18:21:40 +0200 Message-ID: <22eddde4a425c470070d67f6bfce7ff1ba7f6ac7.1692894010.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.3 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: 1692894135089100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Libvirt supports creating snapshots for a long time but the wording of the feature may imply that libvirt supports external snapshots in general but that is not true as users were not able to use APIs to delete or revert external snapshots. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- docs/formatcaps.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/formatcaps.rst b/docs/formatcaps.rst index f7e5342654..bb8bc663d2 100644 --- a/docs/formatcaps.rst +++ b/docs/formatcaps.rst @@ -131,9 +131,9 @@ The ```` element will typically wrap up the fol= lowing elements: :since:`Since 0.8.8` ``disksnapshot`` If this element is present, the ``default`` attribute describes whet= her - 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` + 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` =20 Examples ~~~~~~~~ --=20 2.41.0 From nobody Sat May 18 23:23:24 2024 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=1692894133; cv=none; d=zohomail.com; s=zohoarc; b=Q+MuQwtpLsys7m9EeuQRlYRiuTelq0ItRuRZMYiHsfvHayAbyubm1rO4GccKWuSWJx6WEFkWobRKVOFeCjmz+yJerEC/o/e9HB7k3SlbknXyG1QqkNILGX7FA/f9YSEvwRP0E0S3veY2v2NhHvzyM9JHFn19vkJKii8FB7StBC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692894133; 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=JB/WG/zA9uGyrwwGgm1FU3lbXRdh+fAvms+q2GB4HAQ=; b=cvKugVgQlacNaU3JsQpt/g3GtARStTlGdF+kQiOaWGogROntSnsDNYyVcrYYVpZ90ToK6pSHGIyRweUBU2wpm5j+zS+7HJDpifmr6+FQ/nFdgXPtuBMYfaGsCDszcFzXkQrgXRtxJhe+usHXkIk+JAKbgGg/5Z/P1zYcwGg/SOA= 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 1692894133600439.9940999005738; Thu, 24 Aug 2023 09:22:13 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-556-hTSUhIP3MeyeNUvm2-OzlA-1; Thu, 24 Aug 2023 12:22:08 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7B6461C07260; Thu, 24 Aug 2023 16:22:04 +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 16B74492B0F; Thu, 24 Aug 2023 16:22:04 +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 C3E161946A4E; Thu, 24 Aug 2023 16:21:54 +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 8E5B019465BB for ; Thu, 24 Aug 2023 16:21:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8309E6B2B4; Thu, 24 Aug 2023 16:21:51 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.226.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 07043568FF for ; Thu, 24 Aug 2023 16:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692894132; 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=JB/WG/zA9uGyrwwGgm1FU3lbXRdh+fAvms+q2GB4HAQ=; b=CnNT7NGfVhDsStw+LQwdY/aCfHjOu5he5VKIOe4M3P89qChIfuYEEoV+mHKTvSXzw2fZCD I+Sc21RqM/iS9Wui7z4ZGTzmLKi3v+zzqHL1+d3khV2rwKaH8GuqqrQn6bGUlzh2qDcya+ dmg7BdmuaC/5xjtWBiOgH/FUnrJmXWs= X-MC-Unique: hTSUhIP3MeyeNUvm2-OzlA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/2] capabilities: report full external snapshot support Date: Thu, 24 Aug 2023 18:21:41 +0200 Message-ID: <9347723d79dcca0fe7236a770080e5d6b4cbf170.1692894010.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.9 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: 1692894136260100003 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 | 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 bb8bc663d2..255180135d 100644 --- a/docs/formatcaps.rst +++ b/docs/formatcaps.rst @@ -134,6 +134,11 @@ 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. Creating extern= al + snapshots is supported for long time. Management applications can now + switch from internal snapshots to external snapshots. :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