From nobody Mon Feb 9 08:56:54 2026 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