From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726402; cv=none; d=zohomail.com; s=zohoarc; b=jsg3+dF1MjcGm+4sUx7xxsPcuUMAdpNLDa/Wiy9FBk3a4ZLezsFZYplL+w3G4uiKLVsSPlS+p86V7p2ZaZ67MUk9kbavQUnuBJgd0Rs22+HQ4SLP9G85YNUAfPSmoOjQJrrwc4/1hFizLtZ87qfSgCCj4O7TXybie/E/KNtoA3o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726402; 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=jTnW0jmo2VI56wFSPFzk1BP1JiamT5UX+hn7CumPlEg=; b=I4HSp0Z7z7SOdCFrb2nfHQhttDjVWEFyzCJS5LfYs/+NZmqJUaxeWMQKK5BvEpDrT89BpTblw9eyQ/eEV3FDMxOmB+NbIjO6PjAK9S+99Ds//jN89kQlFS11nPLI5t1e3ZWguEG63sREes3IcGIIw1pkVdfGD0mGxyivt0hnkr8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726402951319.52046126632683; Mon, 21 Sep 2020 15:13:22 -0700 (PDT) Received: from localhost ([::1]:39638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU3l-0001A7-LX for importer@patchew.org; Mon, 21 Sep 2020 18:13:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1P-0007te-QK for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:10:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:41018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1O-0001WD-77 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:10:55 -0400 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-104-r9j4ihfsP-axBpWDdNI49g-1; Mon, 21 Sep 2020 18:10:49 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B48AF1868404; Mon, 21 Sep 2020 22:10:48 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01B1D5D9CD; Mon, 21 Sep 2020 22:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726253; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jTnW0jmo2VI56wFSPFzk1BP1JiamT5UX+hn7CumPlEg=; b=R87HNV3aSTmLY+6MpGKCJjE9SoJo8SMHFqlgxvStlR8/wSSPTZA4PzeewoMWeavgaZsjW1 D0BQU348gNXRw0UpYMGSX+YuPMyEf/mhLptl4/VQeW9YrTjtTgTO4qba8aWlOIhDe6uTwS +XFo51j9aFU6U/H5ioGroGnn9PeFzLc= X-MC-Unique: r9j4ihfsP-axBpWDdNI49g-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 01/24] cryptodev-vhost-user: Register "chardev" as class property Date: Mon, 21 Sep 2020 18:10:22 -0400 Message-Id: <20200921221045.699690-2-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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/09/21 01:44:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Gonglei \(Arei\)" , "Daniel P. Berrange" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Gonglei --- Cc: "Gonglei (Arei)" Cc: qemu-devel@nongnu.org --- backends/cryptodev-vhost-user.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-use= r.c index 41089dede15..690738c6c95 100644 --- a/backends/cryptodev-vhost-user.c +++ b/backends/cryptodev-vhost-user.c @@ -336,13 +336,6 @@ cryptodev_vhost_user_get_chardev(Object *obj, Error **= errp) return NULL; } =20 -static void cryptodev_vhost_user_instance_int(Object *obj) -{ - object_property_add_str(obj, "chardev", - cryptodev_vhost_user_get_chardev, - cryptodev_vhost_user_set_chardev); -} - static void cryptodev_vhost_user_finalize(Object *obj) { CryptoDevBackendVhostUser *s =3D @@ -363,13 +356,17 @@ cryptodev_vhost_user_class_init(ObjectClass *oc, void= *data) bc->create_session =3D cryptodev_vhost_user_sym_create_session; bc->close_session =3D cryptodev_vhost_user_sym_close_session; bc->do_sym_op =3D NULL; + + object_class_property_add_str(oc, "chardev", + cryptodev_vhost_user_get_chardev, + cryptodev_vhost_user_set_chardev); + } =20 static const TypeInfo cryptodev_vhost_user_info =3D { .name =3D TYPE_CRYPTODEV_BACKEND_VHOST_USER, .parent =3D TYPE_CRYPTODEV_BACKEND, .class_init =3D cryptodev_vhost_user_class_init, - .instance_init =3D cryptodev_vhost_user_instance_int, .instance_finalize =3D cryptodev_vhost_user_finalize, .instance_size =3D sizeof(CryptoDevBackendVhostUser), }; --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726517; cv=none; d=zohomail.com; s=zohoarc; b=Rwl2+TyjWD9ZK/vQ4IgtspJ3fnRUVbLHpAMFnp/fs0gxTBw9RRk2g0voHAztnmOWZ/8aZE+8G/a+OnGV8FlYls0qUmMLO8NGbM930W6+O29M55NSSLcv1YH2cCGurx5keS2ZHFx6KlUNNVJ73KXQdjW/S4DTaFIfSbNPTgc5J4o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726517; 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=jvXtzMDBmKU/rJx6CSPHzlbVRTQHljGXv5cU8mvsngI=; b=PTachR0bihIKx3dNz/zrcNNW4cI3YzSRH6d+6GRMTfMynMVLPxSdQ0jpPH5cgG3CfJWjI1q4aJZr6YDNTu7N+Kq5VuJ7n9fMwlcWvoldvDocuUBi2dJ/kRcPuc3bdInV/BcndYoraCaBDKSfLP2oVYHqd/A3g/weSZ0qLbRpLgY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726517702786.5461414383296; Mon, 21 Sep 2020 15:15:17 -0700 (PDT) Received: from localhost ([::1]:47330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU5b-0004JG-W6 for importer@patchew.org; Mon, 21 Sep 2020 18:15:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1P-0007tC-EZ for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:10:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1N-0001W3-S1 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:10:55 -0400 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-75-pD2WeKkINNmOj_yyw5qf5A-1; Mon, 21 Sep 2020 18:10:51 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1F4EC1007464; Mon, 21 Sep 2020 22:10:50 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id A34CB60BFA; Mon, 21 Sep 2020 22:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726253; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jvXtzMDBmKU/rJx6CSPHzlbVRTQHljGXv5cU8mvsngI=; b=dcZetXI7ZCAIGXm1um/IHRR6XSJGD+R1HR0DM7Gp/HCh/UhWuue0UNQzY+kC7EHfycG6gZ NJOPER92rK3WVI2Y9tKVGz+EhMEfSxMRCI/NnbX3KI3cPMQfV1KX3wE+e2wdfRjFL9A7Hi oLFE1/gqiuJFnpN9mx7Cl8DTv3LLS6Q= X-MC-Unique: pD2WeKkINNmOj_yyw5qf5A-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 02/24] cryptodev-backend: Register "chardev" as class property Date: Mon, 21 Sep 2020 18:10:23 -0400 Message-Id: <20200921221045.699690-3-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 01:43:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Gonglei \(Arei\)" , "Daniel P. Berrange" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Gonglei --- Cc: "Gonglei (Arei)" Cc: qemu-devel@nongnu.org --- backends/cryptodev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backends/cryptodev.c b/backends/cryptodev.c index ada4ebe78b1..3f141f61ed6 100644 --- a/backends/cryptodev.c +++ b/backends/cryptodev.c @@ -206,10 +206,6 @@ cryptodev_backend_can_be_deleted(UserCreatable *uc) =20 static void cryptodev_backend_instance_init(Object *obj) { - object_property_add(obj, "queues", "uint32", - cryptodev_backend_get_queues, - cryptodev_backend_set_queues, - NULL, NULL); /* Initialize devices' queues property to 1 */ object_property_set_int(obj, "queues", 1, NULL); } @@ -230,6 +226,10 @@ cryptodev_backend_class_init(ObjectClass *oc, void *da= ta) ucc->can_be_deleted =3D cryptodev_backend_can_be_deleted; =20 QTAILQ_INIT(&crypto_clients); + object_class_property_add(oc, "queues", "uint32", + cryptodev_backend_get_queues, + cryptodev_backend_set_queues, + NULL, NULL); } =20 static const TypeInfo cryptodev_backend_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726697; cv=none; d=zohomail.com; s=zohoarc; b=gkjDzHKA0HwKQqwKPn29JX40ci69r6rLnfr008W4ayDY7MYXa+qyd3g+ei6GzhimZw0mwS0duct7Fk1c2+llIeEGB7YUjsaeFT3oBSH/x2Ndrlbfm6QaOortfSwt/tQ64jBNKxgMugJVlZH7FuTilkD0C/BZ4KqC5Ne03KlzgNk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726697; 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=Y1M+ptRXUElShVbGc8t7tTmSRMjAYObK3+M0oAoHaqc=; b=HF3jbXW5MtGGOtQy55wk7kMylNCviVOD1zA+T2K5TELIynfFxE0Ms4+vOCrzSTBG8+60jc3IrgDLymgaWIF52f8bxfqgJZaWOW7BvK9cvf6vO6ogMpQ6zI+Tk3DAGyMiY48whcHUIwNzY74rk96Gcuzz50r/tIQTENbeX5ez6GE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726697281554.218395514745; Mon, 21 Sep 2020 15:18:17 -0700 (PDT) Received: from localhost ([::1]:55728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU8V-0007uB-TX for importer@patchew.org; Mon, 21 Sep 2020 18:18:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1R-0007vN-9H for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:10:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1P-0001Wn-JO for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:10:56 -0400 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-560-ou9enofSNpmTayuY1tI_yg-1; Mon, 21 Sep 2020 18:10:52 -0400 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 1D373425D0; Mon, 21 Sep 2020 22:10:51 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id D581C7366D; Mon, 21 Sep 2020 22:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726254; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y1M+ptRXUElShVbGc8t7tTmSRMjAYObK3+M0oAoHaqc=; b=YM7PvrmgBf1JUhSFOYv9SmXmIwoGdRDs7y8LYADUW/Jfx/GLOCK9fk56TeH6WrFzMSW8S3 fKnP+/cTIJC+ZbgslOepiqrfts5k/J/wMpcPixt+REIs8OelihfhhZ2BuCgHsu9g7x5mI8 7BUxnaODTzq4Ao8wFcxmrwCsH9RYa4E= X-MC-Unique: ou9enofSNpmTayuY1tI_yg-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 03/24] rng-egd: Register "chardev" as class property Date: Mon, 21 Sep 2020 18:10:24 -0400 Message-Id: <20200921221045.699690-4-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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/09/21 01:44:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , Laurent Vivier , Amit Shah Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Daniel P. Berrang=C3=A9 --- Cc: Laurent Vivier Cc: Amit Shah Cc: qemu-devel@nongnu.org --- backends/rng-egd.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/backends/rng-egd.c b/backends/rng-egd.c index d905fe657c5..d3a8b1ebe2a 100644 --- a/backends/rng-egd.c +++ b/backends/rng-egd.c @@ -137,12 +137,6 @@ static char *rng_egd_get_chardev(Object *obj, Error **= errp) return NULL; } =20 -static void rng_egd_init(Object *obj) -{ - object_property_add_str(obj, "chardev", - rng_egd_get_chardev, rng_egd_set_chardev); -} - static void rng_egd_finalize(Object *obj) { RngEgd *s =3D RNG_EGD(obj); @@ -157,6 +151,8 @@ static void rng_egd_class_init(ObjectClass *klass, void= *data) =20 rbc->request_entropy =3D rng_egd_request_entropy; rbc->opened =3D rng_egd_opened; + object_class_property_add_str(klass, "chardev", + rng_egd_get_chardev, rng_egd_set_chardev= ); } =20 static const TypeInfo rng_egd_info =3D { @@ -164,7 +160,6 @@ static const TypeInfo rng_egd_info =3D { .parent =3D TYPE_RNG_BACKEND, .instance_size =3D sizeof(RngEgd), .class_init =3D rng_egd_class_init, - .instance_init =3D rng_egd_init, .instance_finalize =3D rng_egd_finalize, }; =20 --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726850; cv=none; d=zohomail.com; s=zohoarc; b=XcFk0KdBd0M2YmO1oCTPPKAiTLfyy+z6MGh3yaDEodoT6DXrRitdFtjyUlNp3aKn7QSYOfaUA8ahhCZD5vpjF9t0MYay4Y+iCp+AEIKbMRX9+Jx8myPk0j/8gxhFEDuOLGeTnM27VkTgzoW56LA7lyTQaXqgHSYKdHLIhj4uNlI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726850; 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=23B5K5m+Q8GWGZkZrurk62Tue8RrQxz9GY5WVWnQk5c=; b=acUmYfjJagi9hW2e+IocuHy5jyDCQ08YrNiweiRzk8TrfgxDiVhlew4mcG9BjNm3UZDTALnclNeytO7d4Ot89oaL4ztfIB8HUO20AmLplDRG+hP1AcLK9l2K6qjxIVGCW1ypZ/WZS7yUKU1JWlBwug424r0X4v8AmS7wlvW9IPQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726850366774.7565105210367; Mon, 21 Sep 2020 15:20:50 -0700 (PDT) Received: from localhost ([::1]:35610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUAy-0002vQ-Rj for importer@patchew.org; Mon, 21 Sep 2020 18:20:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1R-0007ve-GK for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:10:57 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:22274 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1P-0001Wj-VL for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:10:57 -0400 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-582-vDD9ewllPVGxrmOHWWTSvw-1; Mon, 21 Sep 2020 18:10:53 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 325B1909CA6; Mon, 21 Sep 2020 22:10:52 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF6E760BFA; Mon, 21 Sep 2020 22:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726254; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=23B5K5m+Q8GWGZkZrurk62Tue8RrQxz9GY5WVWnQk5c=; b=LecBx23uUWQqhDtj561KJRj1oLJozlIx1SqKXrmcpEA3EgYjoB3yZ960PmLmYoivAsXMZ5 hA8O4BUvPpGR0foXd5rAN4Yu8lIvaANmBT0jYNKW+EGEQZ1wuUELSD+iwmdtIEX8Po2mHv y/pcjs+xgS4NMLINZAiStlA0QgNRP4w= X-MC-Unique: vDD9ewllPVGxrmOHWWTSvw-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 04/24] rng-random: register "filename" as class property Date: Mon, 21 Sep 2020 18:10:25 -0400 Message-Id: <20200921221045.699690-5-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.61; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 16:17:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , Laurent Vivier , Amit Shah Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Daniel P. Berrang=C3=A9 --- Cc: Laurent Vivier Cc: Amit Shah Cc: qemu-devel@nongnu.org --- backends/rng-random.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backends/rng-random.c b/backends/rng-random.c index 245b12ab245..7add272eddd 100644 --- a/backends/rng-random.c +++ b/backends/rng-random.c @@ -108,10 +108,6 @@ static void rng_random_init(Object *obj) { RngRandom *s =3D RNG_RANDOM(obj); =20 - object_property_add_str(obj, "filename", - rng_random_get_filename, - rng_random_set_filename); - s->filename =3D g_strdup("/dev/urandom"); s->fd =3D -1; } @@ -134,6 +130,10 @@ static void rng_random_class_init(ObjectClass *klass, = void *data) =20 rbc->request_entropy =3D rng_random_request_entropy; rbc->opened =3D rng_random_opened; + object_class_property_add_str(klass, "filename", + rng_random_get_filename, + rng_random_set_filename); + } =20 static const TypeInfo rng_random_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726414; cv=none; d=zohomail.com; s=zohoarc; b=h0eEiL3Q6SlBzcG8nOtjmjEECn+Joq067J94RNQ2ws1FUyZlTARKlEBJ+BIHrIdGDVoHPpbkJ3C0VbpskTOYqHfpH3tSBMUdENDXK+6sp9t6i93dNiQLN3hXBuw/CWU0ykdQHy7Vy0reZlDbOT1ly7eTcpU2c9bFf+QAcjPhrXY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726414; 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=x3bOX2hRIC9S92xeg8jBdb7EZQCkWoWBANyM6vi7Sw8=; b=jYEXDZJzGiDAmPLHkFEo1CPwKAKdHy8Zb33S0FVTNpqc3oKfewcU6KPsV4DYc7Qmh4w1zNYxYT/NUBXgbGzHIUh4rL7Xy5U4pEnTfd9Gs/L0iqtV4hIjPHj8HEBO8BVGFHQUSACJl46SSk5lvHGAF2wERrTGkG5Ar39yZ9ysrCg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726414214625.0665161400942; Mon, 21 Sep 2020 15:13:34 -0700 (PDT) Received: from localhost ([::1]:40406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU3w-0001UQ-Rh for importer@patchew.org; Mon, 21 Sep 2020 18:13:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1X-000852-B6 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:03 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:32079 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1U-0001XJ-GK for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:03 -0400 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-198-8c2wXaU6MvKCBtYCYHaeng-1; Mon, 21 Sep 2020 18:10:57 -0400 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 9DBB3800138 for ; Mon, 21 Sep 2020 22:10:56 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B29555765; Mon, 21 Sep 2020 22:10:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726259; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x3bOX2hRIC9S92xeg8jBdb7EZQCkWoWBANyM6vi7Sw8=; b=VSoCtpQJa35zaHrC9JSn68lPgdxvdL4grTME6qDN70/KzE9hNBNcY9jLfgtwF8tfQngeTO fvwEzPVNUVGkcrw0CPxja4dttPXoEKRdr08iCa+xNWvhz96NI2ZZzehBaxIbnvNxgFzy3/ jS8LY2TMxx9pyebnzuelY7YWdkd6gtY= X-MC-Unique: 8c2wXaU6MvKCBtYCYHaeng-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 05/24] vhost-user: Register "chardev" as class property Date: Mon, 21 Sep 2020 18:10:26 -0400 Message-Id: <20200921221045.699690-6-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 16:39:08 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Michael S. Tsirkin --- Cc: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org --- backends/vhost-user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/vhost-user.c b/backends/vhost-user.c index 9e6e1985465..858fdeae26c 100644 --- a/backends/vhost-user.c +++ b/backends/vhost-user.c @@ -175,9 +175,9 @@ static char *get_chardev(Object *obj, Error **errp) return NULL; } =20 -static void vhost_user_backend_init(Object *obj) +static void vhost_user_backend_class_init(ObjectClass *oc, void *data) { - object_property_add_str(obj, "chardev", get_chardev, set_chardev); + object_class_property_add_str(oc, "chardev", get_chardev, set_chardev); } =20 static void vhost_user_backend_finalize(Object *obj) @@ -195,7 +195,7 @@ static const TypeInfo vhost_user_backend_info =3D { .name =3D TYPE_VHOST_USER_BACKEND, .parent =3D TYPE_OBJECT, .instance_size =3D sizeof(VhostUserBackend), - .instance_init =3D vhost_user_backend_init, + .class_init =3D vhost_user_backend_class_init, .instance_finalize =3D vhost_user_backend_finalize, .class_size =3D sizeof(VhostUserBackendClass), }; --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726416; cv=none; d=zohomail.com; s=zohoarc; b=bb1z1IXVumKQoi/Hdxf4EF+fIk2Wl/XsuSzkhYne5Wy8dc4ffT/5tTnlNWFLpo/Ey4JyLfNmkbufmMa/IszhrVBCkLogUxLSGIZALtz8/Nbna7UBSr5BYXHXO4umS7l5NTxMMpditc4n0HjsQaTVieO3X2prEqCp+nks+OQzfAA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726416; 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=ShcEd+yi+uhqW38bJkw6/G63a1Sp68UTQc5cE9ZMzrU=; b=PCnYB9nEOlCOlW/NSAj6ak5ivaLcWHo5j/CB9r/iqyqBCsYLbuvh3j3k+sQX/vfKcLJJnUd7YgG5pHLxlXD77YUt+iWAa6GRDL78KPl0L/6PqGObYJCDM7VdhALhGkN3uYFcufq/QNOoQZWHdsATDd+/484SRrJLkz3CNVmr2CM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726416152337.3519385813445; Mon, 21 Sep 2020 15:13:36 -0700 (PDT) Received: from localhost ([::1]:40602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU3y-0001Zd-TU for importer@patchew.org; Mon, 21 Sep 2020 18:13:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1Y-00087A-NR for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:04 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:37437 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1V-0001Xa-VQ for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:04 -0400 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-149-CTjOIPSVOiOYYONgvTtJyA-1; Mon, 21 Sep 2020 18:10:59 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 22BB41074650; Mon, 21 Sep 2020 22:10:58 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 988C510013BD; Mon, 21 Sep 2020 22:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726261; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ShcEd+yi+uhqW38bJkw6/G63a1Sp68UTQc5cE9ZMzrU=; b=Nx4Go3gi7oCGU+0VsIfqwTAMdUxPHOE3pwCYQZfEDceGE2OxkFTkc42Qm7q7x7t7wNZr5J EEIcx4Th54ISfOAPKJiYHAusC545TPykSutRfBgVKpgoQmAO6TSoqhx8SmCPP6xZAJE7vS UwOvyjfvYO+z5kJilwhHvHuB2GliW6A= X-MC-Unique: CTjOIPSVOiOYYONgvTtJyA-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 06/24] vexpress: Register "secure" as class property Date: Mon, 21 Sep 2020 18:10:27 -0400 Message-Id: <20200921221045.699690-7-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 18:11:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , qemu-arm@nongnu.org, "Daniel P. Berrange" , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost --- Cc: Peter Maydell Cc: qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org --- hw/arm/vexpress.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 01bb4bba1ec..0cc35749d7d 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -758,11 +758,6 @@ static void vexpress_instance_init(Object *obj) =20 /* EL3 is enabled by default on vexpress */ vms->secure =3D true; - object_property_add_bool(obj, "secure", vexpress_get_secure, - vexpress_set_secure); - object_property_set_description(obj, "secure", - "Set on/off to enable/disable the ARM " - "Security Extensions (TrustZone)"); } =20 static void vexpress_a15_instance_init(Object *obj) @@ -799,6 +794,12 @@ static void vexpress_class_init(ObjectClass *oc, void = *data) mc->max_cpus =3D 4; mc->ignore_memory_transaction_failures =3D true; mc->default_ram_id =3D "vexpress.highmem"; + + object_class_property_add_bool(oc, "secure", vexpress_get_secure, + vexpress_set_secure); + object_class_property_set_description(oc, "secure", + "Set on/off to enable/disable th= e ARM " + "Security Extensions (TrustZone)= "); } =20 static void vexpress_a9_class_init(ObjectClass *oc, void *data) --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726536; cv=none; d=zohomail.com; s=zohoarc; b=T8vZ1ImVWysZKFQVcSYhI1/t9NOr2NGQtmlZ81TrZ90xvVvp8kdeFuNwAPEy5v2iad/i1JKn2eO1TJIiOXjZpsiFajwb4uQYweg+E2L2+juzyOvg1L4YMJkialiy0fhuumAStDGtv4XQaLzpH19WaaaZOpGgETfvJ4Vnqj4dUZQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726536; 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=Cm0wZ96Hx83LamUchOidKAKEg6G6W1l95JZsvlEZw70=; b=iRxilGjA+92wukR8wGEm1cadQqiFYrrspbqU7SljpQYOjI5iGuUq3+T0TmVcYH0JRRIcntoZDJPqBZxCzFDx3Xalj2+zh5kA0eclsoKAlQXb4YcNYyRN7WExSqH857/mC13AAoex9bBTCiZN7MBBvPqBJe4tcFPYHmfRYMz2Gq8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726536699509.2718854459531; Mon, 21 Sep 2020 15:15:36 -0700 (PDT) Received: from localhost ([::1]:49074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU5v-00051X-DO for importer@patchew.org; Mon, 21 Sep 2020 18:15:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1Y-00087n-Vl for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:50928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1W-0001Xo-Q8 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:04 -0400 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-346-BvPXWaZfN-eFzZf1hcOhzw-1; Mon, 21 Sep 2020 18:11:00 -0400 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 4556C1007465; Mon, 21 Sep 2020 22:10:59 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0806A1A925; Mon, 21 Sep 2020 22:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726262; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cm0wZ96Hx83LamUchOidKAKEg6G6W1l95JZsvlEZw70=; b=H3sgafQDjzL0zlGnbOsWU8meW0267bZCg9kXsqHhQOFH2hLiN5Ve0wirBTLawVbKIdrgea oOd+zg+W8Y/0QfLgaX3khdRIIvpPykuldtU+/1yz+P3rPdk9dqXHoDww9wzHxAJF1FPBfg yTe6yIWsryN8qolMKXR7ehR+ob+vqHs= X-MC-Unique: BvPXWaZfN-eFzZf1hcOhzw-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 07/24] rng: Register "opened" as class property Date: Mon, 21 Sep 2020 18:10:28 -0400 Message-Id: <20200921221045.699690-8-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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/09/21 01:44:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , Laurent Vivier , Amit Shah Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Daniel P. Berrang=C3=A9 --- Cc: Laurent Vivier Cc: Amit Shah Cc: qemu-devel@nongnu.org --- backends/rng.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backends/rng.c b/backends/rng.c index 484f04e8916..3757b044855 100644 --- a/backends/rng.c +++ b/backends/rng.c @@ -105,10 +105,6 @@ static void rng_backend_init(Object *obj) RngBackend *s =3D RNG_BACKEND(obj); =20 QSIMPLEQ_INIT(&s->requests); - - object_property_add_bool(obj, "opened", - rng_backend_prop_get_opened, - rng_backend_prop_set_opened); } =20 static void rng_backend_finalize(Object *obj) @@ -123,6 +119,10 @@ static void rng_backend_class_init(ObjectClass *oc, vo= id *data) UserCreatableClass *ucc =3D USER_CREATABLE_CLASS(oc); =20 ucc->complete =3D rng_backend_complete; + + object_class_property_add_bool(oc, "opened", + rng_backend_prop_get_opened, + rng_backend_prop_set_opened); } =20 static const TypeInfo rng_backend_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726994; cv=none; d=zohomail.com; s=zohoarc; b=jBtWrj+X/sTo4sAq4tYGv52Ej/uwbrbYoTvfQNIgNLqXmYXjDPgxT32M9z+lTmNBP0vvpUWFFmkKcipuWqpgtXS3/8o9pXXGmIpGQ8Ajj9Cpd6wONU551sSfkCyUHaP7vgR8MfubSCyH6W78jNrhWHM1UCuD8vImxRWvYsxrzXo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726994; 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=nbTMuNTCnHfILdL0OqkdIuBhc6flK1JddONBlf63Zow=; b=H8IvELL8XV4nXCPOYXVGu/Rf+eUaV/A/Zs18qCYFkKoKj6qPwP23gk8u1p5nXOnYHjcb9Vgj/ZbOUVBVoMvaoWno6OxE08WQ3nZ/mxNk6KPrJa3gQY/qjkBqyUEzdpR2Q5ZuHonnoSWTvkYw1lqyddi5j7GNi7ewasvxPB7HjoY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726994235923.5377869779329; Mon, 21 Sep 2020 15:23:14 -0700 (PDT) Received: from localhost ([::1]:43834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUDI-0006Se-KM for importer@patchew.org; Mon, 21 Sep 2020 18:23:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1h-0008TT-Km for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:13 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:55310 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1g-0001ae-1U for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:13 -0400 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-311-Vl6haqGbPB2bHPZOytqI4Q-1; Mon, 21 Sep 2020 18:11:07 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B5BA6909CB7; Mon, 21 Sep 2020 22:11:00 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A23910013BD; Mon, 21 Sep 2020 22:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726271; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nbTMuNTCnHfILdL0OqkdIuBhc6flK1JddONBlf63Zow=; b=L6LZ2v+6fiRZELD2c03wcyhbiV6irf3WLEn4vFAG2x9zdtdyvVJ7idjmtCX3zfIb+WYK/g 6KxWl5zxV+AUFtbcSSIXBMq7r7mS77Tt0nu5L2Ag4L64fgY8UApfHLRPOVVwjY3L88JVN7 yGa4wzgcvUL+I218MooaUdDur4aFeWA= X-MC-Unique: Vl6haqGbPB2bHPZOytqI4Q-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 08/24] vexpress-a15: Register "virtualization" as class property Date: Mon, 21 Sep 2020 18:10:29 -0400 Message-Id: <20200921221045.699690-9-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 18:11:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , qemu-arm@nongnu.org, "Daniel P. Berrange" , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Peter Maydell Cc: qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org --- hw/arm/vexpress.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 0cc35749d7d..13339302af5 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -769,12 +769,6 @@ static void vexpress_a15_instance_init(Object *obj) * but can also be specifically set to on or off. */ vms->virt =3D true; - object_property_add_bool(obj, "virtualization", vexpress_get_virt, - vexpress_set_virt); - object_property_set_description(obj, "virtualization", - "Set on/off to enable/disable the ARM " - "Virtualization Extensions " - "(defaults to same as 'secure')"); } =20 static void vexpress_a9_instance_init(Object *obj) @@ -822,6 +816,14 @@ static void vexpress_a15_class_init(ObjectClass *oc, v= oid *data) mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("cortex-a15"); =20 vmc->daughterboard =3D &a15_daughterboard; + + object_class_property_add_bool(oc, "virtualization", vexpress_get_virt, + vexpress_set_virt); + object_class_property_set_description(oc, "virtualization", + "Set on/off to enable/disable th= e ARM " + "Virtualization Extensions " + "(defaults to same as 'secure')"= ); + } =20 static const TypeInfo vexpress_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726545; cv=none; d=zohomail.com; s=zohoarc; b=Xlp89UPZremokMTjyRj9QfWrZiwn8nYeeIqzDa7vkJ48IY1V1XnizImn9Gi0e3NzvNWKa8s1I5CZk+DPZyOrlHoyQP34bLPeAv8REed2nwfYxE+E6XEEhCBli1CrzbRpazg7NJL9Nsinmf7ZgwRyeGrnIwJWykNunrAvjKI11cE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726545; 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=6ZrRv5WK1DRp4gqR2jMWM6MQtae2evShrenuAPevph0=; b=BdRbyQmfLsc+7oNkFV/t2tgh33ocNbFqEe0p6itF+g0dJhn1NtrGCuold/qviy6s/DQBBfSj/q/xG2gx+2iMBReSbKXkHUAoo3S/qbMhaPfa2YYfp/bzil78A67mbGaVEmXgr1fyOVDqraQncvaGLTm+WNVgyAADsTV0TVGcgnc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726545603990.8964437218855; Mon, 21 Sep 2020 15:15:45 -0700 (PDT) Received: from localhost ([::1]:49304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU64-00057H-8e for importer@patchew.org; Mon, 21 Sep 2020 18:15:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1f-0008P0-S9 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:11 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52162 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1d-0001Zt-Bz for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:11 -0400 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-237-rVLKgCDlPdiRS4cvBVhcGQ-1; Mon, 21 Sep 2020 18:11:06 -0400 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 E018185C708 for ; Mon, 21 Sep 2020 22:11:05 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0620873670; Mon, 21 Sep 2020 22:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726268; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6ZrRv5WK1DRp4gqR2jMWM6MQtae2evShrenuAPevph0=; b=hvFdKQwY2Zbf/ayDKPWVSggzEUeKL155C/vwIr7/U//2Ke8NM7ZUChe9jX8x9zZr2A7WOh luf//uOGQgdq1+iRq7SAfPLZuxDwbTW0Lr4I/xgeGMaP1O6aEKl2tkN20o6M20PWYkIGBf VpW3vyy+3kI1lwgQWiq6J48TJXFIHV0= X-MC-Unique: rVLKgCDlPdiRS4cvBVhcGQ-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 09/24] input-linux: Register properties as class properties Date: Mon, 21 Sep 2020 18:10:30 -0400 Message-Id: <20200921221045.699690-10-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 18:11:08 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Daniel P. Berrang=C3=A9 --- Cc: Gerd Hoffmann Cc: qemu-devel@nongnu.org --- ui/input-linux.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/ui/input-linux.c b/ui/input-linux.c index 5d501c8360c..cb86774a51e 100644 --- a/ui/input-linux.c +++ b/ui/input-linux.c @@ -489,19 +489,6 @@ static void input_linux_set_grab_toggle(Object *obj, i= nt value, =20 static void input_linux_instance_init(Object *obj) { - object_property_add_str(obj, "evdev", - input_linux_get_evdev, - input_linux_set_evdev); - object_property_add_bool(obj, "grab_all", - input_linux_get_grab_all, - input_linux_set_grab_all); - object_property_add_bool(obj, "repeat", - input_linux_get_repeat, - input_linux_set_repeat); - object_property_add_enum(obj, "grab-toggle", "GrabToggleKeys", - &GrabToggleKeys_lookup, - input_linux_get_grab_toggle, - input_linux_set_grab_toggle); } =20 static void input_linux_class_init(ObjectClass *oc, void *data) @@ -509,6 +496,20 @@ static void input_linux_class_init(ObjectClass *oc, vo= id *data) UserCreatableClass *ucc =3D USER_CREATABLE_CLASS(oc); =20 ucc->complete =3D input_linux_complete; + + object_class_property_add_str(oc, "evdev", + input_linux_get_evdev, + input_linux_set_evdev); + object_class_property_add_bool(oc, "grab_all", + input_linux_get_grab_all, + input_linux_set_grab_all); + object_class_property_add_bool(oc, "repeat", + input_linux_get_repeat, + input_linux_set_repeat); + object_class_property_add_enum(oc, "grab-toggle", "GrabToggleKeys", + &GrabToggleKeys_lookup, + input_linux_get_grab_toggle, + input_linux_set_grab_toggle); } =20 static const TypeInfo input_linux_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726759; cv=none; d=zohomail.com; s=zohoarc; b=P/ktLpdSV4XmUQqrrcriuaCY+yJ+y2OPYXJrgt88wbc3nLAOqULrWDRf+qM1a6+SVlDS7bsKoCYw0TPRQm7DViBYQQjDkaVCv9msa+G8Jf+sxraEUhjfmZpl4etrAQBNkwQqZiQB9U0gfzY1GGjhlrOsnwRNY63hA4V+Kt4bNN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726759; 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=UCTMr39FHuk0vjVaS7H5c3xouop2xzcz/9htq84mkLM=; b=kcC7WdL3OwYqcIMOtZPEzsZkFKYnpBrLI1JT1WuSP3Jiuhbf0mPQpme3qmqv7Zhvi6H1K0XghI0arRWypABYK/1R4iJfan76cz/fMUxh9o20yYSGChipbB054Xt2iTM6LrnZApZct5ck1PoQQTkx20kkTxA0q4sVO+ry+mKuWNA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726759240686.0917182426541; Mon, 21 Sep 2020 15:19:19 -0700 (PDT) Received: from localhost ([::1]:58442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU9V-0000df-Sw for importer@patchew.org; Mon, 21 Sep 2020 18:19:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1j-000060-7H for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1h-0001b1-BI for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:14 -0400 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-323-Fbv_PM7IN9egNmuO9b0JSw-1; Mon, 21 Sep 2020 18:11:10 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C87D91007461 for ; Mon, 21 Sep 2020 22:11:09 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6A545D9CD; Mon, 21 Sep 2020 22:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726272; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UCTMr39FHuk0vjVaS7H5c3xouop2xzcz/9htq84mkLM=; b=d6NSG3Ug4XxfSfjbRoOgrBsr/ONjPmzGypitYnXWf75iKHo/PtAtLfREGCPoR1zdkG1n/c ip6pg/6E+di7YI8DBWJBmcyk7v59GhBhohItpOfgwJtmKgX2nOlKVcqdihD7LegS5w+Hh2 xeAo273/nVZGvCMqpsVx8c87pwabcvA= X-MC-Unique: Fbv_PM7IN9egNmuO9b0JSw-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 10/24] input-barrier: Register properties as class properties Date: Mon, 21 Sep 2020 18:10:31 -0400 Message-Id: <20200921221045.699690-11-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 01:43:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Daniel P. Berrang=C3=A9 --- Cc: Gerd Hoffmann Cc: qemu-devel@nongnu.org --- ui/input-barrier.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/ui/input-barrier.c b/ui/input-barrier.c index 87543a33993..9a196d0a33d 100644 --- a/ui/input-barrier.c +++ b/ui/input-barrier.c @@ -689,28 +689,6 @@ static void input_barrier_instance_init(Object *obj) ib->y_origin =3D 0; ib->width =3D 1920; ib->height =3D 1080; - - object_property_add_str(obj, "name", - input_barrier_get_name, - input_barrier_set_name); - object_property_add_str(obj, "server", - input_barrier_get_server, - input_barrier_set_server); - object_property_add_str(obj, "port", - input_barrier_get_port, - input_barrier_set_port); - object_property_add_str(obj, "x-origin", - input_barrier_get_x_origin, - input_barrier_set_x_origin); - object_property_add_str(obj, "y-origin", - input_barrier_get_y_origin, - input_barrier_set_y_origin); - object_property_add_str(obj, "width", - input_barrier_get_width, - input_barrier_set_width); - object_property_add_str(obj, "height", - input_barrier_get_height, - input_barrier_set_height); } =20 static void input_barrier_class_init(ObjectClass *oc, void *data) @@ -718,6 +696,28 @@ static void input_barrier_class_init(ObjectClass *oc, = void *data) UserCreatableClass *ucc =3D USER_CREATABLE_CLASS(oc); =20 ucc->complete =3D input_barrier_complete; + + object_class_property_add_str(oc, "name", + input_barrier_get_name, + input_barrier_set_name); + object_class_property_add_str(oc, "server", + input_barrier_get_server, + input_barrier_set_server); + object_class_property_add_str(oc, "port", + input_barrier_get_port, + input_barrier_set_port); + object_class_property_add_str(oc, "x-origin", + input_barrier_get_x_origin, + input_barrier_set_x_origin); + object_class_property_add_str(oc, "y-origin", + input_barrier_get_y_origin, + input_barrier_set_y_origin); + object_class_property_add_str(oc, "width", + input_barrier_get_width, + input_barrier_set_width); + object_class_property_add_str(oc, "height", + input_barrier_get_height, + input_barrier_set_height); } =20 static const TypeInfo input_barrier_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726923; cv=none; d=zohomail.com; s=zohoarc; b=jkP7HqUBlY+JSbpfUJdXHlCVEHaio/T8WP+68asMA4B6KTgsbADlahKnGXbctzZyg7c6c52AK9YhxmLJ3PRoXxjcDZKuezKJS97cJe6VZduibPKLb0KruVjUBKTJeoHDFa6OzX8DCrFNgxMaa9d1x/SLCvkVrrfzeZA+cSHCWuA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726923; 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=Ow/Goc64TH+sEuIKExQSCYDG7D9ex4nmrSV1na4tT+4=; b=cPk3Slf9MF1F1HeseeTVw3LY/XX1cSR5MVM5HNRn7Ni11M+DReLVftUOko4d3qaII0QFWqEFbeHUf7QjNXv2UGuWX8iz9dHQYsY0lABcu+NU4v/7McUSne7yUgiS4OFshfgpre7K/cKnMI2KciAuiStvdYggmVOqQMoUMWhKsfQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726923140263.7413940991969; Mon, 21 Sep 2020 15:22:03 -0700 (PDT) Received: from localhost ([::1]:38332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUC9-00049k-Pd for importer@patchew.org; Mon, 21 Sep 2020 18:22:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1l-0000Bo-DN for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:17 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:46608 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1j-0001bJ-Ff for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:17 -0400 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-335-XJ313jX4OBWy2vr9XZL3cg-1; Mon, 21 Sep 2020 18:11:12 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4908B1007465 for ; Mon, 21 Sep 2020 22:11:11 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AA7B75261; Mon, 21 Sep 2020 22:11:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726274; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ow/Goc64TH+sEuIKExQSCYDG7D9ex4nmrSV1na4tT+4=; b=BSM0Y/xm/HWHe5tVe3w0A5j0i2AAT87aRUcEpDJglQLK+e2EK2G3yDgvfmnGcxArNxgf/4 Ov+tD5flvAMJoT1z8PCeZ1pqEr0Zq/1rZrC67dnF/lkKCmwvnW7XOPtFcXkuc5PlHjveyo ikZxQ9M9ZEoFF9VWwEBHd9g/ys7jA+o= X-MC-Unique: XJ313jX4OBWy2vr9XZL3cg-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 11/24] tmp421: Register properties as class properties Date: Mon, 21 Sep 2020 18:10:32 -0400 Message-Id: <20200921221045.699690-12-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 18:11:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: qemu-devel@nongnu.org --- hw/misc/tmp421.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/hw/misc/tmp421.c b/hw/misc/tmp421.c index 212d6e0e831..1c19a3a9713 100644 --- a/hw/misc/tmp421.c +++ b/hw/misc/tmp421.c @@ -340,22 +340,6 @@ static void tmp421_realize(DeviceState *dev, Error **e= rrp) tmp421_reset(&s->i2c); } =20 -static void tmp421_initfn(Object *obj) -{ - object_property_add(obj, "temperature0", "int", - tmp421_get_temperature, - tmp421_set_temperature, NULL, NULL); - object_property_add(obj, "temperature1", "int", - tmp421_get_temperature, - tmp421_set_temperature, NULL, NULL); - object_property_add(obj, "temperature2", "int", - tmp421_get_temperature, - tmp421_set_temperature, NULL, NULL); - object_property_add(obj, "temperature3", "int", - tmp421_get_temperature, - tmp421_set_temperature, NULL, NULL); -} - static void tmp421_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); @@ -368,6 +352,19 @@ static void tmp421_class_init(ObjectClass *klass, void= *data) k->send =3D tmp421_tx; dc->vmsd =3D &vmstate_tmp421; sc->dev =3D (DeviceInfo *) data; + + object_class_property_add(klass, "temperature0", "int", + tmp421_get_temperature, + tmp421_set_temperature, NULL, NULL); + object_class_property_add(klass, "temperature1", "int", + tmp421_get_temperature, + tmp421_set_temperature, NULL, NULL); + object_class_property_add(klass, "temperature2", "int", + tmp421_get_temperature, + tmp421_set_temperature, NULL, NULL); + object_class_property_add(klass, "temperature3", "int", + tmp421_get_temperature, + tmp421_set_temperature, NULL, NULL); } =20 static const TypeInfo tmp421_info =3D { @@ -375,7 +372,6 @@ static const TypeInfo tmp421_info =3D { .parent =3D TYPE_I2C_SLAVE, .instance_size =3D sizeof(TMP421State), .class_size =3D sizeof(TMP421Class), - .instance_init =3D tmp421_initfn, .abstract =3D true, }; =20 --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600727131; cv=none; d=zohomail.com; s=zohoarc; b=Wnst6uJGLA/h4mtloTtqMWCxNpzGCrCj9PJfKd3xPoCNdBEMiqk7OReBD2Amzy18jzcfRzlRLgKplY6jjQAxZt0BYeI9KaKC1LCygfNWxZ0qQACzT7LTrgexkVfzY215jOPHtRad72DW9jjnOfnMVMvDnMHYgg4iaFqGRwVazgI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600727131; 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=BThF7N+Op21kuNeQbnQ7uJs6mHbs40rqZPjGXbQAkzo=; b=IjYK6Anpuu/FL0yOwc+eiZzpiI8xHsRzx/8hBd9ecF9BYjmWq8tNj3FzwwHIIJRIRgpGvCtKhsu3VXDYomznrAN2Hms5gsip/FSNCXndG0MCytAtZUQo1dj0kh+YS3wK1tYeDLi052m94HqSUYJ5h6uovIWVCBfGNogYhwtNWWU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600727131278249.4844288990139; Mon, 21 Sep 2020 15:25:31 -0700 (PDT) Received: from localhost ([::1]:52072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUFW-0001UL-0j for importer@patchew.org; Mon, 21 Sep 2020 18:25:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU21-0000Om-DV for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:51576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1u-0001cy-4a for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:28 -0400 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-354-Gt_GSBgxOxmB7I2yIhgM3g-1; Mon, 21 Sep 2020 18:11:21 -0400 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 BA15C185FD70; Mon, 21 Sep 2020 22:11:20 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 39B8B51576; Mon, 21 Sep 2020 22:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726285; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BThF7N+Op21kuNeQbnQ7uJs6mHbs40rqZPjGXbQAkzo=; b=PSLuQ9YLRq6KXgjOwyeUfib/xOlK00Y7PF8v1pzAs7f6oTi5VJ0A/SmAd3eirKeK3SXbY9 9i4LNRsiz/v+FHGah3GZpdX0/I+rpjN9o1k6xWMEj6yWvt7saY0aSHx95Hcy0wP/2feCBf +IT3CC/+JonoJEpEMo1CvS2UOYoppJ4= X-MC-Unique: Gt_GSBgxOxmB7I2yIhgM3g-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 12/24] s390x: Register all CPU properties as class properties Date: Mon, 21 Sep 2020 18:10:33 -0400 Message-Id: <20200921221045.699690-13-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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/09/21 01:44:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , "Daniel P. Berrange" , David Hildenbrand , Cornelia Huck , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Acked-by: Cornelia Huck Reviewed-by: David Hildenbrand --- Cc: Cornelia Huck Cc: Thomas Huth Cc: Richard Henderson Cc: David Hildenbrand Cc: Halil Pasic Cc: Christian Borntraeger Cc: qemu-s390x@nongnu.org Cc: qemu-devel@nongnu.org --- target/s390x/internal.h | 1 - target/s390x/cpu.c | 1 - target/s390x/cpu_models.c | 35 ++++++++++++++++------------------- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/target/s390x/internal.h b/target/s390x/internal.h index b1e0ebf67f8..bac0d3c67b2 100644 --- a/target/s390x/internal.h +++ b/target/s390x/internal.h @@ -260,7 +260,6 @@ static inline void s390_cpu_unhalt(S390CPU *cpu) =20 =20 /* cpu_models.c */ -void s390_cpu_model_register_props(Object *obj); void s390_cpu_model_class_register_props(ObjectClass *oc); void s390_realize_cpu_model(CPUState *cs, Error **errp); ObjectClass *s390_cpu_class_by_name(const char *name); diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 749cd548f0f..1dc45ca11b9 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -302,7 +302,6 @@ static void s390_cpu_initfn(Object *obj) timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_cpu_timer, cpu); s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu); #endif - s390_cpu_model_register_props(obj); } =20 static void s390_cpu_finalize(Object *obj) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index c2af2261743..b97e9596ab0 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -1089,25 +1089,6 @@ static void set_feature_group(Object *obj, Visitor *= v, const char *name, } } =20 -void s390_cpu_model_register_props(Object *obj) -{ - S390FeatGroup group; - S390Feat feat; - - for (feat =3D 0; feat < S390_FEAT_MAX; feat++) { - const S390FeatDef *def =3D s390_feat_def(feat); - object_property_add(obj, def->name, "bool", get_feature, - set_feature, NULL, (void *) feat); - object_property_set_description(obj, def->name, def->desc); - } - for (group =3D 0; group < S390_FEAT_GROUP_MAX; group++) { - const S390FeatGroupDef *def =3D s390_feat_group_def(group); - object_property_add(obj, def->name, "bool", get_feature_group, - set_feature_group, NULL, (void *) group); - object_property_set_description(obj, def->name, def->desc); - } -} - static void s390_cpu_model_initfn(Object *obj) { S390CPU *cpu =3D S390_CPU(obj); @@ -1215,11 +1196,27 @@ static char *get_description(Object *obj, Error **e= rrp) =20 void s390_cpu_model_class_register_props(ObjectClass *oc) { + S390FeatGroup group; + S390Feat feat; + object_class_property_add_bool(oc, "migration-safe", get_is_migration_= safe, NULL); object_class_property_add_bool(oc, "static", get_is_static, NULL); object_class_property_add_str(oc, "description", get_description, NULL= ); + + for (feat =3D 0; feat < S390_FEAT_MAX; feat++) { + const S390FeatDef *def =3D s390_feat_def(feat); + object_class_property_add(oc, def->name, "bool", get_feature, + set_feature, NULL, (void *) feat); + object_class_property_set_description(oc, def->name, def->desc); + } + for (group =3D 0; group < S390_FEAT_GROUP_MAX; group++) { + const S390FeatGroupDef *def =3D s390_feat_group_def(group); + object_class_property_add(oc, def->name, "bool", get_feature_group, + set_feature_group, NULL, (void *) group); + object_class_property_set_description(oc, def->name, def->desc); + } } =20 #ifdef CONFIG_KVM --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726751; cv=none; d=zohomail.com; s=zohoarc; b=Xgl/4ZUQg1/hvYHq1DLBaZUue9zgtsbgVrrdbXJNt5HfJ0B1L++zJiLYETmE9a2bA59Mx9GVrJQqaaF/X1hhZHKn4Z2gaijSiXNbGNnM5T9K/6Be3QnkO54k/zj+VVwFN0lOrzm1/2pKUfIJ1ydGjURm7OQ5shbOBdAvAp9HQaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726751; 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=yI99G5RliSRDk0T3kuWGTzNZKNFmQSbNekxeuovQbRA=; b=RVQ7amIUYyGS8fnhIhUWD/AVdWubFb21PwpuJ/92hIwsvY02dsnmYadD254uY/wPRMbwfeublfFH7Zao1noYxM4IZpi4p7hZDHJPf2fZV/X9RpcdduyrRJFKF40hkku9D5n6gbAB5ASQy236P6Ce//99jiTGp9cagWykYcEZWsE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726751704437.2945700945427; Mon, 21 Sep 2020 15:19:11 -0700 (PDT) Received: from localhost ([::1]:57704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU9O-0000IJ-Dj for importer@patchew.org; Mon, 21 Sep 2020 18:19:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU1x-0000OC-9D for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1t-0001ck-Ei for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:27 -0400 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-513-YslSO1dlOnq2BGEsKiCFqA-1; Mon, 21 Sep 2020 18:11:22 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFB8A1DE0F; Mon, 21 Sep 2020 22:11:21 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 83BE010013BD; Mon, 21 Sep 2020 22:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726284; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yI99G5RliSRDk0T3kuWGTzNZKNFmQSbNekxeuovQbRA=; b=AwYxLKM1E5nU+7wBNdquqOYLfvhamO7/SOT7XudTxnDR7/Xc9a2798b7z+rqPgMp2Kr6j5 vMJD96zrwdP4tEa22fT8pHOZqwvIeQJN1GhWVmr0Bt5eX0NkjXC7qaq5X4pdJv9VTLYT/4 zucBla+DtXxu6gw+qKrVeCYDD13u6m4= X-MC-Unique: YslSO1dlOnq2BGEsKiCFqA-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 13/24] i386: Register most CPU properties as class properties Date: Mon, 21 Sep 2020 18:10:34 -0400 Message-Id: <20200921221045.699690-14-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 01:43:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- target/i386/cpu.c | 66 ++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 1c58f764dcb..66792f28ba7 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6922,44 +6922,12 @@ static void x86_cpu_initfn(Object *obj) env->nr_dies =3D 1; cpu_set_cpustate_pointers(cpu); =20 - object_property_add(obj, "family", "int", - x86_cpuid_version_get_family, - x86_cpuid_version_set_family, NULL, NULL); - object_property_add(obj, "model", "int", - x86_cpuid_version_get_model, - x86_cpuid_version_set_model, NULL, NULL); - object_property_add(obj, "stepping", "int", - x86_cpuid_version_get_stepping, - x86_cpuid_version_set_stepping, NULL, NULL); - object_property_add_str(obj, "vendor", - x86_cpuid_get_vendor, - x86_cpuid_set_vendor); - object_property_add_str(obj, "model-id", - x86_cpuid_get_model_id, - x86_cpuid_set_model_id); - object_property_add(obj, "tsc-frequency", "int", - x86_cpuid_get_tsc_freq, - x86_cpuid_set_tsc_freq, NULL, NULL); object_property_add(obj, "feature-words", "X86CPUFeatureWordInfo", x86_cpu_get_feature_words, NULL, NULL, (void *)env->features); object_property_add(obj, "filtered-features", "X86CPUFeatureWordInfo", x86_cpu_get_feature_words, NULL, NULL, (void *)cpu->filtered_features); - /* - * The "unavailable-features" property has the same semantics as - * CpuDefinitionInfo.unavailable-features on the "query-cpu-definition= s" - * QMP command: they list the features that would have prevented the - * CPU from running if the "enforce" flag was set. - */ - object_property_add(obj, "unavailable-features", "strList", - x86_cpu_get_unavailable_features, - NULL, NULL, NULL); - -#if !defined(CONFIG_USER_ONLY) - object_property_add(obj, "crash-information", "GuestPanicInformation", - x86_cpu_get_crash_info_qom, NULL, NULL, NULL); -#endif =20 for (w =3D 0; w < FEATURE_WORDS; w++) { int bitnr; @@ -7308,6 +7276,40 @@ static void x86_cpu_common_class_init(ObjectClass *o= c, void *data) cc->disas_set_info =3D x86_disas_set_info; =20 dc->user_creatable =3D true; + + object_class_property_add(oc, "family", "int", + x86_cpuid_version_get_family, + x86_cpuid_version_set_family, NULL, NULL); + object_class_property_add(oc, "model", "int", + x86_cpuid_version_get_model, + x86_cpuid_version_set_model, NULL, NULL); + object_class_property_add(oc, "stepping", "int", + x86_cpuid_version_get_stepping, + x86_cpuid_version_set_stepping, NULL, NULL); + object_class_property_add_str(oc, "vendor", + x86_cpuid_get_vendor, + x86_cpuid_set_vendor); + object_class_property_add_str(oc, "model-id", + x86_cpuid_get_model_id, + x86_cpuid_set_model_id); + object_class_property_add(oc, "tsc-frequency", "int", + x86_cpuid_get_tsc_freq, + x86_cpuid_set_tsc_freq, NULL, NULL); + /* + * The "unavailable-features" property has the same semantics as + * CpuDefinitionInfo.unavailable-features on the "query-cpu-definition= s" + * QMP command: they list the features that would have prevented the + * CPU from running if the "enforce" flag was set. + */ + object_class_property_add(oc, "unavailable-features", "strList", + x86_cpu_get_unavailable_features, + NULL, NULL, NULL); + +#if !defined(CONFIG_USER_ONLY) + object_class_property_add(oc, "crash-information", "GuestPanicInformat= ion", + x86_cpu_get_crash_info_qom, NULL, NULL, NULL= ); +#endif + } =20 static const TypeInfo x86_cpu_type_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600727246; cv=none; d=zohomail.com; s=zohoarc; b=WtR06v0eJE2aymo5yaXPLrlJvPsqMvgjcHjpg1vdIjrDPfH1WFNcFTQ/ZwU+gbTyhQVZBgVIilsmJEdpUCZLlBBujKhtcqQueYPdAfmR48VKBI8jK4ojBQWo4h3MrOUe+WcymSx4wM4xdaX0aAvsTnSBX3HF+gXXfgIW5KRpbUQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600727246; 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=+Uw2orecZVZm7IdW6a8lhZh1dRtMCA4m8TB4GxCPuOg=; b=QKnH+HiBg7Retr9J3LyGsAdlYBkl0ALNy9LjDbYKznvZ5DRlNV0+J81hhJ2sEeqty6f5iDD70o5ABgkpDvFFnOjO390FEHRtxy+o9A2uWPqKovyEmxQCpoDHlrR9sIYrJCnPvTOKwDWUiZqfSyEM0YHNEBpNVO2nb2SPr39L76A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160072724623548.10053843892058; Mon, 21 Sep 2020 15:27:26 -0700 (PDT) Received: from localhost ([::1]:58722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUHM-0004LA-9n for importer@patchew.org; Mon, 21 Sep 2020 18:27:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU22-0000QV-N1 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:34 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:26409 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1v-0001dK-6J for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:33 -0400 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-202-oL7LIBTkOLGi8x5LpRMzvg-1; Mon, 21 Sep 2020 18:11:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F489873079; Mon, 21 Sep 2020 22:11:23 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB38C5D9CD; Mon, 21 Sep 2020 22:11:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726285; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Uw2orecZVZm7IdW6a8lhZh1dRtMCA4m8TB4GxCPuOg=; b=D0b7513rMWSFy2FFI7Zsp+af1M4c8H2tcIGLzxW5WFmrpj+XBD7aDUj1KXYi8yc+oQi1wk 2qjDrG8tumPNgZTTtEPaDaDxfdALv1ergdI6LmXPEodtZaW9+tvwmqLFILd1iIvEcRdgWA luOgpjgCMwRuCyIU3eqq5RdvvH0mLhA= X-MC-Unique: oL7LIBTkOLGi8x5LpRMzvg-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 14/24] i386: Register feature bit properties as class properties Date: Mon, 21 Sep 2020 18:10:35 -0400 Message-Id: <20200921221045.699690-15-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 16:39:08 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- target/i386/cpu.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 66792f28ba7..1aba87e0a5b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6819,16 +6819,17 @@ static void x86_cpu_release_bit_prop(Object *obj, c= onst char *name, * multiple bits in the same FeatureWord. In that case, the getter will re= turn * true only if all bits are set. */ -static void x86_cpu_register_bit_prop(X86CPU *cpu, +static void x86_cpu_register_bit_prop(X86CPUClass *xcc, const char *prop_name, FeatureWord w, int bitnr) { + ObjectClass *oc =3D OBJECT_CLASS(xcc); BitProperty *fp; ObjectProperty *op; uint64_t mask =3D (1ULL << bitnr); =20 - op =3D object_property_find(OBJECT(cpu), prop_name, NULL); + op =3D object_class_property_find(oc, prop_name, NULL); if (op) { fp =3D op->opaque; assert(fp->w =3D=3D w); @@ -6837,14 +6838,14 @@ static void x86_cpu_register_bit_prop(X86CPU *cpu, fp =3D g_new0(BitProperty, 1); fp->w =3D w; fp->mask =3D mask; - object_property_add(OBJECT(cpu), prop_name, "bool", - x86_cpu_get_bit_prop, - x86_cpu_set_bit_prop, - x86_cpu_release_bit_prop, fp); + object_class_property_add(oc, prop_name, "bool", + x86_cpu_get_bit_prop, + x86_cpu_set_bit_prop, + x86_cpu_release_bit_prop, fp); } } =20 -static void x86_cpu_register_feature_bit_props(X86CPU *cpu, +static void x86_cpu_register_feature_bit_props(X86CPUClass *xcc, FeatureWord w, int bitnr) { @@ -6863,7 +6864,7 @@ static void x86_cpu_register_feature_bit_props(X86CPU= *cpu, /* aliases don't use "|" delimiters anymore, they are registered * manually using object_property_add_alias() */ assert(!strchr(name, '|')); - x86_cpu_register_bit_prop(cpu, name, w, bitnr); + x86_cpu_register_bit_prop(xcc, name, w, bitnr); } =20 #if !defined(CONFIG_USER_ONLY) @@ -6917,7 +6918,6 @@ static void x86_cpu_initfn(Object *obj) X86CPU *cpu =3D X86_CPU(obj); X86CPUClass *xcc =3D X86_CPU_GET_CLASS(obj); CPUX86State *env =3D &cpu->env; - FeatureWord w; =20 env->nr_dies =3D 1; cpu_set_cpustate_pointers(cpu); @@ -6929,14 +6929,6 @@ static void x86_cpu_initfn(Object *obj) x86_cpu_get_feature_words, NULL, NULL, (void *)cpu->filtered_features); =20 - for (w =3D 0; w < FEATURE_WORDS; w++) { - int bitnr; - - for (bitnr =3D 0; bitnr < 64; bitnr++) { - x86_cpu_register_feature_bit_props(cpu, w, bitnr); - } - } - object_property_add_alias(obj, "sse3", obj, "pni"); object_property_add_alias(obj, "pclmuldq", obj, "pclmulqdq"); object_property_add_alias(obj, "sse4-1", obj, "sse4.1"); @@ -7221,6 +7213,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc= , void *data) X86CPUClass *xcc =3D X86_CPU_CLASS(oc); CPUClass *cc =3D CPU_CLASS(oc); DeviceClass *dc =3D DEVICE_CLASS(oc); + FeatureWord w; =20 device_class_set_parent_realize(dc, x86_cpu_realizefn, &xcc->parent_realize); @@ -7310,6 +7303,12 @@ static void x86_cpu_common_class_init(ObjectClass *o= c, void *data) x86_cpu_get_crash_info_qom, NULL, NULL, NULL= ); #endif =20 + for (w =3D 0; w < FEATURE_WORDS; w++) { + int bitnr; + for (bitnr =3D 0; bitnr < 64; bitnr++) { + x86_cpu_register_feature_bit_props(xcc, w, bitnr); + } + } } =20 static const TypeInfo x86_cpu_type_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726534; cv=none; d=zohomail.com; s=zohoarc; b=eBA6N4igsw6AaM+G4iAmhAXsgSbHWNX9fkkVBxHi662AyHpCcEBNdjlwK9K9mjWXLVjOc+g37pP8UtNdHEJN2i3RaEbYF7psO9gE7OPQTsuSGjFbCfVaqiD+OuedDHSVlJWd7scjeEE1ni1NjGAJCQZ84C+ShaUjuAdznblmoHE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726534; 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=VZuWdbUwG3KMSIvyqRzeAAr4Sn3NuYTMl0QZA5j61c8=; b=gyG0S+wiI16mGIQwhXMCyIxHmLwNZ+hykIyTihzXXXx3VuedrGz6xSwkqNMt7GLkn7y+cEKIPTBw7sqVknBNAFYeWudg87v1Uy0rO3pqs9ZrUz4b+9X0C9Z3zHYHhyiP7nJL/nGYxmA8udgVUOrHPLt0V+705s7Jq1tiWUJ3r2M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726534918405.21266322628117; Mon, 21 Sep 2020 15:15:34 -0700 (PDT) Received: from localhost ([::1]:48890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU5t-0004wp-DR for importer@patchew.org; Mon, 21 Sep 2020 18:15:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU24-0000UY-Kb for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:36905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU1x-0001e7-12 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:36 -0400 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-268-ykWrRKunNbSFnv2tpsLdrw-1; Mon, 21 Sep 2020 18:11:25 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 053AD185FD70; Mon, 21 Sep 2020 22:11:24 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id C138A5D9CD; Mon, 21 Sep 2020 22:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726287; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VZuWdbUwG3KMSIvyqRzeAAr4Sn3NuYTMl0QZA5j61c8=; b=e2saXLs61ymnjg5wt0IG4my4cG58Z9py93Zca01vNhJ0ubkeAyDYuoGd7YfLqgTxRqVOBN aTgvkoxg0bUlXZ4TjsWeXuc6h7dDAOVBvqMgVQKmfPuBdTw3ZPUujfATVWYvNtbDEOAFja 3EGjXJfZiHSor4Ri2SaJ0kr5VI6ef98= X-MC-Unique: ykWrRKunNbSFnv2tpsLdrw-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 15/24] arm/virt: Register most properties as class properties Date: Mon, 21 Sep 2020 18:10:36 -0400 Message-Id: <20200921221045.699690-16-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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/09/21 01:44:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , qemu-arm@nongnu.org, "Daniel P. Berrange" , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Peter Maydell Cc: qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org --- hw/arm/virt.c | 76 +++++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index acf9bfbecea..d1ab660fa60 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2443,6 +2443,47 @@ static void virt_machine_class_init(ObjectClass *oc,= void *data) NULL, NULL); object_class_property_set_description(oc, "acpi", "Enable ACPI"); + object_class_property_add_bool(oc, "secure", virt_get_secure, + virt_set_secure); + object_class_property_set_description(oc, "secure", + "Set on/off to enable/disa= ble the ARM " + "Security Extensions (Trus= tZone)"); + + object_class_property_add_bool(oc, "virtualization", virt_get_virt, + virt_set_virt); + object_class_property_set_description(oc, "virtualization", + "Set on/off to enable/disable em= ulating a " + "guest CPU which implements the = ARM " + "Virtualization Extensions"); + + object_class_property_add_bool(oc, "highmem", virt_get_highmem, + virt_set_highmem); + object_class_property_set_description(oc, "highmem", + "Set on/off to enable/disable us= ing " + "physical address space above 32= bits"); + + object_class_property_add_str(oc, "gic-version", virt_get_gic_version, + virt_set_gic_version); + object_class_property_set_description(oc, "gic-version", + "Set GIC version. " + "Valid values are 2, 3, host and= max"); + + object_class_property_add_str(oc, "iommu", virt_get_iommu, virt_set_io= mmu); + object_class_property_set_description(oc, "iommu", + "Set the IOMMU type. " + "Valid values are none and smmuv= 3"); + + object_class_property_add_bool(oc, "ras", virt_get_ras, + virt_set_ras); + object_class_property_set_description(oc, "ras", + "Set on/off to enable/disable re= porting host memory errors " + "to a KVM guest using ACPI and g= uest external abort exceptions"); + + object_class_property_add_bool(oc, "mte", virt_get_mte, virt_set_mte); + object_class_property_set_description(oc, "mte", + "Set on/off to enable/disable em= ulating a " + "guest CPU which implements the = ARM " + "Memory Tagging Extension"); } =20 static void virt_instance_init(Object *obj) @@ -2455,34 +2496,13 @@ static void virt_instance_init(Object *obj) * boot UEFI blobs which assume no TrustZone support. */ vms->secure =3D false; - object_property_add_bool(obj, "secure", virt_get_secure, - virt_set_secure); - object_property_set_description(obj, "secure", - "Set on/off to enable/disable the ARM " - "Security Extensions (TrustZone)"); =20 /* EL2 is also disabled by default, for similar reasons */ vms->virt =3D false; - object_property_add_bool(obj, "virtualization", virt_get_virt, - virt_set_virt); - object_property_set_description(obj, "virtualization", - "Set on/off to enable/disable emulatin= g a " - "guest CPU which implements the ARM " - "Virtualization Extensions"); =20 /* High memory is enabled by default */ vms->highmem =3D true; - object_property_add_bool(obj, "highmem", virt_get_highmem, - virt_set_highmem); - object_property_set_description(obj, "highmem", - "Set on/off to enable/disable using " - "physical address space above 32 bits"= ); vms->gic_version =3D VIRT_GIC_VERSION_NOSEL; - object_property_add_str(obj, "gic-version", virt_get_gic_version, - virt_set_gic_version); - object_property_set_description(obj, "gic-version", - "Set GIC version. " - "Valid values are 2, 3, host and max"); =20 vms->highmem_ecam =3D !vmc->no_highmem_ecam; =20 @@ -2500,26 +2520,12 @@ static void virt_instance_init(Object *obj) =20 /* Default disallows iommu instantiation */ vms->iommu =3D VIRT_IOMMU_NONE; - object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu); - object_property_set_description(obj, "iommu", - "Set the IOMMU type. " - "Valid values are none and smmuv3"); =20 /* Default disallows RAS instantiation */ vms->ras =3D false; - object_property_add_bool(obj, "ras", virt_get_ras, - virt_set_ras); - object_property_set_description(obj, "ras", - "Set on/off to enable/disable reportin= g host memory errors " - "to a KVM guest using ACPI and guest e= xternal abort exceptions"); =20 /* MTE is disabled by default. */ vms->mte =3D false; - object_property_add_bool(obj, "mte", virt_get_mte, virt_set_mte); - object_property_set_description(obj, "mte", - "Set on/off to enable/disable emulatin= g a " - "guest CPU which implements the ARM " - "Memory Tagging Extension"); =20 vms->irqmap =3D a15irqmap; =20 --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726917; cv=none; d=zohomail.com; s=zohoarc; b=Zn4aBZI6uZiHbUQetSwo5gkGk/iyPgp4mz24gCWyYAW985/F9U43rOVRuo/Iqm+VpvSvTDGuwihe2lu9gChHbSP8FWDiQpeDTZ+uI+WmP5aJJQSXCw8OqbBWF8sIW6AYDtkqXI6mOa6CAkU7sM6rwTpZuGdKvt3Qsk7nnecqCHQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726917; 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=folivq79vU79XSA6rq0LSS3y2MaZhG4xZKnlYr4A8ng=; b=agfgIZX9G99nqzKNg3JnziZl9KK0M6TwUdEfxDt3PahZ17UsXsbJcr36pKwJhLZ4TZI5zGwwS28duBsenHG/ma05FZE4nz3HmZFASIWbsa1wckwxfyo4pA9vYySlMdnnEjvPpYb51RAvtrDE71qqNoomCz0ZaIp5bov/LdXqxgg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726917129120.09018550921303; Mon, 21 Sep 2020 15:21:57 -0700 (PDT) Received: from localhost ([::1]:37750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUC3-0003vP-RP for importer@patchew.org; Mon, 21 Sep 2020 18:21:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU27-0000c7-Gh for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:36446) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU22-0001eG-G0 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:39 -0400 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-14-i3vfzWNRNMuAmyIMiBfllA-1; Mon, 21 Sep 2020 18:11:26 -0400 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 02A04873081; Mon, 21 Sep 2020 22:11:25 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id BDCE616E20; Mon, 21 Sep 2020 22:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726287; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=folivq79vU79XSA6rq0LSS3y2MaZhG4xZKnlYr4A8ng=; b=ZhHr6cIDzONXWh4qqQWcGwHc0E+ksEZAlcUmIhd3e6ATu0I+jOKWG0RHx698zlXxaXtD1F 4sZjWOTp/v+lLaqefm7laErYTqVCsCFlw0DfoF2YGY7AighJfnynD0h3lfOn9RUBvrERUi /qEVlfal8gdGIhQZaaOPjvYPIWFWXk4= X-MC-Unique: i3vfzWNRNMuAmyIMiBfllA-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 16/24] virt: Register "its" as class property Date: Mon, 21 Sep 2020 18:10:37 -0400 Message-Id: <20200921221045.699690-17-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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/09/21 01:44:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , qemu-arm@nongnu.org, "Daniel P. Berrange" , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Note: "its" is currently registered conditionally, but this makes the feature be registered unconditionally. The only side effect is that it will be now possible to set its=3Don on virt-2.7 and older. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Peter Maydell Cc: qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org --- hw/arm/virt.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d1ab660fa60..986b75a6b89 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2484,6 +2484,13 @@ static void virt_machine_class_init(ObjectClass *oc,= void *data) "Set on/off to enable/disable em= ulating a " "guest CPU which implements the = ARM " "Memory Tagging Extension"); + + object_class_property_add_bool(oc, "its", virt_get_its, + virt_set_its); + object_class_property_set_description(oc, "its", + "Set on/off to enable/disable " + "ITS instantiation"); + } =20 static void virt_instance_init(Object *obj) @@ -2511,11 +2518,6 @@ static void virt_instance_init(Object *obj) } else { /* Default allows ITS instantiation */ vms->its =3D true; - object_property_add_bool(obj, "its", virt_get_its, - virt_set_its); - object_property_set_description(obj, "its", - "Set on/off to enable/disable " - "ITS instantiation"); } =20 /* Default disallows iommu instantiation */ --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600727082; cv=none; d=zohomail.com; s=zohoarc; b=iX3J0xsXy1ogZRaAi2wfP0eiOEsvuNr1oKYcwLpJgc+Ny8LRyR2Ucf367UNKXIfs33FRO4sCFQo0UOZP4zj6IZ4C8cClDV5ecw0jZ+fDf4w7e9CaGkhLQ+F+QqVzw4aLrmjuPNPB2y4az4tZV1M0qv0JclLs79QVs1nRQFVIzgQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600727082; 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=jqtEZWQxZSHY7rT/HZvuRkl1HSoTAI8T3ZT+fIlVs1Y=; b=K34Ghf4Zn7xEXg6H8nGXZIqD1vd9ikgwlqN5nCZXlIwr6GJ+1+4Vbk0rI6t2s/vvGpd5YGFQiaigGLTyaFqeIbQrva8EcsVzrD3MSRkL/zTGlflx3y3yxbWUU8Os92FplCE//CpYUQeyc+UROYo7a2ugko1kGo5vSqZhgsuGGRc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600727082058919.2126327773369; Mon, 21 Sep 2020 15:24:42 -0700 (PDT) Received: from localhost ([::1]:48720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUEi-0008VB-Mp for importer@patchew.org; Mon, 21 Sep 2020 18:24:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU27-0000aq-2Q for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:43138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU22-0001eQ-Eo for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:38 -0400 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-206-m1R--18VMEOT6DC8rwoJLw-1; Mon, 21 Sep 2020 18:11:26 -0400 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 D7B64185FD93 for ; Mon, 21 Sep 2020 22:11:25 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id A599073684; Mon, 21 Sep 2020 22:11:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726288; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jqtEZWQxZSHY7rT/HZvuRkl1HSoTAI8T3ZT+fIlVs1Y=; b=Xn5zcvPf4yH/1nbxNkuTIHp9Y3L0c9xFI6fsiIUw/T1ZYcz1w+4uLSh2YCSRuq1oAFuWxC rEbs4BWKKTbUQJcx7P5AN2IBk6/grVxBw0cq5PSGn++gc1C4LjHuFoWfu1+27ASClNV/M7 hnPjkBvWLoV7BPE0QNI6n8NLCA37uas= X-MC-Unique: m1R--18VMEOT6DC8rwoJLw-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 17/24] cpu/core: Register core-id and nr-threads as class properties Date: Mon, 21 Sep 2020 18:10:38 -0400 Message-Id: <20200921221045.699690-18-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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/09/21 01:44:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: qemu-devel@nongnu.org --- hw/cpu/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/cpu/core.c b/hw/cpu/core.c index 3a659291eae..92d3b2fbad6 100644 --- a/hw/cpu/core.c +++ b/hw/cpu/core.c @@ -69,10 +69,6 @@ static void cpu_core_instance_init(Object *obj) MachineState *ms =3D MACHINE(qdev_get_machine()); CPUCore *core =3D CPU_CORE(obj); =20 - object_property_add(obj, "core-id", "int", core_prop_get_core_id, - core_prop_set_core_id, NULL, NULL); - object_property_add(obj, "nr-threads", "int", core_prop_get_nr_threads, - core_prop_set_nr_threads, NULL, NULL); core->nr_threads =3D ms->smp.threads; } =20 @@ -81,6 +77,10 @@ static void cpu_core_class_init(ObjectClass *oc, void *d= ata) DeviceClass *dc =3D DEVICE_CLASS(oc); =20 set_bit(DEVICE_CATEGORY_CPU, dc->categories); + object_class_property_add(oc, "core-id", "int", core_prop_get_core_id, + core_prop_set_core_id, NULL, NULL); + object_class_property_add(oc, "nr-threads", "int", core_prop_get_nr_th= reads, + core_prop_set_nr_threads, NULL, NULL); } =20 static const TypeInfo cpu_core_type_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726756; cv=none; d=zohomail.com; s=zohoarc; b=moM8+T44+zDLSJgEorXxDjftLirncdshb8TWK4U1MOzzKvUjQoIHLd4qk1HhWQyDsdtjnVkgHlbAzlexHhHqf2Rlll60vUHHCMkbEDIei9ucx0nyIJeTJmQPCmWGiY+BjanbM1UObXUvQTo/2ySU6IC7d46HvACD79C5EkWtzNM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726756; 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=/EBpP8r6TKM0MA75vsOahpPWeODiE6EuJYCvSL2cu0U=; b=NFaGibxmG+wB4f0X5lxYg2ey/NFnBNFZahVmeQZmM9McEjJuT1M9O9RHdRXmVqPNfcdy/jdnfsXfcP6LsqPeFq9qeMdmaVfH2GBMehl04F4H9e2KdgIvQkkeJD5neyGwEHwJoFbUFKXRv3vEBVjNFuH9nkVa32mR8JP0x1NZjfk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726756159726.628571421226; Mon, 21 Sep 2020 15:19:16 -0700 (PDT) Received: from localhost ([::1]:58184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKU9S-0000Wr-Ok for importer@patchew.org; Mon, 21 Sep 2020 18:19:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU27-0000b9-5n for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:28670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU22-0001ei-DN for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:38 -0400 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-64-JHjv2d3aO6OUJxXtyCP9hg-1; Mon, 21 Sep 2020 18:11:28 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 281DD10059A2; Mon, 21 Sep 2020 22:11:27 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE4A510013BD; Mon, 21 Sep 2020 22:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726290; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/EBpP8r6TKM0MA75vsOahpPWeODiE6EuJYCvSL2cu0U=; b=LsxGDYQu0m8hPk+rOw9772goAncEq6ZflTaUqmPdZJYeeb/9h+qBScrWdOBliuyUkR6PTG mhYARUcT5bHlTGUup8V88sVXLuTwOb0sOO/L8/FJomXAoDCHEpw0tbFJckBzQckbzmyI2S EtcON5BMaBNBC9sCJ0kui2ed2xyiVfY= X-MC-Unique: JHjv2d3aO6OUJxXtyCP9hg-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 18/24] arm/cpu64: Register "aarch64" as class property Date: Mon, 21 Sep 2020 18:10:39 -0400 Message-Id: <20200921221045.699690-19-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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/09/21 01:44:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , qemu-arm@nongnu.org, "Daniel P. Berrange" , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Peter Maydell Cc: qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org --- target/arm/cpu64.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 3c2b3d95993..349c9fa3a3a 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -758,15 +758,6 @@ static void aarch64_cpu_set_aarch64(Object *obj, bool = value, Error **errp) } } =20 -static void aarch64_cpu_initfn(Object *obj) -{ - object_property_add_bool(obj, "aarch64", aarch64_cpu_get_aarch64, - aarch64_cpu_set_aarch64); - object_property_set_description(obj, "aarch64", - "Set on/off to enable/disable aarch64 " - "execution state "); -} - static void aarch64_cpu_finalizefn(Object *obj) { } @@ -786,6 +777,12 @@ static void aarch64_cpu_class_init(ObjectClass *oc, vo= id *data) cc->gdb_num_core_regs =3D 34; cc->gdb_core_xml_file =3D "aarch64-core.xml"; cc->gdb_arch_name =3D aarch64_gdb_arch_name; + + object_class_property_add_bool(oc, "aarch64", aarch64_cpu_get_aarch64, + aarch64_cpu_set_aarch64); + object_class_property_set_description(oc, "aarch64", + "Set on/off to enable/disable aa= rch64 " + "execution state "); } =20 static void aarch64_cpu_instance_init(Object *obj) @@ -823,7 +820,6 @@ static const TypeInfo aarch64_cpu_type_info =3D { .name =3D TYPE_AARCH64_CPU, .parent =3D TYPE_ARM_CPU, .instance_size =3D sizeof(ARMCPU), - .instance_init =3D aarch64_cpu_initfn, .instance_finalize =3D aarch64_cpu_finalizefn, .abstract =3D true, .class_size =3D sizeof(AArch64CPUClass), --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600727353; cv=none; d=zohomail.com; s=zohoarc; b=kXWWScoSiAckntMP2gDjQboo26GTI5XM1bmeb0eP0CekmE45sO4lmCDoD8P03Gm0NblDvIc+ddo/4ZLZi+xJWPOcTigUW8s4vcXxE/8Chng8aoKLtgGyoT9GoR0rhlFLBScP0hodTviG2O4eYciQpNY0jkDRJcWwwOJnGq449ss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600727353; 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=i4WApan/GZKTLeUW28LxUT+wI7HTy1waMMiyOA8pIHY=; b=CE15j+s6jv9uDY8NRrz68UDgQRduM1CaZnHvSOjQEJeFYqx952NUOFzWFwkTjbRF/bvE3TG1HvttpMNYj2OTy5L/QJiFOKefnXiVa10I25922HtTaQfrxYqnOOX4ElOVIHFxV2reLzbRbaWErWFFa7XfTTjGtRs9Ztdt6PEOQxM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600727353414331.5074306389421; Mon, 21 Sep 2020 15:29:13 -0700 (PDT) Received: from localhost ([::1]:36214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUJ6-0006ij-6Q for importer@patchew.org; Mon, 21 Sep 2020 18:29:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU25-0000Wl-Di for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40216) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU21-0001fz-IC for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:37 -0400 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-247-piy_bAwAM6O-cF3MAXLwEw-1; Mon, 21 Sep 2020 18:11:30 -0400 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 93F72185FD70; Mon, 21 Sep 2020 22:11:28 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40C9616E20; Mon, 21 Sep 2020 22:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726291; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i4WApan/GZKTLeUW28LxUT+wI7HTy1waMMiyOA8pIHY=; b=E1Dv92fjkM+fExsLbN1pK7Z7q/TfeUpAAF8waHhaCT+Q+p9Fe4o7zueZtx7O+GLpCLTn4M a5597Wj33YQ0u4FsfF51/yhqG+iNZelGS4dEbUveJB0CEcGHGuC8agIzC7GTDzA0Hgx40N x1jm2uNHZ3nyXln8AEz/m7qJTPZO/18= X-MC-Unique: piy_bAwAM6O-cF3MAXLwEw-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 19/24] xlnx-zcu102: Register properties as class properties Date: Mon, 21 Sep 2020 18:10:40 -0400 Message-Id: <20200921221045.699690-20-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 01:43:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Daniel P. Berrange" , Alistair Francis , qemu-arm@nongnu.org, "Edgar E. Iglesias" , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Alistair Francis --- Cc: Alistair Francis Cc: "Edgar E. Iglesias" Cc: Peter Maydell Cc: qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org --- hw/arm/xlnx-zcu102.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c index 19d5a4d4e0e..4deb96bfcc1 100644 --- a/hw/arm/xlnx-zcu102.c +++ b/hw/arm/xlnx-zcu102.c @@ -208,20 +208,8 @@ static void xlnx_zcu102_machine_instance_init(Object *= obj) =20 /* Default to secure mode being disabled */ s->secure =3D false; - object_property_add_bool(obj, "secure", zcu102_get_secure, - zcu102_set_secure); - object_property_set_description(obj, "secure", - "Set on/off to enable/disable the ARM " - "Security Extensions (TrustZone)"); - /* Default to virt (EL2) being disabled */ s->virt =3D false; - object_property_add_bool(obj, "virtualization", zcu102_get_virt, - zcu102_set_virt); - object_property_set_description(obj, "virtualization", - "Set on/off to enable/disable emulatin= g a " - "guest CPU which implements the ARM " - "Virtualization Extensions"); } =20 static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data) @@ -237,6 +225,19 @@ static void xlnx_zcu102_machine_class_init(ObjectClass= *oc, void *data) mc->max_cpus =3D XLNX_ZYNQMP_NUM_APU_CPUS + XLNX_ZYNQMP_NUM_RPU_CPUS; mc->default_cpus =3D XLNX_ZYNQMP_NUM_APU_CPUS; mc->default_ram_id =3D "ddr-ram"; + + object_class_property_add_bool(oc, "secure", zcu102_get_secure, + zcu102_set_secure); + object_class_property_set_description(oc, "secure", + "Set on/off to enable/disable th= e ARM " + "Security Extensions (TrustZone)= "); + + object_class_property_add_bool(oc, "virtualization", zcu102_get_virt, + zcu102_set_virt); + object_class_property_set_description(oc, "virtualization", + "Set on/off to enable/disable em= ulating a " + "guest CPU which implements the = ARM " + "Virtualization Extensions"); } =20 static const TypeInfo xlnx_zcu102_machine_init_typeinfo =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600727198; cv=none; d=zohomail.com; s=zohoarc; b=RRhLds9mh6oQilKkjRm1SIvKcQRXHGVfM/J/5MFClozliKcXv/d4sKvh9Bawd76c7mBlgtdboO21ld4pe7cVxDxJ9Gi0MzPzTkv6S9E15F23KBy8j6pZoTwog37gbrezQSUMheNsDYn7YKGYKSWrqev7REsql3eHSxDeXtlseho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600727198; 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=Z5+/1tyGKR8UL8izbNzf4NPhJhG0pfUnyRttNwTzYwI=; b=I3c467Jj6IFPS8od2+SOqWrR/ipbCAIpVpAv29r/7Zl32+YDs/qn65YHUB6xjsj8YnwmpCT2G2P8HFfWFBd/rqAi5/d3MLXjCR25wN+hJZ/eD6QNqy/q5e6vHXj7cIETiJh/VOu1xsxBqb9ybFN2ATuX++TnR/A7l81RscvfbE8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600727198727995.8677064460579; Mon, 21 Sep 2020 15:26:38 -0700 (PDT) Received: from localhost ([::1]:56186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUGb-0003Gw-Bn for importer@patchew.org; Mon, 21 Sep 2020 18:26:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU29-0000eC-E2 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38976) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU24-0001gL-75 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:41 -0400 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-165-SjKwBzV8NaWE28qR60HC-w-1; Mon, 21 Sep 2020 18:11:30 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8141D873081; Mon, 21 Sep 2020 22:11:29 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A13310013BD; Mon, 21 Sep 2020 22:11:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726294; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z5+/1tyGKR8UL8izbNzf4NPhJhG0pfUnyRttNwTzYwI=; b=C5rZ2qwEA+F0Ishm1J7G9WMs9S25qX0Lc0ZsOGf3Mb3peK+VfQx9fHs+M3QpY/eTHvzt80 I4ei1BGW04NUqIdq5PHoH0qUCp3VJRpGpZP/BYPwAdQJbCE6Yp0u3AYkDJANgkfZAwBrou KVPO3hgkKnYlCv4haKI2bvebLKbwewE= X-MC-Unique: SjKwBzV8NaWE28qR60HC-w-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 20/24] machine: Register "memory-backend" as class property Date: Mon, 21 Sep 2020 18:10:41 -0400 Message-Id: <20200921221045.699690-21-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 01:43:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: qemu-devel@nongnu.org --- hw/core/machine.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index ea26d612374..675ca6d651c 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -874,6 +874,12 @@ static void machine_class_init(ObjectClass *oc, void *= data) machine_get_memory_encryption, machine_set_memory_encryption); object_class_property_set_description(oc, "memory-encryption", "Set memory encryption object to use"); + + object_class_property_add_str(oc, "memory-backend", + machine_get_memdev, machine_set_memdev); + object_class_property_set_description(oc, "memory-backend", + "Set RAM backend" + "Valid value is ID of hostmem ba= sed backend"); } =20 static void machine_class_base_init(ObjectClass *oc, void *data) @@ -925,12 +931,6 @@ static void machine_initfn(Object *obj) "Table (HMAT)"); } =20 - object_property_add_str(obj, "memory-backend", - machine_get_memdev, machine_set_memdev); - object_property_set_description(obj, "memory-backend", - "Set RAM backend" - "Valid value is ID of hostmem based ba= ckend"); - /* Register notifier when init is done for sysbus sanity checks */ ms->sysbus_notifier.notify =3D machine_init_notify; qemu_add_machine_init_done_notifier(&ms->sysbus_notifier); --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600727327; cv=none; d=zohomail.com; s=zohoarc; b=hmufXoT7bQaJeZn4NJEjViUIpUu/JWqeZDxNLfeUkZvufgb07BRKseJNXt2GaeXecIjzH8mFBS+W5+WnlGNvTkRJsxa2UJi4JUDp7tAKxtV0Uw8Pdlh5MENHhloRuieME22gFM1Tq6ELJbgYMNpJsZdBD8rdBuxqMCYF0cbP9l8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600727327; 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=zEmubyhVPEqVZS8bAuyRyp9dmKFyakhI1Fgi9Dy1TSI=; b=hiw6ZLWfjvEIuipRyRPjN8nIrpin94CxKEKpQFr4+c7+p5qS5CsNGhLGfJiaH4X8/xZBz03gSVZnBwrRi53KvppfjbDbu6ZvPt9KmtoiAPW4diPVBF6Z41BF+1QyuJP7LdhuTlIVRmbN1ke439y3VAGkRGtCWJsGQxd/aziZMRM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600727327099270.60412853722664; Mon, 21 Sep 2020 15:28:47 -0700 (PDT) Received: from localhost ([::1]:34412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUIf-0005yK-SZ for importer@patchew.org; Mon, 21 Sep 2020 18:28:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU2H-0000fu-W5 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU25-0001go-Bx for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:47 -0400 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-139-LNbx3JBZOs-xl3Yst2Y3aQ-1; Mon, 21 Sep 2020 18:11:34 -0400 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 B696210059A2 for ; Mon, 21 Sep 2020 22:11:33 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D2CF5577B; Mon, 21 Sep 2020 22:11:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726296; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zEmubyhVPEqVZS8bAuyRyp9dmKFyakhI1Fgi9Dy1TSI=; b=Iajyvj8yt0tKRIc+uJLQZ/E8/l4Di3/U2+lEVi80e32RsWcpO9vQokE18epyTbrUiNrdJ+ d+o9tgssVwBobmqEdBtmdyVmNcpN980oD92Otn4DIvUPmNTyvwinYYAu9TjWhZ3E+pHh8V 6KUvtcaBKP1NvsDiUqVz08XuljbQwF8= X-MC-Unique: LNbx3JBZOs-xl3Yst2Y3aQ-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 21/24] vga-pci: Register "big-endian-framebuffer" as class property Date: Mon, 21 Sep 2020 18:10:42 -0400 Message-Id: <20200921221045.699690-22-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 01:43:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Marc-Andr=C3=A9 Lureau --- Cc: Gerd Hoffmann Cc: qemu-devel@nongnu.org --- hw/display/vga-pci.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index 3b45fa3bad0..b2a7d03c5d5 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -269,13 +269,6 @@ static void pci_std_vga_realize(PCIDevice *dev, Error = **errp) } } =20 -static void pci_std_vga_init(Object *obj) -{ - /* Expose framebuffer byteorder via QOM */ - object_property_add_bool(obj, "big-endian-framebuffer", - vga_get_big_endian_fb, vga_set_big_endian_fb); -} - static void pci_secondary_vga_realize(PCIDevice *dev, Error **errp) { PCIVGAState *d =3D PCI_VGA(dev); @@ -388,6 +381,10 @@ static void vga_class_init(ObjectClass *klass, void *d= ata) k->class_id =3D PCI_CLASS_DISPLAY_VGA; device_class_set_props(dc, vga_pci_properties); dc->hotpluggable =3D false; + + /* Expose framebuffer byteorder via QOM */ + object_class_property_add_bool(klass, "big-endian-framebuffer", + vga_get_big_endian_fb, vga_set_big_endi= an_fb); } =20 static void secondary_class_init(ObjectClass *klass, void *data) @@ -405,7 +402,6 @@ static void secondary_class_init(ObjectClass *klass, vo= id *data) static const TypeInfo vga_info =3D { .name =3D "VGA", .parent =3D TYPE_PCI_VGA, - .instance_init =3D pci_std_vga_init, .class_init =3D vga_class_init, }; =20 --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600727611; cv=none; d=zohomail.com; s=zohoarc; b=bEECQ3cCNl5IPKkzrk8hgbQweSnpjGm8go09Slq3tsQxgaU8b3XYNwlG+Fq70H8ahci9ZQfWFmQ7syNgjGZhA3U+kkBTDFgEg5Op/5WcFtt1OtbKrh1PRmFaAhK7xowKiAi4cZQL9Br6JmlDoAwkYbmA2Bx0LSZFQjYaQtcUEns= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600727611; 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=ZAodmTsWx2xlqVJ73KVGampglMnGqEHVO9pba0Go1gY=; b=gBWLjnznPxzZCmJtjyk5QJDeuTcJftmTFgkSoijRNZZIubkab1AFQ1ln6lxResoHq/I+QBtA65pJx2G7GNrrr/C4hM1LPRcDDHoOWdXywNK3ckK9IKuGHg5iFXUA7HWiR8I4s75OUtr2lrXQzCCOI0UXFOnnWOzP/Hcx+xKTMyw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600727611889834.7648686240467; Mon, 21 Sep 2020 15:33:31 -0700 (PDT) Received: from localhost ([::1]:45764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUNG-0002OX-HV for importer@patchew.org; Mon, 21 Sep 2020 18:33:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU2S-0000k5-Q9 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:12:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54974) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU2H-0001hg-NU for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:12:00 -0400 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-471-hVIob0fWPZq4otkI19w9kA-1; Mon, 21 Sep 2020 18:11:39 -0400 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 369C510059A7; Mon, 21 Sep 2020 22:11:38 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 915297366D; Mon, 21 Sep 2020 22:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726301; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZAodmTsWx2xlqVJ73KVGampglMnGqEHVO9pba0Go1gY=; b=bdu9XgKk+xXPliewKLTK+0ycdB3ip6/h219YHM6yKP1wpXGpHfLzjcdINcbgp0VLfsRjl2 G2TyUeEXzd/Gl3gMbv6nLVqAriliZMCkSf0fCrFV80eX2A+dLV9o8HrS3SQxG7YIGjs6tw J5qtchh8sUC8sKXdy8SKg1sv2gKtm1s= X-MC-Unique: hVIob0fWPZq4otkI19w9kA-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 22/24] i440fx: Register i440FX-pcihost properties as class properties Date: Mon, 21 Sep 2020 18:10:43 -0400 Message-Id: <20200921221045.699690-23-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 01:43:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Paolo Bonzini , "Daniel P. Berrange" , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin --- Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: qemu-devel@nongnu.org --- hw/pci-host/i440fx.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c index 93c62235ca7..4454ba06621 100644 --- a/hw/pci-host/i440fx.c +++ b/hw/pci-host/i440fx.c @@ -212,22 +212,6 @@ static void i440fx_pcihost_initfn(Object *obj) "pci-conf-idx", 4); memory_region_init_io(&s->data_mem, obj, &pci_host_data_le_ops, s, "pci-conf-data", 4); - - object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_START, "uint32", - i440fx_pcihost_get_pci_hole_start, - NULL, NULL, NULL); - - object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_END, "uint32", - i440fx_pcihost_get_pci_hole_end, - NULL, NULL, NULL); - - object_property_add(obj, PCI_HOST_PROP_PCI_HOLE64_START, "uint64", - i440fx_pcihost_get_pci_hole64_start, - NULL, NULL, NULL); - - object_property_add(obj, PCI_HOST_PROP_PCI_HOLE64_END, "uint64", - i440fx_pcihost_get_pci_hole64_end, - NULL, NULL, NULL); } =20 static void i440fx_pcihost_realize(DeviceState *dev, Error **errp) @@ -403,6 +387,22 @@ static void i440fx_pcihost_class_init(ObjectClass *kla= ss, void *data) device_class_set_props(dc, i440fx_props); /* Reason: needs to be wired up by pc_init1 */ dc->user_creatable =3D false; + + object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE_START, "uint32= ", + i440fx_pcihost_get_pci_hole_start, + NULL, NULL, NULL); + + object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE_END, "uint32", + i440fx_pcihost_get_pci_hole_end, + NULL, NULL, NULL); + + object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE64_START, "uint= 64", + i440fx_pcihost_get_pci_hole64_start, + NULL, NULL, NULL); + + object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE64_END, "uint64= ", + i440fx_pcihost_get_pci_hole64_end, + NULL, NULL, NULL); } =20 static const TypeInfo i440fx_pcihost_info =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600727462; cv=none; d=zohomail.com; s=zohoarc; b=VvvFrlDcYW6BvIIPSQBLkuAKmMxu5YTDtLF9ljdYnw+Ka3gj6t/JgHdHdewWbNIRaGMrt5gLzEOLMzmYSl5d6Eq7aSkeBjMZ6SL6KYzEt/yL2AH+kInm87VfsrTcP1lw/ZtobxQSjl1nRxt0BUPsjOiDl0EClQuCON/OI7w0TUY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600727462; 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=sAYj6eanxpvOaG3xD5VarL0V3UnuN5CPZvESe5wO2/M=; b=gSEkflO6b0aER9OleCbaWHfxKDArLC94BfSxOX7fP+oRDl8HJ/fpIKU7HMRwulLPV8o+qIwbaBwyzRzYK68YEcXM0Ji0bxGDAt6ppVErhrIernb7MgDObewt8qPJ1yhooVT+p7fgZuKETT8xT1o4DGxDNw3aoX+YWK6gixPEu8Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600727462154496.1930781318948; Mon, 21 Sep 2020 15:31:02 -0700 (PDT) Received: from localhost ([::1]:40706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUKq-0000D7-Ny for importer@patchew.org; Mon, 21 Sep 2020 18:31:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU2Q-0000hB-8F for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU2H-0001hr-NO for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:57 -0400 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-203-N6HzcBesN9i2RJJj3vvZew-1; Mon, 21 Sep 2020 18:11:41 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E61A5873084; Mon, 21 Sep 2020 22:11:39 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 985715D9CD; Mon, 21 Sep 2020 22:11:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726303; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sAYj6eanxpvOaG3xD5VarL0V3UnuN5CPZvESe5wO2/M=; b=R7IHVlnvYAIsEWSl2QOjLGFKXgYtoz82fIw8qTBBSRyU+UKP9lcljvTBKFsnb40VVEW1DQ xnQ2D1IGAXyVPoF2uW03mJcloNXc/8mF5itTH4Skyn/UAWlIaoSM6woZ/8iXa57RwPvmQI QVc69WuMyguPiSPu1acdrzODdBpufig= X-MC-Unique: N6HzcBesN9i2RJJj3vvZew-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 23/24] sifive_e: Register "revb" as class property Date: Mon, 21 Sep 2020 18:10:44 -0400 Message-Id: <20200921221045.699690-24-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 01:43:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , qemu-riscv@nongnu.org, Sagar Karandikar , Bastian Koppelmann , Alistair Francis , Paolo Bonzini , John Snow , Palmer Dabbelt Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Alistair Francis --- Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: qemu-riscv@nongnu.org Cc: qemu-devel@nongnu.org --- hw/riscv/sifive_e.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c index 40bbf530d49..9fe0c12df64 100644 --- a/hw/riscv/sifive_e.c +++ b/hw/riscv/sifive_e.c @@ -137,11 +137,6 @@ static void sifive_e_machine_instance_init(Object *obj) SiFiveEState *s =3D RISCV_E_MACHINE(obj); =20 s->revb =3D false; - object_property_add_bool(obj, "revb", sifive_e_machine_get_revb, - sifive_e_machine_set_revb); - object_property_set_description(obj, "revb", - "Set on to tell QEMU that it should mo= del " - "the revB HiFive1 board"); } =20 static void sifive_e_machine_class_init(ObjectClass *oc, void *data) @@ -152,6 +147,12 @@ static void sifive_e_machine_class_init(ObjectClass *o= c, void *data) mc->init =3D sifive_e_machine_init; mc->max_cpus =3D 1; mc->default_cpu_type =3D SIFIVE_E_CPU; + + object_class_property_add_bool(oc, "revb", sifive_e_machine_get_revb, + sifive_e_machine_set_revb); + object_class_property_set_description(oc, "revb", + "Set on to tell QEMU that it sho= uld model " + "the revB HiFive1 board"); } =20 static const TypeInfo sifive_e_machine_typeinfo =3D { --=20 2.26.2 From nobody Thu May 2 20:20:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600726973; cv=none; d=zohomail.com; s=zohoarc; b=YnuJAG4ugXpFTJGXNtHE5vyqGLuthQQnjugUIOeHON+Xe7wSWjvs+tj3+ZDxe9mtgSS9VWRHtOvF9tWGk2UClDACdV7DuAYTlHE4TJR2m0YJOZ8LHb93IrQ8NPcfsGchMyBAAWZuElXICYhA0wILzhag9zJecIOva1iWjYufUtw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600726973; 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=wfUh7sBCp5W7Sr+En1wJlTcrEKS1ztpPr27s/gxaLDk=; b=GsV8eaKJMMigU98rHTzV4TW1i5lakgjotWNQ0m0G2SgfnJR2o7HjY4Aq9dVr8wx7o97IgBIOJYEEqkEPbIWfGrcq+IlSzdRmdI3B3G55bOwMYa2JRN1+25i9HgtM1/tryw4w/apJLdt0xhQSJ3NA8gAoNmSc36rZ/DloQvk9yZc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600726973955275.49702526832675; Mon, 21 Sep 2020 15:22:53 -0700 (PDT) Received: from localhost ([::1]:42200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKUCy-0005nm-Gn for importer@patchew.org; Mon, 21 Sep 2020 18:22:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKU2R-0000hO-JB for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:53907 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKU2H-0001i1-OH for qemu-devel@nongnu.org; Mon, 21 Sep 2020 18:11:59 -0400 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-219-8kHgsiHCN525RklM_0xR7A-1; Mon, 21 Sep 2020 18:11:42 -0400 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 D6684909CA7; Mon, 21 Sep 2020 22:11:40 +0000 (UTC) Received: from localhost (unknown [10.10.67.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DD307366D; Mon, 21 Sep 2020 22:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600726305; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wfUh7sBCp5W7Sr+En1wJlTcrEKS1ztpPr27s/gxaLDk=; b=OPn4IUn/PrF7mNRYcPhzUNnN4oF6gXu9PpSrw85fvh8zkEbxatAbQLc/5uBy+FKzv+0oeO R7jNwh4uHHVmFhOYwZhyPPYls5XFJ4Mm6Jw9Rz1jTPANBcEL4nzXAFgBZGaMdscox3xgkR 0KveX+6jelUzye3G96sDDeI5FLx8p0E= X-MC-Unique: 8kHgsiHCN525RklM_0xR7A-1 From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 24/24] sifive_u: Register "start-in-flash" as class property Date: Mon, 21 Sep 2020 18:10:45 -0400 Message-Id: <20200921221045.699690-25-ehabkost@redhat.com> In-Reply-To: <20200921221045.699690-1-ehabkost@redhat.com> References: <20200921221045.699690-1-ehabkost@redhat.com> MIME-Version: 1.0 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-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 18:11:08 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , qemu-riscv@nongnu.org, Sagar Karandikar , Bastian Koppelmann , Alistair Francis , Paolo Bonzini , John Snow , Palmer Dabbelt Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost Reviewed-by: Alistair Francis --- Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: qemu-riscv@nongnu.org Cc: qemu-devel@nongnu.org --- hw/riscv/sifive_u.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index 4f12a93188d..0f0fab9a47b 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -568,14 +568,6 @@ static void sifive_u_machine_instance_init(Object *obj) SiFiveUState *s =3D RISCV_U_MACHINE(obj); =20 s->start_in_flash =3D false; - object_property_add_bool(obj, "start-in-flash", - sifive_u_machine_get_start_in_flash, - sifive_u_machine_set_start_in_flash); - object_property_set_description(obj, "start-in-flash", - "Set on to tell QEMU's ROM to jump to " - "flash. Otherwise QEMU will jump to DR= AM " - "or L2LIM depending on the msel value"= ); - s->msel =3D 0; object_property_add(obj, "msel", "uint32", sifive_u_machine_get_uint32_prop, @@ -599,6 +591,14 @@ static void sifive_u_machine_class_init(ObjectClass *o= c, void *data) mc->max_cpus =3D SIFIVE_U_MANAGEMENT_CPU_COUNT + SIFIVE_U_COMPUTE_CPU_= COUNT; mc->min_cpus =3D SIFIVE_U_MANAGEMENT_CPU_COUNT + 1; mc->default_cpus =3D mc->min_cpus; + + object_class_property_add_bool(oc, "start-in-flash", + sifive_u_machine_get_start_in_flash, + sifive_u_machine_set_start_in_flash); + object_class_property_set_description(oc, "start-in-flash", + "Set on to tell QEMU's ROM to ju= mp to " + "flash. Otherwise QEMU will jump= to DRAM " + "or L2LIM depending on the msel = value"); } =20 static const TypeInfo sifive_u_machine_typeinfo =3D { --=20 2.26.2