From nobody Sun Feb 8 21:48:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1574686515; cv=none; d=zohomail.com; s=zohoarc; b=fuR0DYxx8S4ZibPnfwA0HEqSbrXLvG0s78udh9RRi//b23+5VhiYV11/UPjfWNkRTN1P2byNDca1wyWik0b14kYcD2C71FUo5OBQ1oXfQIBzZL2Fz+1Fr5VJFo/vPBc8e04amDH4ysHuDOD6VnHM88G8goZ845PHKEb+kfN7WbQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686515; 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=ib1iiaT8eAu1RVPYmG6tmOVTiY0qxsbeGxEulQdGu94=; b=Fqmn3dM+rJBS+amhjUnWRpfTwP/aWE9snJRC9YVsrsCI4xj4Noyh6d34nxL3LAbzT5c56WlECu2XgIxLFgmMfWDM5xk55GBjG8TF18v4Yo/8tSyI778v02yr/4TSsJAAC+i+xF7IrhhWV00vEJRrvOxlhm/sndatAiLZvD4OFXo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1574686515681382.1324085799987; Mon, 25 Nov 2019 04:55: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-428-prHtkBsAPfyVDhHCTp_B2w-1; Mon, 25 Nov 2019 07:54:30 -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 26C231876593; Mon, 25 Nov 2019 12:54:20 +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 F10535C219; Mon, 25 Nov 2019 12:54:19 +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 A8D234E572; Mon, 25 Nov 2019 12:54:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCs45O016682 for ; Mon, 25 Nov 2019 07:54:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6785F600CA; Mon, 25 Nov 2019 12:54:04 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id E38A6600C6 for ; Mon, 25 Nov 2019 12:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686514; 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=ib1iiaT8eAu1RVPYmG6tmOVTiY0qxsbeGxEulQdGu94=; b=FbfNyeAFkDQeZN51e+Epj88//Ok8je4ZIB0ntQE8gMXegnvNq5CgQtPo4zXGRpLsGMTayA Y7F5aGBqbUPpfGdL9DCcbCXUjqlKLgkM3qnlG3t6ECUKn62tHcDVA5zETL/Fe0khlBoGeq cXYL9zP/E8oXBZ3VBjJMsQFnCKpnxpU= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:53 +0100 Message-Id: <058e628abaf35f515beb9d39e7bd7a5225551a06.1574686331.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 8/9] qemu: capabilities: Lock out incremental backup capability without blockdev 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 X-MC-Unique: prHtkBsAPfyVDhHCTp_B2w-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Blockdev is required to do incremental backups properly. Add a helper function for locking out capabilities and export it to allow re-doing the processing if a different code path modifies capabilities. Signed-off-by: Peter Krempa Reviewed-by: Cole Robinson --- src/qemu/qemu_capabilities.c | 17 +++++++++++++++++ src/qemu/qemu_capabilities.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7c0533aef5..124619b733 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4577,6 +4577,21 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCapsPtr qemuCap= s) } +/** + * virQEMUCapsInitProcessCapsInterlock: + * @qemuCaps: QEMU capabilities + * + * A capability which requires a different capability being present in ord= er + * for libvirt to be able to drive it properly should be processed here. + */ +void +virQEMUCapsInitProcessCapsInterlock(virQEMUCapsPtr qemuCaps) +{ + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) + virQEMUCapsClear(qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP); +} + + /** * virQEMUCapsInitProcessCaps: * @qemuCaps: QEMU capabilities @@ -4627,6 +4642,8 @@ virQEMUCapsInitProcessCaps(virQEMUCapsPtr qemuCaps) virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_DISK_DEVICE_ID) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_SAVEVM_MONITOR_NODES)) virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKDEV); + + virQEMUCapsInitProcessCapsInterlock(qemuCaps); } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 3fd8bebe79..4d7d836e8c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -555,6 +555,8 @@ void virQEMUCapsClear(virQEMUCapsPtr qemuCaps, bool virQEMUCapsGet(virQEMUCapsPtr qemuCaps, virQEMUCapsFlags flag); +void virQEMUCapsInitProcessCapsInterlock(virQEMUCapsPtr qemuCaps); + bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps, const virDomainDef *def); --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list