aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi/acpi-stub.c
AgeCommit message (Collapse)AuthorFilesLines
2025-03-11hw/i386/fw_cfg: Check ACPI availability with acpi_builtin()Philippe Mathieu-Daudé1-0/+3
Define acpi_tables / acpi_tables_len stubs, then replace the compile-time CONFIG_ACPI check in fw_cfg.c by a runtime one. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ani Sinha <anisinha@redhat.com> Message-Id: <20250307223949.54040-4-philmd@linaro.org>
2025-03-11hw/acpi: Introduce acpi_builtin() helperPhilippe Mathieu-Daudé1-0/+5
acpi_builtin() can be used to check at runtime whether the ACPI subsystem is built in a qemu-system binary. Reviewed-by: Ani Sinha <anisinha@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20250307223949.54040-3-philmd@linaro.org>
2023-02-23hw/acpi: Dumb down acpi_table_add() stubMarkus Armbruster1-3/+1
The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. acpi_table_add() is only ever called on behalf of CLI option -acpitable. Since qemu-options.hx sets @arch_mask to QEMU_ARCH_I386, it is reachable only for these targets. Since they provide a real acpi_table_add(), the stub is unreachable. There's no point in unreachable code keeping QERR_UNSUPPORTED alive. Dumb it down to g_assert_not_reached(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230207075115.1525-7-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Juan Quintela <quintela@redhat.com>
2018-02-09Include qmp-commands.h exactly where neededMarkus Armbruster1-1/+0
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-7-armbru@redhat.com> [OSX breakage fixed]
2018-02-09Include qapi/error.h exactly where neededMarkus Armbruster1-0/+1
This cleanup makes the number of objects depending on qapi/error.h drop from 1910 (out of 4743) to 1612 in my "build everything" tree. While there, separate #include from file comment with a blank line, and drop a useless comment on why qemu/osdep.h is included first. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-5-armbru@redhat.com> [Semantic conflict with commit 34e304e975 resolved, OSX breakage fixed]
2017-01-16acpi: filter based on CONFIG_ACPI_X86 rather than TARGETPaolo Bonzini1-0/+29
Copy the mechanism of hw/smbios/smbios-stub.c to implement an ACPI-stub instead, so that -acpitable can be later extended to ARM. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>