From nobody Sun Feb 8 06:04:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496980259338157.39443831254027; Thu, 8 Jun 2017 20:50:59 -0700 (PDT) Received: from localhost ([::1]:52484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJAwr-0003Nu-Oh for importer@patchew.org; Thu, 08 Jun 2017 23:50:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJAvF-0002TU-M2 for qemu-devel@nongnu.org; Thu, 08 Jun 2017 23:49:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJAvE-0007TU-RU for qemu-devel@nongnu.org; Thu, 08 Jun 2017 23:49:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44688) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dJAvE-0007T7-L8 for qemu-devel@nongnu.org; Thu, 08 Jun 2017 23:49:16 -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 mx1.redhat.com (Postfix) with ESMTPS id 9E7D983F44 for ; Fri, 9 Jun 2017 03:49:15 +0000 (UTC) Received: from pxdev.xzpeter.org.com (ovpn-12-95.pek2.redhat.com [10.72.12.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 085F41759C; Fri, 9 Jun 2017 03:49:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9E7D983F44 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=peterx@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9E7D983F44 From: Peter Xu To: qemu-devel@nongnu.org Date: Fri, 9 Jun 2017 11:48:57 +0800 Message-Id: <1496980142-8986-2-git-send-email-peterx@redhat.com> In-Reply-To: <1496980142-8986-1-git-send-email-peterx@redhat.com> References: <1496980142-8986-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 09 Jun 2017 03:49:15 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 1/6] machine: export register_compat_prop() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Eduardo Habkost , Juan Quintela , Markus Armbruster , peterx@redhat.com, "Dr . David Alan Gilbert" , Marcel Apfelbaum Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We have HW_COMPAT_*, however that's only binded to machines, not other things (like accelerators). Behind it, it was register_compat_prop() that played the trick. Let's export the function for further use outside HW_COMPAT_* magic. CC: Eduardo Habkost CC: Markus Armbruster CC: Marcel Apfelbaum Signed-off-by: Peter Xu --- hw/core/machine.c | 6 +++--- include/hw/boards.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index 3adebf1..320486d 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -753,9 +753,9 @@ static void machine_class_finalize(ObjectClass *klass, = void *data) g_free(mc->name); } =20 -static void register_compat_prop(const char *driver, - const char *property, - const char *value) +void register_compat_prop(const char *driver, + const char *property, + const char *value) { GlobalProperty *p =3D g_new0(GlobalProperty, 1); /* Machine compat_props must never cause errors: */ diff --git a/include/hw/boards.h b/include/hw/boards.h index 76ce021..6e0f5c7 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -41,6 +41,9 @@ int machine_kvm_shadow_mem(MachineState *machine); int machine_phandle_start(MachineState *machine); bool machine_dump_guest_core(MachineState *machine); bool machine_mem_merge(MachineState *machine); +void register_compat_prop(const char *driver, + const char *property, + const char *value); void machine_register_compat_props(MachineState *machine); HotpluggableCPUList *machine_query_hotpluggable_cpus(MachineState *machine= ); void machine_set_cpu_numa_node(MachineState *machine, --=20 2.7.4