[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/6] machine: export register_compat_prop()
From: |
Peter Xu |
Subject: |
[Qemu-devel] [PATCH v2 1/6] machine: export register_compat_prop() |
Date: |
Fri, 9 Jun 2017 11:48:57 +0800 |
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 <address@hidden>
CC: Markus Armbruster <address@hidden>
CC: Marcel Apfelbaum <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
---
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);
}
-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 = 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,
--
2.7.4