From nobody Sun Feb 8 13:09:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1615222560; cv=none; d=zohomail.com; s=zohoarc; b=dcWg1ro7mBJ9tspqJyJzcXdBZcLmR3gaF0iMl0mQjjTqSvwXNg5RQ7+TDf+gW+n/7vrhCI1PyFDeSa1R0hbG4II2PR6NDu/34WIiF19+MIgt6hU1k52XH0qHwEq+CchJqlt6ByddTPOIgffmCRUIRjAz24irz9Xr5aw1xjUmWDI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615222560; h=Content-Type:Content-Transfer-Encoding:Cc: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=zplTMilwm4Oqd/sBVhFB4AOzdaT1SOWzGDYsM/FrPfk=; b=HDylP1hnqYuT8zI6rBDudES6vzca+SuhcKcYuxuPLb7svscl/Y5wIdJ634Zka4ZElrWF1q1MMsTB81lmUg+iDT4Av4+UbdBPm5BT54B4DU7lXs0wy827w+C/3oEZbetBfU53UaiKQURO3MPTMgBF68E/fJtX0BnR5PGNg3wfWsM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615222560093502.11456286989494; Mon, 8 Mar 2021 08:56:00 -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-175-cf7KbMaFOZeKflSHXPCUdQ-1; Mon, 08 Mar 2021 11:55:56 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B1AA2E5763; Mon, 8 Mar 2021 16:55:49 +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 8D4F560854; Mon, 8 Mar 2021 16:55:49 +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 2A2B557DC3; Mon, 8 Mar 2021 16:55:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 128GtmPp022726 for ; Mon, 8 Mar 2021 11:55:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6C77E4EF69; Mon, 8 Mar 2021 16:55:48 +0000 (UTC) Received: from merkur.fritz.box (ovpn-112-100.ams2.redhat.com [10.36.112.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9F7E5D9D3; Mon, 8 Mar 2021 16:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615222559; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=zplTMilwm4Oqd/sBVhFB4AOzdaT1SOWzGDYsM/FrPfk=; b=dgqFL8n3bZEBKkvocsP3ei5Gff6kTjoBs7dpjmU5hf5lx0VpUY9eImHfyg2o+clug2wrbE 1uWlJiA9bz4xhYC+BUj9/zukaBfyOCXww+iPrK0uYhr/yKhZSSF3CkkVVCFbREka7MPpzS rX2+spNlfF9afc+qc5ZmvDkejRCBO64= X-MC-Unique: cf7KbMaFOZeKflSHXPCUdQ-1 From: Kevin Wolf To: qemu-devel@nongnu.org Subject: [PATCH v3 07/30] qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened' Date: Mon, 8 Mar 2021 17:54:17 +0100 Message-Id: <20210308165440.386489-8-kwolf@redhat.com> In-Reply-To: <20210308165440.386489-1-kwolf@redhat.com> References: <20210308165440.386489-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, lvivier@redhat.com, thuth@redhat.com, pkrempa@redhat.com, ehabkost@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, jasowang@redhat.com, mreitz@redhat.com, kraxel@redhat.com, pbonzini@redhat.com, dgilbert@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.79 on 10.5.11.13 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) Content-Type: text/plain; charset="utf-8" This adds a QAPI schema for the properties of the rng-* objects. The 'opened' property doesn't seem to make sense as an external interface: It is automatically set to true in ucc->complete, and explicitly setting it to true earlier just means that trying to set additional options will result in an error. After the property has once been set to true (i.e. when the object construction has completed), it can never be reset to false. In other words, the 'opened' property is useless. Mark it as deprecated in the schema from the start. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/qom.json | 56 ++++++++++++++++++++++++++++++++++++-- docs/system/deprecated.rst | 9 ++++++ 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index 8c0e06c198..6d3b8c4fe0 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -382,6 +382,52 @@ '*hugetlbsize': 'size', '*seal': 'bool' } } =20 +## +# @RngProperties: +# +# Properties for objects of classes derived from rng. +# +# @opened: if true, the device is opened immediately when applying this op= tion +# and will probably fail when processing the next option. Don't u= se; +# only provided for compatibility. (default: false) +# +# Features: +# @deprecated: Member @opened is deprecated. Setting true doesn't make se= nse, +# and false is already the default. +# +# Since: 1.3 +## +{ 'struct': 'RngProperties', + 'data': { '*opened': { 'type': 'bool', 'features': ['deprecated'] } } } + +## +# @RngEgdProperties: +# +# Properties for rng-egd objects. +# +# @chardev: the name of a character device backend that provides the conne= ction +# to the RNG daemon +# +# Since: 1.3 +## +{ 'struct': 'RngEgdProperties', + 'base': 'RngProperties', + 'data': { 'chardev': 'str' } } + +## +# @RngRandomProperties: +# +# Properties for rng-random objects. +# +# @filename: the filename of the device on the host to obtain entropy from +# (default: "/dev/urandom") +# +# Since: 1.3 +## +{ 'struct': 'RngRandomProperties', + 'base': 'RngProperties', + 'data': { '*filename': 'str' } } + ## # @ObjectType: # @@ -400,7 +446,10 @@ 'iothread', 'memory-backend-file', 'memory-backend-memfd', - 'memory-backend-ram' + 'memory-backend-ram', + 'rng-builtin', + 'rng-egd', + 'rng-random' ] } =20 ## @@ -432,7 +481,10 @@ 'memory-backend-file': 'MemoryBackendFileProperties', 'memory-backend-memfd': { 'type': 'MemoryBackendMemfdPropertie= s', 'if': 'defined(CONFIG_LINUX)' }, - 'memory-backend-ram': 'MemoryBackendProperties' + 'memory-backend-ram': 'MemoryBackendProperties', + 'rng-builtin': 'RngProperties', + 'rng-egd': 'RngEgdProperties', + 'rng-random': 'RngRandomProperties' } } =20 ## diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 893f3e8579..3dac79f600 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -153,6 +153,15 @@ The ``-writeconfig`` option is not able to serialize t= he entire contents of the QEMU command line. It is thus considered a failed experiment and deprecated, with no current replacement. =20 +``opened`` property of ``rng-*`` objects (since 6.0.0) +'''''''''''''''''''''''''''''''''''''''''''''''''''''' + +The only effect of specifying ``opened=3Don`` in the command line or QMP +``object-add`` is that the device is opened immediately, possibly before a= ll +other options have been processed. This will either have no effect (if +``opened`` was the last option) or cause errors. The property is therefore +useless and should not be specified. + QEMU Machine Protocol (QMP) commands ------------------------------------ =20 --=20 2.29.2