mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
xen: convert "-machine igd-passthru" to an accelerator property
The first machine property to fall is Xen's Intel integrated graphics passthrough. The "-machine igd-passthru" option does not set anymore a property on the machine object, but desugars to a GlobalProperty on accelerator objects. The setter is very simple, since the value ends up in a global variable, so this patch also provides an example before the more complicated cases that follow it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
fe17413247
commit
46472d8232
6 changed files with 28 additions and 34 deletions
|
@ -417,20 +417,6 @@ static void machine_set_graphics(Object *obj, bool value, Error **errp)
|
|||
ms->enable_graphics = value;
|
||||
}
|
||||
|
||||
static bool machine_get_igd_gfx_passthru(Object *obj, Error **errp)
|
||||
{
|
||||
MachineState *ms = MACHINE(obj);
|
||||
|
||||
return ms->igd_gfx_passthru;
|
||||
}
|
||||
|
||||
static void machine_set_igd_gfx_passthru(Object *obj, bool value, Error **errp)
|
||||
{
|
||||
MachineState *ms = MACHINE(obj);
|
||||
|
||||
ms->igd_gfx_passthru = value;
|
||||
}
|
||||
|
||||
static char *machine_get_firmware(Object *obj, Error **errp)
|
||||
{
|
||||
MachineState *ms = MACHINE(obj);
|
||||
|
@ -867,12 +853,6 @@ static void machine_class_init(ObjectClass *oc, void *data)
|
|||
object_class_property_set_description(oc, "graphics",
|
||||
"Set on/off to enable/disable graphics emulation", &error_abort);
|
||||
|
||||
object_class_property_add_bool(oc, "igd-passthru",
|
||||
machine_get_igd_gfx_passthru, machine_set_igd_gfx_passthru,
|
||||
&error_abort);
|
||||
object_class_property_set_description(oc, "igd-passthru",
|
||||
"Set on/off to enable/disable igd passthrou", &error_abort);
|
||||
|
||||
object_class_property_add_str(oc, "firmware",
|
||||
machine_get_firmware, machine_set_firmware,
|
||||
&error_abort);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue