hw: Use device_class_set_legacy_reset() instead of opencodingUse device_class_set_legacy_reset() instead of opencoding anassignment to DeviceClass::reset. This change was producedwith: spatch --
hw: Use device_class_set_legacy_reset() instead of opencodingUse device_class_set_legacy_reset() instead of opencoding anassignment to DeviceClass::reset. This change was producedwith: spatch --macro-file scripts/cocci-macro-file.h \ --sp-file scripts/coccinelle/device-reset.cocci \ --keep-comments --smpl-spacing --in-place --dir hwSigned-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Richard Henderson <richard.henderson@linaro.org>Message-id: 20240830145812.1967042-8-peter.maydell@linaro.org
show more ...
tricore: switch boards to "default y"Some targets use "default y" for boards to filter out those that requireTCG. For consistency we are switching all other targets to do the same.Continue with
tricore: switch boards to "default y"Some targets use "default y" for boards to filter out those that requireTCG. For consistency we are switching all other targets to do the same.Continue with TriCore.No changes to generated config-devices.mak file.Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/tricore/testboard: Use qdev_new() instead of QOM basic APIPrefer QDev API for QDev objects, avoid the underlying QOM layer.Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>Reviewed-by
hw/tricore/testboard: Use qdev_new() instead of QOM basic APIPrefer QDev API for QDev objects, avoid the underlying QOM layer.Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>Message-Id: <20240216110313.17039-5-philmd@linaro.org>
hw/tricore: Log failing test in testdeviceSigned-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>Message-ID: <20230913105326.40832-3-kbastian@mail.uni-paderborn.de>
hw/tricore: fix inclusion of tricore_testboardBecause commit f4063f9c319e39 ("meson: Introduce target-specificKconfig") ended being merged after commit 582079c9d27fc8cfff9f49("hw/tricore: Add tes
hw/tricore: fix inclusion of tricore_testboardBecause commit f4063f9c319e39 ("meson: Introduce target-specificKconfig") ended being merged after commit 582079c9d27fc8cfff9f49("hw/tricore: Add testdevice for tests in tests/tcg/"), weinadvertently added a symbol clash causing the build not to includethe testboard needed for check-tcg.Fixes: f4063f9c31 ("meson: Introduce target-specific Kconfig")Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Richard Henderson <richard.henderson@linaro.org>Signed-off-by: Alex Bennée <alex.bennee@linaro.org>Message-Id: <20210720114057.32053-2-alex.bennee@linaro.org>[PMD: Updated description mentioning commits merged]Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
hw/tricore: Add testdevice for tests in tests/tcg/this device is used to verify the correctness of regression tests byallowing guests to write their exit status to this device. This is thenused b
hw/tricore: Add testdevice for tests in tests/tcg/this device is used to verify the correctness of regression tests byallowing guests to write their exit status to this device. This is thenused by qemu to exit using the written status.Reviewed-by: Alex Bennée <alex.bennee@linaro.org>Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>Signed-off-by: Alex Bennée <alex.bennee@linaro.org>Message-Id: <20210305170045.869437-4-kbastian@mail.uni-paderborn.de>Message-Id: <20210512102051.12134-14-alex.bennee@linaro.org>
Do not include exec/address-spaces.h if it's not really necessaryStop including exec/address-spaces.h in files that don't need it.Signed-off-by: Thomas Huth <thuth@redhat.com>Message-Id: <202104
Do not include exec/address-spaces.h if it's not really necessaryStop including exec/address-spaces.h in files that don't need it.Signed-off-by: Thomas Huth <thuth@redhat.com>Message-Id: <20210416171314.2074665-5-thuth@redhat.com>Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Do not include cpu.h if it's not really necessaryStop including cpu.h in files that don't need it.Signed-off-by: Thomas Huth <thuth@redhat.com>Message-Id: <20210416171314.2074665-4-thuth@redhat.
Do not include cpu.h if it's not really necessaryStop including cpu.h in files that don't need it.Signed-off-by: Thomas Huth <thuth@redhat.com>Message-Id: <20210416171314.2074665-4-thuth@redhat.com>Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Do not include hw/boards.h if it's not really necessaryStop including hw/boards.h in files that don't need it.Signed-off-by: Thomas Huth <thuth@redhat.com>Message-Id: <20210416171314.2074665-3-t
Do not include hw/boards.h if it's not really necessaryStop including hw/boards.h in files that don't need it.Signed-off-by: Thomas Huth <thuth@redhat.com>Message-Id: <20210416171314.2074665-3-thuth@redhat.com>Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw: Do not include qemu/log.h if it is not necessaryMany files include qemu/log.h without needing it. Remove the superfluousinclude statements.Signed-off-by: Thomas Huth <thuth@redhat.com>Revie
hw: Do not include qemu/log.h if it is not necessaryMany files include qemu/log.h without needing it. Remove the superfluousinclude statements.Signed-off-by: Thomas Huth <thuth@redhat.com>Reviewed-by: Alistair Francis <alistair.francis@wdc.com>Message-Id: <20210328054833.2351597-1-thuth@redhat.com>Signed-off-by: Laurent Vivier <laurent@vivier.eu>
tricore: added triboard with tc27x_socReviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>Signed-off-by: Andreas Konopik <andreas.konopik@efs-auto.de>Signed-off-by: David Brenken <dav
tricore: added triboard with tc27x_socReviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>Signed-off-by: Andreas Konopik <andreas.konopik@efs-auto.de>Signed-off-by: David Brenken <david.brenken@efs-auto.de>Signed-off-by: Georg Hofstetter <georg.hofstetter@efs-auto.de>Signed-off-by: Robert Rasche <robert.rasche@efs-auto.de>Signed-off-by: Lars Biermanski <lars.biermanski@efs-auto.de>Message-Id: <20201109165055.10508-2-david.brenken@efs-auto.org>Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
tricore tcg cpus: Fix Lesser GPL version numberThere is no "version 2" of the "Lesser" General Public License.It is either "GPL version 2.0" or "Lesser GPL version 2.1".This patch replaces all oc
tricore tcg cpus: Fix Lesser GPL version numberThere is no "version 2" of the "Lesser" General Public License.It is either "GPL version 2.0" or "Lesser GPL version 2.1".This patch replaces all occurrences of "Lesser GPL version 2" with"Lesser GPL version 2.1" in comment section.Signed-off-by: Chetan Pant <chetan4windows@gmail.com>Message-Id: <20201023122157.19321-1-chetan4windows@gmail.com>Reviewed-by: Thomas Huth <thuth@redhat.com>Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>Signed-off-by: Thomas Huth <thuth@redhat.com>
meson: convert hw/arch*Each architecture's sourceset is placed in an hw_arch dictionary, and picked upfrom there when building the per-emulator static_library.Signed-off-by: Marc-André Lureau <m
meson: convert hw/arch*Each architecture's sourceset is placed in an hw_arch dictionary, and picked upfrom there when building the per-emulator static_library.Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: Do not initialize MachineClass::is_default to 0The MachineClass is already zeroed on creation.Note: The code setting is_default=0 in hw/i386/pc_piix.c is different (related to compat op
hw: Do not initialize MachineClass::is_default to 0The MachineClass is already zeroed on creation.Note: The code setting is_default=0 in hw/i386/pc_piix.c is different (related to compat options). When adding a new versioned machine, we want it to be the new default, so we have to mark the previous one as not default.Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>Message-Id: <20200207161948.15972-2-philmd@redhat.com>Reviewed-by: Laurent Vivier <laurent@vivier.eu>Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/core/loader: Let load_elf() populate a field with CPU-specific flagsWhile loading the executable, some platforms (like AVR) need todetect CPU type that executable is built for - and, with this
hw/core/loader: Let load_elf() populate a field with CPU-specific flagsWhile loading the executable, some platforms (like AVR) need todetect CPU type that executable is built for - and, with this patch,this is enabled by reading the field 'e_flags' of the ELF header ofthe executable in question. The change expands functionality ofthe following functions: - load_elf() - load_elf_as() - load_elf_ram() - load_elf_ram_sym()The argument added to these functions is called 'pflags' and is oftype 'uint32_t*' (that matches 'pointer to 'elf_word'', 'elf_word'being the type of the field 'e_flags', in both 32-bit and 64-bitvariants of ELF header). Callers are allowed to pass NULL as thatargument, and in such case no lookup to the field 'e_flags' willhappen, and no information will be returned, of course.CC: Richard Henderson <rth@twiddle.net>CC: Peter Maydell <peter.maydell@linaro.org>CC: Edgar E. Iglesias <edgar.iglesias@gmail.com>CC: Michael Walle <michael@walle.cc>CC: Thomas Huth <huth@tuxfamily.org>CC: Laurent Vivier <laurent@vivier.eu>CC: Philippe Mathieu-Daudé <f4bug@amsat.org>CC: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>CC: Aurelien Jarno <aurelien@aurel32.net>CC: Jia Liu <proljc@gmail.com>CC: David Gibson <david@gibson.dropbear.id.au>CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>CC: BALATON Zoltan <balaton@eik.bme.hu>CC: Christian Borntraeger <borntraeger@de.ibm.com>CC: Thomas Huth <thuth@redhat.com>CC: Artyom Tarasenko <atar4qemu@gmail.com>CC: Fabien Chouteau <chouteau@adacore.com>CC: KONRAD Frederic <frederic.konrad@adacore.com>CC: Max Filippov <jcmvbkbc@gmail.com>Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>Signed-off-by: Michael Rolnik <mrolnik@gmail.com>Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>Message-Id: <1580079311-20447-24-git-send-email-aleksandar.markovic@rt-rk.com>
Clean up inclusion of sysemu/sysemu.hIn my "build everything" tree, changing sysemu/sysemu.h triggers arecompile of some 5400 out of 6600 objects (not counting tests andobjects that don't depend
Clean up inclusion of sysemu/sysemu.hIn my "build everything" tree, changing sysemu/sysemu.h triggers arecompile of some 5400 out of 6600 objects (not counting tests andobjects that don't depend on qemu/osdep.h).Almost a third of its inclusions are actually superfluous. Deletethem. Downgrade two more to qapi/qapi-types-run-state.h, and move onefrom char/serial.h to char/serial.c.hw/semihosting/config.c, monitor/monitor.c, qdev-monitor.c, andstubs/semihost.c define variables declared in sysemu/sysemu.h withoutincluding it. The compiler is cool with that, but include it anyway.This doesn't reduce actual use much, as it's still included intowidely included headers. The next commit will tackle that.Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Alistair Francis <alistair.francis@wdc.com>Message-Id: <20190812052359.30071-27-armbru@redhat.com>Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Include hw/hw.h exactly where neededIn my "build everything" tree, changing hw/hw.h triggers a recompileof some 2600 out of 6600 objects (not counting tests and objects thatdon't depend on qemu/o
Include hw/hw.h exactly where neededIn my "build everything" tree, changing hw/hw.h triggers a recompileof some 2600 out of 6600 objects (not counting tests and objects thatdon't depend on qemu/osdep.h).The previous commits have left only the declaration of hw_error() inhw/hw.h. This permits dropping most of its inclusions. Touching itnow recompiles less than 200 objects.Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Alistair Francis <alistair.francis@wdc.com>Message-Id: <20190812052359.30071-19-armbru@redhat.com>Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Include qemu-common.h exactly where neededNo header includes qemu-common.h after this commit, as prescribed byqemu-common.h's file comment.Signed-off-by: Markus Armbruster <armbru@redhat.com>Me
Include qemu-common.h exactly where neededNo header includes qemu-common.h after this commit, as prescribed byqemu-common.h's file comment.Signed-off-by: Markus Armbruster <armbru@redhat.com>Message-Id: <20190523143508.25387-5-armbru@redhat.com>[Rebased with conflicts resolved automatically, except forinclude/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.cblock/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.ctarget/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.htarget/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.htarget/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.htarget/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c andnet/tap-bsd.c fixed up]
cirrus.yml: Add macOS continuous integration taskcirrus-ci.com also has the possibility to run CI tasks on macOS.Since most of the QEMU developers do not have access to macOS yet,let's add a CI p
cirrus.yml: Add macOS continuous integration taskcirrus-ci.com also has the possibility to run CI tasks on macOS.Since most of the QEMU developers do not have access to macOS yet,let's add a CI pipeline for this operating system here, too.Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>Acked-by: Ed Maste <emaste@freebsd.org>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Thomas Huth <thuth@redhat.com>
kconfig: introduce kconfig filesThe Kconfig files were generated mostly with this script: for i in `grep -ho CONFIG_[A-Z0-9_]* default-configs/* | sort -u`; do set fnord `git grep -lw $i --
kconfig: introduce kconfig filesThe Kconfig files were generated mostly with this script: for i in `grep -ho CONFIG_[A-Z0-9_]* default-configs/* | sort -u`; do set fnord `git grep -lw $i -- 'hw/*/Makefile.objs' ` shift if test $# = 1; then cat >> $(dirname $1)/Kconfig << EOFconfig ${i#CONFIG_} boolEOF git add $(dirname $1)/Kconfig else echo $i $* fi done sed -i '$d' hw/*/Kconfig for i in hw/*; do if test -d $i && ! test -f $i/Kconfig; then touch $i/Kconfig git add $i/Kconfig fi doneWhenever a symbol is referenced from multiple subdirectories, thescript prints the list of directories that reference the symbol.These symbols have to be added manually to the Kconfig files.Kconfig.host and hw/Kconfig were created manually.Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Yang Zhong <yang.zhong@intel.com>Message-Id: <20190123065618.3520-27-yang.zhong@intel.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/tricore/Makefile.objs: Create CONFIG_* for tricoreAdd the new configs to default-configs/tricore-sofmmu.mak.Signed-off-by: Yang Zhong <yang.zhong@intel.com>Signed-off-by: Paolo Bonzini <pbonz
hw/tricore/Makefile.objs: Create CONFIG_* for tricoreAdd the new configs to default-configs/tricore-sofmmu.mak.Signed-off-by: Yang Zhong <yang.zhong@intel.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Thomas Huth <thuth@redhat.com>Message-Id: <20190202072456.6468-26-yang.zhong@intel.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
elf: Add optional function ptr to load_elf() to parse ELF notesThis patch adds an optional function pointer, 'elf_note_fn', toload_elf() which causes load_elf() to additionally parse anyELF progr
elf: Add optional function ptr to load_elf() to parse ELF notesThis patch adds an optional function pointer, 'elf_note_fn', toload_elf() which causes load_elf() to additionally parse anyELF program headers of type PT_NOTE and check to see if the ELFNote is of the type specified by the 'translate_opaque' arg.If a matching ELF Note is found then the specfied function pointeris called to process the ELF note.Passing a NULL function pointer results in ELF Notes being skipped.The first consumer of this functionality is the PVHboot supportwhich needs to read the XEN_ELFNOTE_PHYS32_ENTRY ELF Note whileloading the uncompressed kernel binary in order to discover theboot entry address for the x86/HVM direct boot ABI.Signed-off-by: Liam Merwick <liam.merwick@oracle.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/tricore: Use the IEC binary prefix definitionsIt eases code review, unit is explicit.Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/and mo
hw/tricore: Use the IEC binary prefix definitionsIt eases code review, unit is explicit.Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/and modified manually.Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>Message-Id: <20180625124238.25339-24-f4bug@amsat.org>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: Do not include "sysemu/block-backend.h" if it is not necessaryAfter reviewing a patch from Philippe that removes block-backend.hfrom hw/lm32/milkymist.c, I noticed that this header is included
hw: Do not include "sysemu/block-backend.h" if it is not necessaryAfter reviewing a patch from Philippe that removes block-backend.hfrom hw/lm32/milkymist.c, I noticed that this header is includedunnecessarily in a lot of other files, too. Remove those unneededincludes to speed up the compilation process a little bit.Signed-off-by: Thomas Huth <thuth@redhat.com>Message-Id: <1518684912-31637-1-git-send-email-thuth@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tricore: use generic cpu_model parsingSigned-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>Message-Id: <1507211474-188400-31-git-send-email-imamm
tricore: use generic cpu_model parsingSigned-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>Message-Id: <1507211474-188400-31-git-send-email-imammedo@redhat.com>Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
12