Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kQAQT-0002If-4d for mharc-qemu-riscv@gnu.org; Wed, 07 Oct 2020 10:28:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQAQM-0002Cb-ND for qemu-riscv@nongnu.org; Wed, 07 Oct 2020 10:28:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:52237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kQAQ1-0003R6-MV for qemu-riscv@nongnu.org; Wed, 07 Oct 2020 10:28:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602080868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NUMvaSf9hEYMn3qWx45fPqnZW6zDsy/cWbz5TCdF3eA=; b=eNKqm5M64iMnbrqpgMEUnrfBCaHz4pDV8p7wfJRyL+KwmNG6KluLulUdQpZ98so45xqKWQ vjzvJbD86QRzRNcts2GF0qrCga8F8C4fv0aQDsM2PpfAEKjyM3i8u969eX74BknV83+eDW Vzgol+4LuHErBO5nRg6x+9GcPb+5DRc= 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-350-bW4MSx9SMcOlbZ9tVUW-vg-1; Wed, 07 Oct 2020 10:27:44 -0400 X-MC-Unique: bW4MSx9SMcOlbZ9tVUW-vg-1 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 8DCE780EF8B; Wed, 7 Oct 2020 14:27:43 +0000 (UTC) Received: from localhost (ovpn-119-102.rdu2.redhat.com [10.10.119.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2839F7BE42; Wed, 7 Oct 2020 14:27:43 +0000 (UTC) Date: Wed, 7 Oct 2020 10:27:42 -0400 From: Eduardo Habkost To: Paolo Bonzini Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, "Daniel P. Berrange" , John Snow , Peter Maydell Subject: Re: Purpose of QOM properties registered at realize time? Message-ID: <20201007142742.GV7303@habkost.net> References: <20201006220647.GR7303@habkost.net> <20201007130240.GU7303@habkost.net> <659289e0-4133-b945-45fd-25e759c18b03@redhat.com> MIME-Version: 1.0 In-Reply-To: <659289e0-4133-b945-45fd-25e759c18b03@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=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Received-SPF: pass client-ip=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/07 00:44:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.742, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2020 14:28:11 -0000 On Wed, Oct 07, 2020 at 03:55:58PM +0200, Paolo Bonzini wrote: > On 07/10/20 15:02, Eduardo Habkost wrote: > > On Wed, Oct 07, 2020 at 02:04:23PM +0200, Paolo Bonzini wrote: > >> On 07/10/20 00:06, Eduardo Habkost wrote: > >>> Hi, > >>> > >>> While trying to understand how QOM properties are used in QEMU, I > >>> stumbled upon multiple cases where alias properties are added at > >>> realize time. > >>> > >>> Now, I don't understand why those properties exist. As the > >>> properties are added at realize time, I assume they aren't > >>> supposed to be touched by the user at all. If they are not > >>> supposed to be touched by the user, what exactly is the purpose > >>> of those QOM properties? > >> > >> In the case of GPIOs, I think they will be used by other devices that > >> are added afterwards. > > > > Do you know how exactly are they used? Is this always wrapped > > behind a specific API for GPIOs, or the devices can look for the > > properties directly? > > It is always wrapped, but (as far as I recall, because I have never > worked with GPIOs) they are intentionally QOM properties and not just as > an implementation detail. It's meant to be accessible to the user if > only through qom-get/qom-set. Being accessible for debugging would be OK. I'm just worried about dynamic QOM properties being part of a stable and supported API. > > Paolo > > > I'm concerned by the possibility of having QOM properties as an > > undocumented part of an internal API. > -- Eduardo