- 02 3月, 2023 6 次提交
-
-
由 Michael S. Tsirkin 提交于
This reverts commit eebb38a5. Fixes: eebb38a5 ("x86: use typedef for SetupData struct") Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Tested-by: NNathan Chancellor <nathan@kernel.org> Tested-by: NDov Murik <dovmurik@linux.ibm.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michael S. Tsirkin 提交于
This reverts commit 763a2828. Fixes: 763a2828 ("x86: reinitialize RNG seed on system reboot") Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Tested-by: NNathan Chancellor <nathan@kernel.org> Tested-by: NDov Murik <dovmurik@linux.ibm.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michael S. Tsirkin 提交于
This reverts commit cc63374a. Fixes: cc63374a ("x86: re-initialize RNG seed when selecting kernel") Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Tested-by: NNathan Chancellor <nathan@kernel.org> Tested-by: NDov Murik <dovmurik@linux.ibm.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michael S. Tsirkin 提交于
This reverts commit 14b29fea. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Fixes: 14b29fea ("x86: do not re-randomize RNG seed on snapshot load") Tested-by: NNathan Chancellor <nathan@kernel.org> Tested-by: NDov Murik <dovmurik@linux.ibm.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michael S. Tsirkin 提交于
This reverts commit eac7a779. Fixes: eac7a779 ("x86: don't let decompressed kernel image clobber setup_data") Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Tested-by: NNathan Chancellor <nathan@kernel.org> Tested-by: NDov Murik <dovmurik@linux.ibm.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Julia Suvorova 提交于
Since table type 4 of SMBIOS version 2.6 is shorter than 3.0, the strings which follow immediately after the struct fields have been overwritten by unconditional filling of later fields such as core_count2. Make these fields dependent on the SMBIOS version. Fixes: 05e27d74 ("hw/smbios: add core_count2 to smbios table type 4") Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2169904Signed-off-by: NJulia Suvorova <jusual@redhat.com> Message-Id: <20230223125747.254914-1-jusual@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NAni Sinha <ani@anisinha.ca> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 28 2月, 2023 34 次提交
-
-
https://github.com/philmd/qemu由 Peter Maydell 提交于
- buildsys - Various header cleaned up (removing pointless headers) - Mark various files/code user/system specific - Make various objects target-independent - Remove tswapN() calls from dump.o - Suggest g_assert_not_reached() instead of assert(0) - qdev / qom - Replace various container_of() by QOM cast macros - Declare some QOM macros using OBJECT_DECLARE_TYPE() - Embed OHCI QOM child in SM501 chipset - hw (ISA & IDE) - add some documentation, improve function names - un-inline, open-code few functions - have ISA API accessing IRQ/DMA prefer ISABus over ISADevice - Demote IDE subsystem maintenance to "Odd Fixes" - ui: Improve Ctrl+Alt hint on Darwin Cocoa # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmP9IeAACgkQ4+MsLN6t # wN7bdQ//SxJYJuQvqTT6s+O0LmP6NbqvhxCXX7YAwK2jCTM+zTgcqqRZCcisLQol # 3ENu2UhnZmiLKHSOxatOVozbws08/u8Vl+WkW4UTMUb1yo5KPaPtq808Y95RdAJB # 7D7B5juDGnFRAHXZz38zVk9uIuEkm+Po/pD0JQa+upBtAAgOJTqGavDNSR5+T0Yl # VjGdwK0b10skPqiF6OABYoy/4IFHVJJFIbARZh+a7hrF0llsbzUts5JiYsOxEEHQ # t3woUItdMnS1m0+Ty4AQ8m0Yv9y4HZOIzixvsZ+vChj5ariwUhL9/7wC/s/UCYEg # gKVA5X8R6n/ME6DScK99a+CyR/MXkz70b/rOUZxoutXhV3xdh4X1stL4WN9W/m3z # D4i4ZrUsDUcKCGWlj49of/dKbOPwk1+e/mT0oDZD6JzG0ODjfdVxvJ/JEV2iHgS3 # WqHuSKzX/20H9j7/MgfbQ0HjBFOQ8tl781vQzhD+y+cF/IiTsHhrE6esIWho4bob # kfSdVydUWWRnBsnyGoRZXoEMX9tn+pu0nKxEDm2Bo2+jajsa0aZZPokgjxaz4MnD # Hx+/p1E+8IuOn05JgzQSgTJmKFdSbya203tXIsTo1kL2aJTJ6QfMvgEPP/fkn+lS # oQyVBFZmb1JDdTM1MxOncnlWLg74rp/CWEc+u5pSdbxMO/M/uac= # =AV/+ # -----END PGP SIGNATURE----- # gpg: Signature made Mon 27 Feb 2023 21:34:24 GMT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'buildsys-qom-qdev-ui-20230227' of https://github.com/philmd/qemu: (125 commits) ui/cocoa: user friendly characters for release mouse dump: Add create_win_dump() stub for non-x86 targets dump: Simplify compiling win_dump.o by introducing win_dump_available() dump: Clean included headers dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size() dump: Replace tswapN() -> cpu_to_dumpN() hw/ide/pci: Add PCIIDEState::isa_irq[] hw/ide/via: Replace magic 2 value by ARRAY_SIZE / MAX_IDE_DEVS hw/ide/piix: Refactor pci_piix_init_ports as pci_piix_init_bus per bus hw/ide/piix: Pass Error* to pci_piix_init_ports() for better error msg hw/ide/piix: Remove unused includes hw/ide/pci: Unexport bmdma_active_if() hw/ide/ioport: Remove unnecessary includes hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h' hw/ide: Rename idebus_active_if() -> ide_bus_active_if() hw/ide: Rename ide_init2() -> ide_bus_init_output_irq() hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb hw/ide: Rename ide_create_drive() -> ide_bus_create_drive() hw/ide: Rename ide_set_irq() -> ide_bus_set_irq() ... Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Christian Schoenebeck 提交于
While mouse is grabbed, window title contains a hint for the user what keyboard keys to press to release the mouse. Make that hint text a bit more user friendly for a Mac user: - Replace "Ctrl" and "Alt" by appropriate symbols for those keyboard keys typically displayed for them on a Mac (encode those symbols by using UTF-8 characters). - Drop " + " in between the keys, as that's not common on macOS for documenting keyboard shortcuts. - Convert lower case "g" to upper case "G", as that's common on macOS. - Add one additional space at start and end of key stroke set, to visually separate the key strokes from the rest of the text. Signed-off-by: NChristian Schoenebeck <qemu_oss@crudebyte.com> Tested-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <E1pAClj-0003Jo-OB@lizzy.crudebyte.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Implement the non-x86 create_win_dump(). We can remove the last TARGET_X86_64 #ifdef'ry in dump.c, which thus becomes target-independent. Update meson accordingly. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230225094903.53167-6-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
To make dump.c less target dependent, move the TARGET_X86_64 #ifdef'ry from dump.c to win_dump.c (introducing a win_dump_available() method there). By doing so we can build win_dump.c on any target, and simplify the meson rule. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230225094903.53167-5-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
"qemu/win_dump_defs.h" is only required by win_dump.c, but win_dump.h requires "sysemu/dump.h" which declares the DumpState type. Remove various unused headers. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230225094903.53167-4-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
TARGET_PAGE_SIZE is target specific. In preparation of making dump.c target-agnostic, replace the compile-time TARGET_PAGE_SIZE definition by runtime qemu_target_page_size(). Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230225094903.53167-3-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
All uses of tswap in that file are wrong, and should be using cpu_to_dumpN, which correctly tests the endianness of the output. Reported-by: NRichard Henderson <richard.henderson@linaro.org> Suggested-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230225094903.53167-2-philmd@linaro.org>
-
由 Bernhard Beschow 提交于
These legacy ISA IRQs allow the PIIX IDE functions to be wired up in their south bridges and the VIA IDE functions to disuse PCI_INTERRUPT_LINE as outlined in https://lists.nongnu.org/archive/html/qemu-devel/2020-03/msg01707.htmlSuggested-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230126211740.66874-7-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: NJohn Snow <jsnow@redhat.com> Message-Id: <20210511041848.2743312-5-f4bug@amsat.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-21-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-20-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-19-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Bernhard Beschow 提交于
The function is only used inside ide/pci.c, so doesn't need to be exported. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-18-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-17-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
ide_get_geometry() and ide_get_bios_chs_trans() are only used by the TYPE_PC_MACHINE. "hw/ide.h" is a mixed bag of lost IDE declarations. In order to remove this (almost) pointless header soon, move these declarations to "hw/ide/internal.h". Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Message-Id: <20230220091358.17038-18-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
idebus_active_if() operates on a IDEBus; rename it as ide_bus_active_if() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/idebus_active_if/ide_bus_active_if/g' \ $(git grep -l idebus_active_if) Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-16-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
ide_init2() initializes a IDEBus, and set its output IRQ. To emphasize this, rename it as ide_bus_init_output_irq(). Mechanical change using: $ sed -i -e 's/ide_init2/ide_bus_init_output_irq/g' \ $(git grep -l ide_init2) Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-15-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
ide_exec_cmd() operates on a IDEBus; rename it as ide_bus_exec_cmd() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_exec_cmd/ide_bus_exec_cmd/g' \ $(git grep -wl ide_exec_cmd) Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-14-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
ide_register_restart_cb() operates on a IDEBus; rename it as ide_bus_register_restart_cb() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_register_restart_cb/ide_bus_register_restart_cb/g' \ $(git grep -l ide_register_restart_cb) Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-13-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
ide_create_drive() operates on a IDEBus; rename it as ide_bus_create_drive() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_create_drive/ide_bus_create_drive/g' \ $(git grep -wl ide_create_drive) Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-12-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
ide_set_irq() operates on a IDEBus; rename it as ide_bus_set_irq() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_set_irq/ide_bus_set_irq/g' \ $(git grep -l ide_set_irq) Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-11-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Only include "hw/irq.h" where appropriate. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-10-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
The IDEBus structure has PortioList fields, so we need its declarations from "exec/ioport.h". "hw/isa/isa.h" is not required. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-9-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Missed in commit d7458e77 ("hw/ide/internal: Remove unused DMARestartFunc typedef") which removed the single use of RunState. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-8-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Only atapi.c requires the SCSI constants. No need to include it in all files including "hw/ide/internal.h". Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-7-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
The intermediate ISAIDEState::irq variable just add noise, remove it. Message-Id: <20230215112712.23110-6-philmd@linaro.org> Reviewed-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
"hw/ide.h" is a mixed bag of lost IDE declarations. Extract isa_ide_init() and the TYPE_ISA_IDE QOM declarations to a new "hw/ide/isa.h" header. Rename ISAIDEState::isairq as 'irqnum' to emphasize this is not a qemu_irq object but the number (index) of an ISA IRQ. Message-Id: <20230215112712.23110-5-philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NBernhard Beschow <shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
"hw/ide.h" is a mixed bag of lost IDE declarations. Extract mmio_ide_init_drives() and the TYPE_MMIO_IDE QOM declarations to a new "hw/ide/mmio.h" header. Document the SysBus interface. Message-Id: <20230215112712.23110-4-philmd@linaro.org> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Following docs/devel/style.rst guidelines, rename MMIOIDEState as IdeMmioState. Having the structure name and its typedef named equally, we can manually convert from the old DECLARE_INSTANCE_CHECKER() macro to the more recent OBJECT_DECLARE_SIMPLE_TYPE(). Note, due to that name mismatch, this macro wasn't automatically converted during commit 8063396b ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible"). Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Message-Id: <20230220091358.17038-3-philmd@linaro.org>
-
由 Fiona Ebner 提交于
Fixes: e4baa9f0 ("AHCI: Replace DPRINTF with trace-events") Signed-off-by: NFiona Ebner <f.ebner@proxmox.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Reviewed-by: NJohn Snow <jsnow@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NKevin Wolf <kwolf@redhat.com> Message-Id: <20230217103130.42077-1-f.ebner@proxmox.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Acked-by: NPaul Durrant <paul@xen.org> Message-Id: <20230220092707.22584-1-philmd@linaro.org>
-
由 John Snow 提交于
I have not been able to give these devices the love they need for a while now. Update the maintainers file to reflect the truth of the matter. Signed-off-by: NJohn Snow <jsnow@redhat.com> Message-Id: <20230206182544.711117-1-jsnow@redhat.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Since commit 262a69f4 ("osdep.h: Prohibit disabling assert() in supported builds") we can not build QEMU with NDEBUG (or G_DISABLE_ASSERT) defined, thus 'assert(0)' always aborts QEMU. However some static analyzers / compilers doesn't notice NDEBUG can't be defined and emit warnings if code is used after an 'assert(0)' call. Apparently such compiler isn't as clever with G_DISABLE_ASSERT, so we can silent these warnings by using g_assert_not_reached() which is easier to read anyway. In order to avoid these annoying warnings, add a checkpatch rule to prohibit 'assert(0)'. Suggest using g_assert_not_reached() instead. For example when reverting the previous patch we get: ERROR: use g_assert_not_reached() instead of assert(0) #21: FILE: target/ppc/dfp_helper.c:124: + assert(0); /* cannot get here */ ERROR: use g_assert_not_reached() instead of assert(0) #30: FILE: target/ppc/dfp_helper.c:141: + assert(0); /* cannot get here */ total: 2 errors, 0 warnings, 16 lines checked Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230221232520.14480-3-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Since commit 262a69f4 ("osdep.h: Prohibit disabling assert() in supported builds") 'NDEBUG' can not be defined, so '#ifndef NDEBUG' is dead code. Remove it. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230221232520.14480-5-philmd@linaro.org>
-