From nobody Mon Feb 9 14:14:18 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=1606739200; cv=none; d=zohomail.com; s=zohoarc; b=B0aZM8baQqRZqc9Ri9nmYIZ3EaAVCMP4hExDVFHGDKeMXrUXjqLXvYblYdHeeY6wA8yKCtvDD6r2mYdzsPHp6NgEzyOXUkgIJ7WFvmWS8IBKv/EqRhsX0JcdLQiWb6Zrr12ip3WHtSwH9eqSCadgo0gKpj59J/GQeUyzdYZXJdk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606739200; 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=s0Uy5/1f4C49TQVmm8sp4mz7aoS2Jrv2VPoIjaQcSGU=; b=V0+wrslc82HfmGMFT2jiYWr+HCSWQGddo4Jckmm2IOUL5UvwekWY4UkHeb3rsQZauRk71Ahfbz2PUYXi9wlKSivj+nRLGFmJz214cMBzHOobF1FimQwI70iiDWiSoHILkK6a4w0aJQQJC+ahUb7U8bOiqJFVNy62IZkWLWe1MIw= 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 1606739200290473.40974410992453; Mon, 30 Nov 2020 04:26:40 -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-289-rFC_IWPBOWeSBlgxHANBOw-1; Mon, 30 Nov 2020 07:26:37 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 55F2C1842155; Mon, 30 Nov 2020 12:26:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 329845D6A8; Mon, 30 Nov 2020 12:26:31 +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 F2C891809CA4; Mon, 30 Nov 2020 12:26:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AUCQT9C001231 for ; Mon, 30 Nov 2020 07:26:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id E4D8227C26; Mon, 30 Nov 2020 12:26:29 +0000 (UTC) Received: from merkur.fritz.box (ovpn-114-117.ams2.redhat.com [10.36.114.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2875419C71; Mon, 30 Nov 2020 12:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606739199; 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=s0Uy5/1f4C49TQVmm8sp4mz7aoS2Jrv2VPoIjaQcSGU=; b=MkgB+hwEhCn0M1uknPF0ruXmOJL8bkGqo5KZY3IUab1J3yh2hpM+z6aklwWUKME7S6TogV JHwqFCHt4xNqD8GEWowSnB/pFZq3z6b9P4JBXVumjsd7Q8KQVdoq9UOpvHqTalBUyjYNPC RxvGS4fiwdTX79ZHxeCynY2cB8HYoFI= X-MC-Unique: rFC_IWPBOWeSBlgxHANBOw-1 From: Kevin Wolf To: qemu-devel@nongnu.org Subject: [PATCH 06/18] qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened' Date: Mon, 30 Nov 2020 13:25:26 +0100 Message-Id: <20201130122538.27674-7-kwolf@redhat.com> In-Reply-To: <20201130122538.27674-1-kwolf@redhat.com> References: <20201130122538.27674-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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 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.15 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 --- 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 f8a1da43ad..f3d1a55cb8 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -368,6 +368,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: 6.0 +## +{ '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: 6.0 +## +{ '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: 6.0 +## +{ 'struct': 'RngRandomProperties', + 'base': 'RngProperties', + 'data': { '*filename': 'str' } } + ## # @ObjectType: # @@ -386,7 +432,10 @@ 'iothread', 'memory-backend-file', 'memory-backend-memfd', - 'memory-backend-ram' + 'memory-backend-ram', + 'rng-builtin', + 'rng-egd', + 'rng-random' ] } =20 ## @@ -416,7 +465,10 @@ 'iothread': 'IothreadProperties', 'memory-backend-file': 'MemoryBackendFileProperties', 'memory-backend-memfd': 'MemoryBackendMemfdProperties', - '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 565389697e..30a694a39a 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -146,6 +146,15 @@ Drives with interface types other than ``if=3Dnone`` a= re for onboard devices. It is possible to use drives the board doesn't pick up with -device. This usage is now deprecated. Use ``if=3Dnone`` instead. =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. + =20 QEMU Machine Protocol (QMP) commands ------------------------------------ --=20 2.28.0