From nobody Mon Feb 9 10:43:28 2026 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=1641223651; cv=none; d=zohomail.com; s=zohoarc; b=A94dMLqflh0QtASMWbLxzPKaogJmltekNI2hqI547l8Zv0tdwsvFjyV+Xe9MJWXq2JorH6drrTX/G672WvzlmNwkcwLtFCBWg8NWeh6OvRMIH+nb8hWjcHmFybWdXEd4vOvVPKw0YGWHJWRcqvtvq9ysNpIq6Cdu88sbHyPSNwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641223651; 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=qMgcec0YleE55pM66ffq0nK0mwv/6XW3QJ9G7sOqePs=; b=hV6JFI1dc4HSZMP+acm9gdYMrUdsSm/rJJjyZBPpkfdalnjL6lpZSjhexrdBB57Afp5LF1eS0qHAKyB+dxoyLVMr+vzOfaqqvZSk/Q1rNVnOlHh7VKbLqUz1/WBhi70Dpv5hm+2dlBk/bDL2bjwXIPljsKHA3jdftzehkL01KY4= 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 1641223651169935.0445240684984; Mon, 3 Jan 2022 07:27:31 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-353-L_VFSWY3Nh-zJ2XKWeGllg-1; Mon, 03 Jan 2022 10:27:22 -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 33517192FDD5; Mon, 3 Jan 2022 15:26:21 +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 666752C1AE; Mon, 3 Jan 2022 15:26:20 +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 264FE4A7C8; Mon, 3 Jan 2022 15:26:20 +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 203FQ3Bo024180 for ; Mon, 3 Jan 2022 10:26:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id CADBC84D0A; Mon, 3 Jan 2022 15:26:03 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26DBB85EE0 for ; Mon, 3 Jan 2022 15:26:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641223650; 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=qMgcec0YleE55pM66ffq0nK0mwv/6XW3QJ9G7sOqePs=; b=I0eT27ijQ/FfeIEOoeHrZ1KgC+dLmNWNJbhIs0CVjUEGFsKHH9NgiA4Wa9QrHlL8D0EoEk zSY6Ko9FI8vDNAJ0MSvupfL67rPtRHKdx+1PsekpMpKQ5tfHRRrxUzj9bveYbQeUt6MhJZ hTVnPxa95q9/HbDZDOEezwbs1JvRVf0= X-MC-Unique: L_VFSWY3Nh-zJ2XKWeGllg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/3] qemu: capabilities: Condemn the use of 'device.json' capability name Date: Mon, 3 Jan 2022 16:25:55 +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) X-ZM-MESSAGEID: 1641223652938100003 Content-Type: text/plain; charset="utf-8" As a workaround for users using 'libvirt-7.9' and 'libvirt-7.10' with 'qemu-6.2' who wish to use device hot-unplug we are going to be suggesting to filter out the 'device.json' qemu capability via either the global 'qemu.conf' config: capability_filters =3D [ "device.json" ] or the per-VM XML capability override: [...] Doing this poisons the capability name 'device.json' for any further use, so to ensure that we can re-add JSON usage for -device also for users which filtered it out originally once it's fixed in qemu we need to condemn the old name and add a new one. To achieve this the old capability is renamed to 'X_QEMU_CAPS_DEVICE_JSON_BROKEN' and a new capability 'QEMU_CAPS_DEVICE_JSON' is mapped to 'device.json-fixed'. For now we leave it unasserted, but this allows to keep all the code in place. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 ++- src/qemu/qemu_capabilities.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2efe5776f8..e650e81ab8 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -649,10 +649,11 @@ VIR_ENUM_IMPL(virQEMUCaps, "chardev.json", /* QEMU_CAPS_CHARDEV_JSON */ /* 415 */ - "device.json", /* QEMU_CAPS_DEVICE_JSON */ + "device.json", /* X_QEMU_CAPS_DEVICE_JSON_BROKEN */ "query-dirty-rate", /* QEMU_CAPS_QUERY_DIRTY_RATE */ "rbd-encryption", /* QEMU_CAPS_RBD_ENCRYPTION */ "sev-guest-kernel-hashes", /* QEMU_CAPS_SEV_GUEST_KERNEL_HAS= HES */ + "device.json-fixed" /* QEMU_CAPS_DEVICE_JSON */ ); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index aaac20a834..43cf8464ae 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -628,10 +628,11 @@ typedef enum { /* virQEMUCapsFlags grouping marker fo= r syntax-check */ QEMU_CAPS_CHARDEV_JSON, /* -chardev accepts JSON */ /* 415 */ - QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON */ + X_QEMU_CAPS_DEVICE_JSON_BROKEN, /* -device accepts JSON - unused due a= qemu regression */ QEMU_CAPS_QUERY_DIRTY_RATE, /* accepts query-dirty-rate */ QEMU_CAPS_RBD_ENCRYPTION, /* Ceph RBD encryption support */ QEMU_CAPS_SEV_GUEST_KERNEL_HASHES, /* sev-guest.kernel-hashes=3D */ + QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; --=20 2.31.1