diff options
Diffstat (limited to 'hw/core/machine.c')
-rw-r--r-- | hw/core/machine.c | 52 |
1 files changed, 43 insertions, 9 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c index fbd91be575..e3a3e2ab73 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -31,18 +31,12 @@ static void machine_set_accel(Object *obj, const char *value, Error **errp) ms->accel = g_strdup(value); } -static bool machine_get_kernel_irqchip(Object *obj, Error **errp) -{ - MachineState *ms = MACHINE(obj); - - return ms->kernel_irqchip; -} - static void machine_set_kernel_irqchip(Object *obj, bool value, Error **errp) { MachineState *ms = MACHINE(obj); - ms->kernel_irqchip = value; + ms->kernel_irqchip_allowed = value; + ms->kernel_irqchip_required = value; } static void machine_get_kvm_shadow_mem(Object *obj, Visitor *v, @@ -289,13 +283,18 @@ static void machine_initfn(Object *obj) { MachineState *ms = MACHINE(obj); + ms->kernel_irqchip_allowed = true; + ms->kvm_shadow_mem = -1; + ms->dump_guest_core = true; + ms->mem_merge = true; + object_property_add_str(obj, "accel", machine_get_accel, machine_set_accel, NULL); object_property_set_description(obj, "accel", "Accelerator list", NULL); object_property_add_bool(obj, "kernel-irqchip", - machine_get_kernel_irqchip, + NULL, machine_set_kernel_irqchip, NULL); object_property_set_description(obj, "kernel-irqchip", @@ -403,6 +402,41 @@ bool machine_usb(MachineState *machine) return machine->usb; } +bool machine_iommu(MachineState *machine) +{ + return machine->iommu; +} + +bool machine_kernel_irqchip_allowed(MachineState *machine) +{ + return machine->kernel_irqchip_allowed; +} + +bool machine_kernel_irqchip_required(MachineState *machine) +{ + return machine->kernel_irqchip_required; +} + +int machine_kvm_shadow_mem(MachineState *machine) +{ + return machine->kvm_shadow_mem; +} + +int machine_phandle_start(MachineState *machine) +{ + return machine->phandle_start; +} + +bool machine_dump_guest_core(MachineState *machine) +{ + return machine->dump_guest_core; +} + +bool machine_mem_merge(MachineState *machine) +{ + return machine->mem_merge; +} + static const TypeInfo machine_info = { .name = TYPE_MACHINE, .parent = TYPE_OBJECT, |