summaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel@redhat.com>2015-02-04 17:43:52 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-03-11 18:16:25 +0100
commit4689b77bda5187d4e2aac78bf21cc1a86502652d (patch)
treefe08d7c5edeee06c0a24d7534d844f83d88fbfae /hw/core
parentb16565b396dbbb4c99899dbea599b22f4e0658d6 (diff)
machine: query kvm-shadow-mem machine property
Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Query kvm-shadow-mem by accessing machine properties through designated wrappers. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/machine.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c
index e04e5ab330..0ad5b12781 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -284,6 +284,7 @@ static void machine_initfn(Object *obj)
MachineState *ms = MACHINE(obj);
ms->kernel_irqchip_allowed = true;
+ ms->kvm_shadow_mem = -1;
object_property_add_str(obj, "accel",
machine_get_accel, machine_set_accel, NULL);
@@ -414,6 +415,11 @@ bool machine_kernel_irqchip_required(MachineState *machine)
return machine->kernel_irqchip_required;
}
+int machine_kvm_shadow_mem(MachineState *machine)
+{
+ return machine->kvm_shadow_mem;
+}
+
static const TypeInfo machine_info = {
.name = TYPE_MACHINE,
.parent = TYPE_OBJECT,