summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* target/arm: Reorg regime_translation_disabledRichard Henderson2022-10-101-7/+25
| | | | | | | | | | Use a switch on mmu_idx for the a-profile indexes, instead of three different if's vs regime_el and arm_mmu_idx_is_stage1_of_2. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221001162318.153420-12-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Fold secure and non-secure a-profile mmu indexesRichard Henderson2022-10-107-203/+85Star
| | | | | | | | | | | | | | | | | | For a-profile aarch64, which does not bank system registers, it takes quite a lot of code to switch between security states. In the process, registers such as TCR_EL{1,2} must be swapped, which in itself requires the flushing of softmmu tlbs. Therefore it doesn't buy us anything to separate tlbs by security state. Retain the distinction between Stage2 and Stage2_S. This will be important as we implement FEAT_RME, and do not wish to add a third set of mmu indexes for Realm state. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221001162318.153420-11-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Add is_secure parameter to do_ats_writeRichard Henderson2022-10-101-5/+14
| | | | | | | | | | Use get_phys_addr_with_secure directly. For a-profile, this is the one place where the value of is_secure may not equal arm_is_secure(env). Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221001162318.153420-10-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Merge regime_is_secure into get_phys_addrRichard Henderson2022-10-102-44/+42Star
| | | | | | | | | | This is the last use of regime_is_secure; remove it entirely before changing the layout of ARMMMUIdx. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221001162318.153420-9-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Add TBFLAG_M32.SECURERichard Henderson2022-10-103-2/+7
| | | | | | | | | | | | Remove the use of regime_is_secure from arm_tr_init_disas_context. Instead, provide the value of v8m_secure directly from tb_flags. Rather than use regime_is_secure, use the env->v7m.secure directly, as per arm_mmu_idx_el. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221001162318.153420-8-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Add is_secure parameter to v7m_read_half_insnRichard Henderson2022-10-101-5/+4Star
| | | | | | | | | | | | | | | | Remove the use of regime_is_secure from v7m_read_half_insn, using the new parameter instead. As it happens, both callers pass true, propagated from the argument to arm_v7m_mmu_idx_for_secstate which created the mmu_idx argument, but that is a detail of v7m_handle_execute_nsc we need not expose to the callee. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221001162318.153420-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Split out get_phys_addr_with_secureRichard Henderson2022-10-102-29/+55
| | | | | | | | | | | Retain the existing get_phys_addr interface using the security state derived from mmu_idx. Move the kerneldoc comments to the header file where they belong. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221001162318.153420-6-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Add is_secure parameter to regime_translation_disabledRichard Henderson2022-10-101-9/+11
| | | | | | | | | | | | | | | Remove the use of regime_is_secure from regime_translation_disabled, using the new parameter instead. This fixes a bug in S1_ptw_translate and get_phys_addr where we had passed ARMMMUIdx_Stage2 and not ARMMMUIdx_Stage2_S to determine if Stage2 is disabled, affecting FEAT_SEL2. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221001162318.153420-5-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Fix S2 disabled check in S1_ptw_translateRichard Henderson2022-10-101-3/+3
| | | | | | | | | | Pass the correct stage2 mmu_idx to regime_translation_disabled, which we computed afterward. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20221001162318.153420-4-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Add is_secure parameter to get_phys_addr_lpaeRichard Henderson2022-10-101-10/+10
| | | | | | | | | | Remove the use of regime_is_secure from get_phys_addr_lpae, using the new parameter instead. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221001162318.153420-3-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Make the final stage1+2 write to secure be unconditionalRichard Henderson2022-10-101-11/+10Star
| | | | | | | | | | | | | While the stage2 call to get_phys_addr_lpae should never set attrs.secure when given a non-secure input, it's just as easy to make the final update to attrs.secure be unconditional and false in the case of non-secure input. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221007152159.1414065-1-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: Split s2walk_secure from ipa_secure in get_phys_addrRichard Henderson2022-10-101-9/+9
| | | | | | | | | | | | | | The starting security state comes with the translation regime, not the current state of arm_is_secure_below_el3(). Create a new local variable, s2walk_secure, which does not need to be written back to result->attrs.secure -- we compute that value later, after the S2 walk is complete. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20221001162318.153420-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* docs/nuvoton: Update URL for imagesJoel Stanley2022-10-101-2/+2
| | | | | | | | | | | | openpower.xyz was retired some time ago. The OpenBMC Jenkins is where images can be found these days. Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Hao Wu <wuhaotsh@google.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20221004050042.22681-1-joel@jms.id.au Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm: allow setting SCR_EL3.EnTP2 when FEAT_SME is implementedJerome Forissier2022-10-102-28/+31
| | | | | | | | | | | | | | | | | | Updates write_scr() to allow setting SCR_EL3.EnTP2 when FEAT_SME is implemented. SCR_EL3 being a 64-bit register, valid_mask is changed to uint64_t and the SCR_* constants in target/arm/cpu.h are extended to 64-bit so that masking and bitwise not (~) behave as expected. This enables booting Linux with Trusted Firmware-A at EL3 with "-M virt,secure=on -cpu max". Cc: qemu-stable@nongnu.org Fixes: 78cb9776662a ("target/arm: Enable SME for -cpu max") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221004072354.27037-1-jerome.forissier@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target/arm/kvm: Retry KVM_CREATE_VM call if it fails EINTRPeter Maydell2022-10-101-1/+3
| | | | | | | | | | | | | | | | | | | Occasionally the KVM_CREATE_VM ioctl can return EINTR, even though there is no pending signal to be taken. In commit 94ccff13382055 we added a retry-on-EINTR loop to the KVM_CREATE_VM call in the generic KVM code. Adopt the same approach for the use of the ioctl in the Arm-specific KVM code (where we use it to create a scratch VM for probing for various things). For more information, see the mailing list thread: https://lore.kernel.org/qemu-devel/8735e0s1zw.wl-maz@kernel.org/ Reported-by: Vitaly Chikunov <vt@altlinux.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Vitaly Chikunov <vt@altlinux.org> Reviewed-by: Eric Auger <eric.auger@redhat.com> Acked-by: Marc Zyngier <maz@kernel.org> Message-id: 20220930113824.1933293-1-peter.maydell@linaro.org
* Merge tag 'pull-testing-gdbstub-plugins-gitdm-061022-3' of ↵Stefan Hajnoczi2022-10-0698-624/+1138
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/stsquad/qemu into staging testing, gdbstub, plugin and gitdm updates - cleanup scripts/ci/setup in advance of ppc64 runner - ensure detected gdb reported to TCG tests - update hexagon container with build deps - move alpine container to tagged release - fix overflow during qos-test test tree iteration - allow bios blobs to be built with test cross compilers - introduce monitor_puts for plain strings - share disas code between monitor and plugins - fix bug in execlog plugin - add more tcg plugin documentation, reorg - fix link to semihosting spec - re-factor gdbstub to use AccelClass/Ops - many gitdm updates - fix race with plugin mutex lock and linux-user fork() # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmM+s+YACgkQ+9DbCVqe # KkSDwgf/Qj0OScOr5Bfw3/KAV0/SFL1vHISb2r5qZVG4DvdY/c/sitPBHPJ8N5jQ # 918M8AiI3+4Mb/GwkdYBEyWgVZ5ELOkJTObypa5pwmF1K/xDUlG7ZRmJ9+xkJ44Q # TmrVLQyw6d907B2u+DfqX68AYYnto1yQT/eUo6TiLdIJ5NXIYRn5u34snG9qWHja # b/Dp7DxnoJMS1EhlMhukekCHGGNUeYn4ewIKbsG1EouH5PndzrvP8LRAcWyxv0m4 # tD2bEAHCMKqTqefkNgG7GCO3HND1JBfWdckx3OD4hBnMnuNtsZBL23QN7MDytgnv # 0JnYSwkWZCuMIt7oKCOXLUbCjQG97Q== # =1vZ4 # -----END PGP SIGNATURE----- # gpg: Signature made Thu 06 Oct 2022 06:54:30 EDT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.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: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * tag 'pull-testing-gdbstub-plugins-gitdm-061022-3' of https://github.com/stsquad/qemu: (52 commits) plugins: add [pre|post]fork helpers to linux-user contrib/gitdm: add Université Grenoble Alpes contrib/gitdm: add Simon to individual contributors contrib/gitdm: add China Telecom to the domain map contrib/gitdm: add ISCAS to the academics group contrib/gitdm: add WANG Xuerui to individual contributers contrib/gitdm: add Paul to individual contributors contrib/gitdm: add mapping for Loongson Technology accel/kvm: move kvm_update_guest_debug to inline stub gdbstub: move guest debug support check to ops gdbstub: move breakpoint logic to accel ops gdbstub: move sstep flags probing into AccelClass gdbstub: move into its own sub directory semihosting: update link to spec docs/devel: document the test plugins contrib/plugins: reset skip when matching in execlog docs/devel: move API to end of tcg-plugins.rst docs/devel: clean-up qemu invocations in tcg-plugins plugins: Assert mmu_idx in range before use in qemu_plugin_get_hwaddr plugins: extend execlog to filter matches ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * plugins: add [pre|post]fork helpers to linux-userAlex Bennée2022-10-063-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | Special care needs to be taken in ensuring locks are in a consistent state across fork events. Add helpers so the plugin system can ensure that. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/358 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20221004115221.2174499-1-alex.bennee@linaro.org>
| * contrib/gitdm: add Université Grenoble AlpesAlex Bennée2022-10-061-0/+3
| | | | | | | | | | | | | | | | | | again to the academic group map. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Frédéric Pétrot <frederic.petrot@univ-grenoble-alpes.fr> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220926134609.3301945-7-alex.bennee@linaro.org>
| * contrib/gitdm: add Simon to individual contributorsAlex Bennée2022-10-061-0/+1
| | | | | | | | | | | | | | | | Please confirm this is the correct mapping for you. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Simon Safar <simon@simonsafar.com> Message-Id: <20220926134609.3301945-2-alex.bennee@linaro.org>
| * contrib/gitdm: add China Telecom to the domain mapAlex Bennée2022-10-061-0/+1
| | | | | | | | | | | | Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> Message-Id: <20220929114231.583801-52-alex.bennee@linaro.org>
| * contrib/gitdm: add ISCAS to the academics groupAlex Bennée2022-10-061-0/+3
| | | | | | | | | | | | | | | | | | The English website (http://english.is.cas.cn/) in on a slightly different domain but has the same logo as http://www.iscas.ac.cn/. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Message-Id: <20220929114231.583801-51-alex.bennee@linaro.org>
| * contrib/gitdm: add WANG Xuerui to individual contributersAlex Bennée2022-10-061-0/+1
| | | | | | | | | | | | | | | | His blog confirms he is not affiliated with Loongson. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: WANG Xuerui <git@xen0n.name> Message-Id: <20220929114231.583801-50-alex.bennee@linaro.org>
| * contrib/gitdm: add Paul to individual contributorsAlex Bennée2022-10-062-0/+2
| | | | | | | | | | | | | | | | Also map his old codesourcery address to his canonical address. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Paul Brook <paul@nowt.org> Message-Id: <20220929114231.583801-49-alex.bennee@linaro.org>
| * contrib/gitdm: add mapping for Loongson TechnologyAlex Bennée2022-10-061-0/+1
| | | | | | | | | | | | | | | | Please confirm you are happy with this mapping. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Song Gao <gaosong@loongson.cn> Message-Id: <20220929114231.583801-48-alex.bennee@linaro.org>
| * accel/kvm: move kvm_update_guest_debug to inline stubAlex Bennée2022-10-063-11/+16
| | | | | | | | | | Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-47-alex.bennee@linaro.org>
| * gdbstub: move guest debug support check to opsAlex Bennée2022-10-0610-10/+33
| | | | | | | | | | | | | | | | | | | | This removes the final hard coding of kvm_enabled() in gdbstub and moves the check to an AccelOps. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Mads Ynddal <mads@ynddal.dk> Message-Id: <20220929114231.583801-46-alex.bennee@linaro.org>
| * gdbstub: move breakpoint logic to accel opsAlex Bennée2022-10-0614-160/+259
| | | | | | | | | | | | | | | | | | | | | | | | As HW virtualization requires specific support to handle breakpoints lets push out special casing out of the core gdbstub code and into AccelOpsClass. This will make it easier to add other accelerator support and reduces some of the stub shenanigans. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Mads Ynddal <mads@ynddal.dk> Message-Id: <20220929114231.583801-45-alex.bennee@linaro.org>
| * gdbstub: move sstep flags probing into AccelClassAlex Bennée2022-10-066-27/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | The support of single-stepping is very much dependent on support from the accelerator we are using. To avoid special casing in gdbstub move the probing out to an AccelClass function so future accelerators can put their code there. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Mads Ynddal <mads@ynddal.dk> Message-Id: <20220929114231.583801-44-alex.bennee@linaro.org>
| * gdbstub: move into its own sub directoryAlex Bennée2022-10-067-31/+36
| | | | | | | | | | | | | | | | | | | | This is in preparation of future refactoring as well as cleaning up the source tree. Aside from the minor tweaks to meson and trace.h this is pure code motion. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-43-alex.bennee@linaro.org>
| * semihosting: update link to specAlex Bennée2022-10-061-1/+1
| | | | | | | | | | | | | | | | | | The old link has moved but it seems the document is now hosted on Arm's github along with a license update to CC-BY-SA-4.0. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220929114231.583801-42-alex.bennee@linaro.org>
| * docs/devel: document the test pluginsAlex Bennée2022-10-061-4/+133
| | | | | | | | | | | | | | | | Although the test plugins are fairly basic they are still useful for some things so we should document their existence. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-41-alex.bennee@linaro.org>
| * contrib/plugins: reset skip when matching in execlogAlex Bennée2022-10-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of the matches was to only track the execution of instructions we care about. Without resetting skip to the value at the start of the block we end up dumping all instructions after the match with the consequent load on the instrumentation. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Alexandre Iooss <erdnaxe@crans.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220929114231.583801-40-alex.bennee@linaro.org>
| * docs/devel: move API to end of tcg-plugins.rstAlex Bennée2022-10-061-5/+10
| | | | | | | | | | | | | | | | | | | | The API documentation is quite dry and doesn't flow nicely with the rest of the document. Move it to its own section at the bottom along with a little leader text to remind people to update it. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220929114231.583801-39-alex.bennee@linaro.org>
| * docs/devel: clean-up qemu invocations in tcg-pluginsAlex Bennée2022-10-061-9/+9
| | | | | | | | | | | | | | | | | | | | We currently have the final binaries in the root of the build dir so the build prefix is superfluous. Additionally add a shell prompt to be more in line with the rest of the code. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220929114231.583801-38-alex.bennee@linaro.org>
| * plugins: Assert mmu_idx in range before use in qemu_plugin_get_hwaddrRichard Henderson2022-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Coverity reports out-of-bound accesses here. This should be a false positive due to how the index is decoded from MemOpIdx. Fixes: Coverity CID 1487201 Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Damien Hedde <damien.hedde@greensocs.com> Message-Id: <20220401190233.329360-1-richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220929114231.583801-37-alex.bennee@linaro.org>
| * plugins: extend execlog to filter matchesAlex Bennée2022-10-062-15/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the whole execlog is just two much so add the ability to filter by instruction opcode or address. [AJB: this shows for example qemu-system-aarch64 -display none -serial mon:stdio \ -M virt -cpu max \ -semihosting-config enable=on \ -kernel ./tests/tcg/aarch64-softmmu/memory-sve \ -plugin ./contrib/plugins/libexeclog.so,ifilter=st1w,afilter=0x40001808 -d plugin -D plugin.out the st1w SVE instruction is not instrumenting its stores.] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Alexandre Iooss <erdnaxe@crans.org> Cc: Robert Henry <robhenry@microsoft.com> Cc: Aaron Lindsay <aaron@os.amperecomputing.com> Message-Id: <20220929114231.583801-36-alex.bennee@linaro.org>
| * disas: use result of ->read_memory_funcAlex Bennée2022-10-062-40/+53
| | | | | | | | | | | | | | | | | | | | | | | | This gets especially confusing if you start plugging in host addresses from a trace and you wonder why the output keeps changing. Report when read_memory_func fails instead of blindly disassembling the buffer contents. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220929114231.583801-35-alex.bennee@linaro.org>
| * disas: generalise plugin_printf and use for monitor_disasAlex Bennée2022-10-061-8/+15
| | | | | | | | | | | | | | | | | | | | Rather than assembling our output piecemeal lets use the same approach as the plugin disas interface to build the disassembly string before printing it. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220929114231.583801-34-alex.bennee@linaro.org>
| * monitor: expose monitor_puts to rest of codeAlex Bennée2022-10-068-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps us construct strings elsewhere before echoing to the monitor. It avoids having to jump through hoops like: monitor_printf(mon, "%s", s->str); It will be useful in following patches but for now convert all existing plain "%s" printfs to use the _puts api. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220929114231.583801-33-alex.bennee@linaro.org>
| * pc-bios/vof: Adopt meson style Make outputPaolo Bonzini2022-10-061-4/+11
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-32-alex.bennee@linaro.org>
| * pc-bios/s390-ccw: Adopt meson style Make outputPaolo Bonzini2022-10-062-16/+16
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-31-alex.bennee@linaro.org>
| * pc-bios/optionrom: Adopt meson style Make outputPaolo Bonzini2022-10-061-7/+7
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-30-alex.bennee@linaro.org>
| * configure: build ROMs with container-based cross compilersPaolo Bonzini2022-10-061-12/+18
| | | | | | | | | | | | | | | | | | | | s390-ccw remains a bit more complex, because the -march=z900 test is done only for the native cross compiler. Otherwise, all that is needed is to pass the (now mandatory) target argument to write_target_makefile. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-29-alex.bennee@linaro.org>
| * configure: cleanup creation of tests/tcg target configPaolo Bonzini2022-10-063-9/+7Star
| | | | | | | | | | | | | | | | | | Remove the symlink to tests/tcg/config-*.mak, which is possible now that unused target config files are not created either. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-28-alex.bennee@linaro.org>
| * configure: unify creation of cross-compilation MakefilesPaolo Bonzini2022-10-061-51/+43Star
| | | | | | | | | | | | | | | | Let write_target_makefile handle both host and container cross compilers. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-27-alex.bennee@linaro.org>
| * configure: move tests/tcg/Makefile.prereqs to root build directoryPaolo Bonzini2022-10-063-12/+11Star
| | | | | | | | | | | | | | | | | | It will not be specific to tests/tcg anymore, since it will be possible to build firmware using container-based cross compilers too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-26-alex.bennee@linaro.org>
| * tests/tcg: move compiler tests to MakefilesPaolo Bonzini2022-10-066-64/+38Star
| | | | | | | | | | | | | | | | | | | | Further decoupling of tests/tcg from the main QEMU Makefile, and making the build more similar between the cross compiler case and the vetted container images. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-25-alex.bennee@linaro.org>
| * tests/tcg: clean up calls to run-testPaolo Bonzini2022-10-0611-43/+34Star
| | | | | | | | | | | | | | | | | | | | | | | | Almost all invocations of run-test have either "$* on $(TARGET_NAME)" or "$< on $(TARGET_NAME)" as the last argument. So provide a default test name, while allowing an escape hatch for custom names. As an additional simplification, remove the need to do shell quoting. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-24-alex.bennee@linaro.org>
| * tests/tcg: unify ppc64 and ppc64le MakefilesPaolo Bonzini2022-10-069-26/+1Star
| | | | | | | | | | | | | | | | | | | | | | Make tests/tcg/ppc64le include tests/tcg/ppc64 instead of duplicating the rules. Because the ppc64le vpath includes tests/tcg/ppc64 but not vice versa, the tests have to be moved from tests/tcg/ppc64le/ to tests/tcg/ppc64. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-23-alex.bennee@linaro.org>
| * tests/tcg: add distclean rulePaolo Bonzini2022-10-062-0/+14
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-22-alex.bennee@linaro.org>