aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-06-08target/i386: use local X86DecodedOp in gen_POP()Mark Cave-Ayland1-2/+4
This will make subsequent changes a little easier to read. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-ID: <20240606095319.229650-2-mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: document use of DISAS_NORETURNPaolo Bonzini1-0/+11
DISAS_NORETURN suppresses the work normally done by gen_eob(), and therefore must be used in special cases only. Document them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: document incorrect semantics of watchpoint following MOV/POP SSPaolo Bonzini1-0/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: fix TF/RF handling for HLTPaolo Bonzini2-4/+15
HLT uses DISAS_NORETURN because the corresponding helper calls cpu_loop_exit(). However, while gen_eob() clears HF_RF_MASK and synthesizes a #DB exception if single-step is active, none of this is done by HLT. Note that the single-step trap is generated after the halt is finished. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: fix INHIBIT_IRQ/TF/RF handling for PAUSEPaolo Bonzini1-0/+4
PAUSE uses DISAS_NORETURN because the corresponding helper calls cpu_loop_exit(). However, while HLT clear HF_INHIBIT_IRQ_MASK to correctly handle "STI; HLT", the same is missing from PAUSE. And also gen_eob() clears HF_RF_MASK and synthesizes a #DB exception if single-step is active; none of this is done by HLT and PAUSE. Start fixing PAUSE, HLT will follow. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: fix INHIBIT_IRQ/TF/RF handling for VMRUNPaolo Bonzini2-13/+38
From vm entry to exit, VMRUN is handled as a single instruction. It uses DISAS_NORETURN in order to avoid processing TF or RF before the first instruction executes in the guest. However, the corresponding handling is missing in vmexit. Add it, and at the same time reorganize the comments with quotes from the manual about the tasks performed by a #VMEXIT. Another gen_eob() task that is missing in VMRUN is preparing the HF_INHIBIT_IRQ flag for the next instruction, in this case by loading it from the VMCB control state. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: disable/enable breakpoints on vmentry/vmexitPaolo Bonzini1-10/+15
If the required DR7 (either from the VMCB or from the host save area) disables a breakpoint that was enabled prior to vmentry or vmexit, it is left enabled and will trigger EXCP_DEBUG. This causes a spurious #DB on the next crossing of the breakpoint. To disable it, vmentry/vmexit must use cpu_x86_update_dr7 to load DR7. Because cpu_x86_update_dr7 takes a 32-bit argument, check reserved bits prior to calling cpu_x86_update_dr7, and do the same for DR6 as well for consistency. This scenario is tested by the "host_rflags" test in kvm-unit-tests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: implement DR7.GDPaolo Bonzini1-0/+12
DR7.GD triggers a #DB exception on any access to debug registers. The GD bit is cleared so that the #DB handler itself can access the debug registers. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: cleanup PAUSE helpersPaolo Bonzini6-25/+25
Use decode.c's support for intercepts, doing the check in TCG-generated code rather than the helper. This is cleaner because it allows removing the eip_addend argument to helper_pause(), even though it adds a bit of bloat for opcode 0x90's new decoding function. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: cleanup HLT helpersPaolo Bonzini4-16/+7
Use decode.c's support for intercepts, doing the check in TCG-generated code rather than the helper. This is cleaner because it allows removing the eip_addend argument to helper_hlt(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: fix implementation of ICEBPPaolo Bonzini5-2/+49
ICEBP generates a trap-like exception, while gen_exception() produces a fault. Resurrect gen_update_eip_next() to implement the desired semantics. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08target/i386: fix pushed value of EFLAGS.RFPaolo Bonzini2-5/+52
When preparing an exception stack frame for a fault exception, the value pushed for RF is 1. Take that into account. The same should be true of interrupts for repeated string instructions, but the situation there is complicated. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-06Merge tag 'pull-loongarch-20240606' of https://gitlab.com/gaosong/qemu into ↵Richard Henderson10-39/+428
staging pull-loongarch-20240606 # -----BEGIN PGP SIGNATURE----- # # iLMEAAEKAB0WIQS4/x2g0v3LLaCcbCxAov/yOSY+3wUCZmE0HwAKCRBAov/yOSY+ # 396sA/90m/zr91pLQlkhFuYLHg958Ow3L5ysblcuAAmcTXGi8iE9IeTTeZru6WEO # H/CL/njUkIgP+/Tio0n0Lx6rWkxOzGxWCpvzqrabsPGvs4GUtFEjI/2pvEWP6C9/ # S6Jon3py0oZeoVx8D6Tr/CJrhD0IBptbEn1aiQNDRuSzeuCo1Q== # =xpjH # -----END PGP SIGNATURE----- # gpg: Signature made Wed 05 Jun 2024 08:59:27 PM PDT # gpg: using RSA key B8FF1DA0D2FDCB2DA09C6C2C40A2FFF239263EDF # gpg: Good signature from "Song Gao <m17746591750@163.com>" [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: B8FF 1DA0 D2FD CB2D A09C 6C2C 40A2 FFF2 3926 3EDF * tag 'pull-loongarch-20240606' of https://gitlab.com/gaosong/qemu: target/loongarch: fix a wrong print in cpu dump hw/loongarch/virt: Enable extioi virt extension hw/loongarch/virt: Use MemTxAttrs interface for misc ops hw/intc/loongarch_extioi: Add extioi virt extension definition tests/qtest: Add numa test for loongarch system tests/libqos: Add loongarch virt machine node Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-06-06Merge tag 'pull-maintainer-june24-060624-1' of ↵Richard Henderson29-762/+496
https://gitlab.com/stsquad/qemu into staging testing cleanups (ci, vm, lcitool, ansible): - clean up left over Centos 8 references - use -fno-sanitize=function to avoid non-useful errors - bump lcitool and update images (alpine, fedora) - make sure we have mingw-w64-tools for windows builds - drive ansible scripts with lcitool package lists # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmZhgb4ACgkQ+9DbCVqe # KkQNMAf/eyGgbU6ASgbwGqiJCOrkWo8CM7G1dXZ5GpVvKVnlDioMaefFCWt3ftB6 # kKtiskC1xVx3vM1mmomosSGxTNxT93HMLulKJLXK8/SvOFU9phzzUeZXTqS7JKNb # NrawL0vkygRn+mmTgr3M+Z7rh4yI9e7e2yeX+oQiXsSGGNM114EdcUqKG82tpO8G # cDlNtlp2jgptNnmzQ7ufZIRD5ckg+2os6XFB+bhmfaWCu9PXTTNwBfLJkEnXENi3 # NpRHPRGsUwZ3QcGt0JLkxTT/yeHngYBP7us2cwMXuf9lxfFCF3Ixt1jF/9ZJRrRm # wUYG6TBKh6S24cJSBiu1zguQ/EE7WA== # =myWO # -----END PGP SIGNATURE----- # gpg: Signature made Thu 06 Jun 2024 02:30:38 AM PDT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] * tag 'pull-maintainer-june24-060624-1' of https://gitlab.com/stsquad/qemu: scripts/ci: drive ubuntu/build-environment.yml from lcitool tests/lcitool: generate package lists for ansible tests/lcitool: Install mingw-w64-tools for the Windows cross-builds tests/lcitool: Bump to latest libvirt-ci and update Fedora and Alpine version .gitlab-ci.d/buildtest.yml: Use -fno-sanitize=function in the clang-system job tests/lcitool: Delete obsolete centos-stream-8.yml file docs/ci: clean-up references for consistency scripts/ci: remove CentOS bits from common build-environment tests/vm: remove plain centos image tests/vm: update centos.aarch64 image to 9 docs/devel: update references to centos to non-versioned container ci: remove centos-steam-8 customer runner Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-06-06scripts/ci: drive ubuntu/build-environment.yml from lcitoolAlex Bennée1-124/+7
Now lcitool can write the package list for us we no longer need to duplicate the information directly in build-environment. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-13-alex.bennee@linaro.org>
2024-06-06tests/lcitool: generate package lists for ansibleAlex Bennée4-1/+394
With the new ability to output YAML we can build the package list for our ansible setup scripts. We will integrate them in the next commit. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-12-alex.bennee@linaro.org>
2024-06-06tests/lcitool: Install mingw-w64-tools for the Windows cross-buildsThomas Huth2-0/+2
Beside g++ we also need the mingw-w64-tools for properly building the code in qga/vss-win32/ , so let's install that package now, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20240601070543.37786-5-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-11-alex.bennee@linaro.org>
2024-06-06tests/lcitool: Bump to latest libvirt-ci and update Fedora and Alpine versionThomas Huth6-9/+12
Update to the latest version of lcitool. It dropped support for Fedora 38 and Alpine 3.18, so we have to update these to newer versions here, too. Python 3.12 dropped the "imp" module which we still need for running Avocado. Fortunately Fedora 40 still ships with a work-around package that we can use until somebody updates our Avocado to a newer version. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240601070543.37786-3-thuth@redhat.com> [AJB: regen on rebase] Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-10-alex.bennee@linaro.org>
2024-06-06.gitlab-ci.d/buildtest.yml: Use -fno-sanitize=function in the clang-system jobThomas Huth1-0/+1
The latest version of Clang (version 18 from Fedora 40) now reports bad function pointer casts as undefined behavior. Unfortunately, we are still doing this in quite a lot of places in the QEMU code and some of them are not easy to fix. So for the time being, temporarily switch this off in the failing clang-system job until all spots in the QEMU sources have been tackled. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20240601070543.37786-4-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-9-alex.bennee@linaro.org>
2024-06-06tests/lcitool: Delete obsolete centos-stream-8.yml fileThomas Huth1-3/+0
We've missed to delete this file when removing support for CentOS 8. Since the current upstream version of the lcitool removed support for CentOS 8 now, too, we have to remove the file before updating. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20240601070543.37786-2-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-8-alex.bennee@linaro.org>
2024-06-06docs/ci: clean-up references for consistencyAlex Bennée5-10/+9
Document we have split up build-environment by distro and update the references that exist in the code base to be correct. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-7-alex.bennee@linaro.org>
2024-06-06scripts/ci: remove CentOS bits from common build-environmentAlex Bennée1-98/+0
Although I've just removed the CentOS specific build-environment its probably a bit too confusing to have multiple distros mixed up in one place. Prior to moving clean-up what will be just for ubuntu. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-6-alex.bennee@linaro.org>
2024-06-06tests/vm: remove plain centos imageAlex Bennée2-52/+0
This isn't really used and we have lighter weight docker containers for testing this stuff directly. Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-5-alex.bennee@linaro.org>
2024-06-06tests/vm: update centos.aarch64 image to 9Alex Bennée1-5/+5
As Centos Stream 8 goes out of support we need to update. To do this powertools is replaced by crb and we don't over specify the python3 we want. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-4-alex.bennee@linaro.org>
2024-06-06docs/devel: update references to centos to non-versioned containerAlex Bennée1-4/+4
>From the website: "After May 31, 2024, CentOS Stream 8 will be archived and no further updates will be provided." We have updated a few bits but there are still references that need fixing. Rather than bump I've replaced them with references to the Debian image so we don't have to bump at the next update. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-3-alex.bennee@linaro.org>
2024-06-06ci: remove centos-steam-8 customer runnerAlex Bennée7-394/+0
This broke since eef0bae3a7 (migration: Remove block migration) but even after that was addressed it still fails to complete. As it will shortly be EOL lets to remove the runner definition and the related ansible setup bits. We still have centos9 docker images build and test. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-2-alex.bennee@linaro.org>
2024-06-06target/loongarch: fix a wrong print in cpu dumplanyanzhi1-1/+1
description: loongarch_cpu_dump_state() want to dump all loongarch cpu state registers, but there is a tiny typographical error when printing "PRCFG2". Cc: qemu-stable@nongnu.org Signed-off-by: lanyanzhi <lanyanzhi22b@ict.ac.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240604073831.666690-1-lanyanzhi22b@ict.ac.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
2024-06-06hw/loongarch/virt: Enable extioi virt extensionSong Gao3-3/+87
This patch adds a new board attribute 'v-eiointc'. A value of true enables the virt extended I/O interrupt controller. VMs working in kvm mode have 'v-eiointc' enabled by default. Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn> Message-Id: <20240528083855.1912757-4-gaosong@loongson.cn>
2024-06-06hw/loongarch/virt: Use MemTxAttrs interface for misc opsSong Gao1-12/+24
Use MemTxAttrs interface read_with_attrs/write_with_attrs for virt_iocsr_misc_ops. Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn> Message-Id: <20240528083855.1912757-3-gaosong@loongson.cn>
2024-06-06hw/intc/loongarch_extioi: Add extioi virt extension definitionSong Gao3-23/+146
On LoongArch, IRQs can be routed to four vcpus with hardware extended IRQ model. This patch adds the virt extension definition so that the IRQ can route to 256 vcpus. 1.Extended IRQ model: | +-----------+ +-------------|--------+ +-----------+ | IPI/Timer | --> | CPUINTC(0-3)|(4-255) | <-- | IPI/Timer | +-----------+ +-------------|--------+ +-----------+ ^ | | +---------+ | EIOINTC | +---------+ ^ ^ | | +---------+ +---------+ | PCH-PIC | | PCH-MSI | +---------+ +---------+ ^ ^ ^ | | | +--------+ +---------+ +---------+ | UARTs | | Devices | | Devices | +--------+ +---------+ +---------+ 2.Virt extended IRQ model: +-----+ +---------------+ +-------+ | IPI |--> | CPUINTC(0-255)| <-- | Timer | +-----+ +---------------+ +-------+ ^ | +-----------+ | V-EIOINTC | +-----------+ ^ ^ | | +---------+ +---------+ | PCH-PIC | | PCH-MSI | +---------+ +---------+ ^ ^ ^ | | | +--------+ +---------+ +---------+ | UARTs | | Devices | | Devices | +--------+ +---------+ +---------+ Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn> Message-Id: <20240528083855.1912757-2-gaosong@loongson.cn>
2024-06-06tests/qtest: Add numa test for loongarch systemBibo Mao2-1/+54
Add numa test case for loongarch system, it passes to run with command "make check-qtest". Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Thomas Huth <thuth@redhat.com> Tested-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240528082155.938586-1-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
2024-06-06tests/libqos: Add loongarch virt machine nodeBibo Mao3-0/+117
Add loongarch virt machine to the graph. It is a modified copy of the existing riscv virtmachine in riscv-virt-machine.c It contains a generic-pcihost controller, and an extra function loongarch_config_qpci_bus() to configure GPEX pci host controller information, such as ecam and pio_base addresses. Also hotplug handle checking about TYPE_VIRTIO_IOMMU_PCI device is added on loongarch virt machine, since virtio_mmu_pci device requires it. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240528082053.938564-1-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
2024-06-05Merge tag 'pull-misc-20240605' of https://gitlab.com/rth7680/qemu into stagingRichard Henderson10-517/+418
util/hexdump: Use a GString for qemu_hexdump_line. system/qtest: Replace sprintf by qemu_hexdump_line hw/scsi/scsi-disk: Use qemu_hexdump_line to avoid sprintf hw/ide/atapi: Use qemu_hexdump_line to avoid sprintf hw/dma/pl330: Use qemu_hexdump_line to avoid sprintf disas/microblaze: Reorg to avoid intermediate sprintf disas/riscv: Use GString in format_inst # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmZg1RMdHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+6mgf6AjEdU91vBXAUxabs # kmVl5HaAD3NHU1VCM+ruPQkm6xv4kLlMsTibmkiS7+WZYvHfPlGfozjRJxtvZj8K # 8J2Qp9iHjny8NQPkMCValDvmzkxaIT7ZzYCBdS4jfTdIThuYNJnXsI3NNP7ghnl6 # xv8O62dQbc5gjWF8G+q6PKWSxY6BEuFJ3Pt82cJ/Fj/8bhsjd48pgiLv66F/+q1z # U9Gy8fWqmkKEzTqBigSYU98yae5CA89T6JBKtgFV07pkYa4A7BUyCR5EBirARyhM # P0OAqR1GCAbSXWFaJ1sSpU8ATq33FoSQYwWwcmEET7FZYZqvbd6Jd4HtpOPqmu9W # Fc4taw== # =VgLB # -----END PGP SIGNATURE----- # gpg: Signature made Wed 05 Jun 2024 02:13:55 PM PDT # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate] * tag 'pull-misc-20240605' of https://gitlab.com/rth7680/qemu: disas/riscv: Use GString in format_inst disas/microblaze: Split get_field_special disas/microblaze: Print registers directly with PRIrfsl disas/microblaze: Print immediates directly with PRIimm disas/microblaze: Print registers directly with PRIreg disas/microblaze: Merge op->name output into each fprintf disas/microblaze: Re-indent print_insn_microblaze disas/microblaze: Split out print_immval_addr hw/dma/pl330: Use qemu_hexdump_line to avoid sprintf hw/ide/atapi: Use qemu_hexdump_line to avoid sprintf hw/scsi/scsi-disk: Use qemu_hexdump_line to avoid sprintf system/qtest: Replace sprintf by qemu_hexdump_line hw/mips/malta: Add re-usable rng_seed_hex_new() method util/hexdump: Inline g_string_append_printf "%02x" util/hexdump: Add unit_len and block_len to qemu_hexdump_line util/hexdump: Use a GString for qemu_hexdump_line Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-06-05disas/riscv: Use GString in format_instRichard Henderson1-117/+92
Allocate and fill a GString instead of snprintf and appending to a fixed sized buffer. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-22-richard.henderson@linaro.org>
2024-06-05disas/microblaze: Split get_field_specialRichard Henderson1-81/+61
Extract the raw special index and a function to lookup a name. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-21-richard.henderson@linaro.org>
2024-06-05disas/microblaze: Print registers directly with PRIrfslRichard Henderson1-17/+5
Use a printf format instead of sprintf into a buffer. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-20-richard.henderson@linaro.org>
2024-06-05disas/microblaze: Print immediates directly with PRIimmRichard Henderson1-50/+11
Use a printf format instead of sprintf into a buffer. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-19-richard.henderson@linaro.org>
2024-06-05disas/microblaze: Print registers directly with PRIregRichard Henderson1-31/+23
Use a printf format instead of sprintf into a buffer. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-18-richard.henderson@linaro.org>
2024-06-05disas/microblaze: Merge op->name output into each fprintfRichard Henderson1-40/+40
In the common case, issue one single fprintf. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-17-richard.henderson@linaro.org>
2024-06-05disas/microblaze: Re-indent print_insn_microblazeRichard Henderson1-123/+142
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-16-richard.henderson@linaro.org>
2024-06-05disas/microblaze: Split out print_immval_addrRichard Henderson1-60/+29
Unify the code blocks that try to print a symbolic address. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-15-richard.henderson@linaro.org>
2024-06-05hw/dma/pl330: Use qemu_hexdump_line to avoid sprintfPhilippe Mathieu-Daudé1-16/+9
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1. Using qemu_hexdump_line both fixes the deprecation warning and simplifies the code base. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-11-richard.henderson@linaro.org>
2024-06-05hw/ide/atapi: Use qemu_hexdump_line to avoid sprintfPhilippe Mathieu-Daudé1-8/+4
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1. Using qemu_hexdump_line both fixes the deprecation warning and simplifies the code base. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-10-richard.henderson@linaro.org>
2024-06-05hw/scsi/scsi-disk: Use qemu_hexdump_line to avoid sprintfPhilippe Mathieu-Daudé1-10/+3
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1. Using qemu_hexdump_line both fixes the deprecation warning and simplifies the code base. Note that this drops the "0x" prefix to every byte, which should be of no consequence to tracing. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240412073346.458116-9-richard.henderson@linaro.org>
2024-06-05system/qtest: Replace sprintf by qemu_hexdump_linePhilippe Mathieu-Daudé1-8/+4
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1. Using qemu_hexdump_line both fixes the deprecation warning and simplifies the code base. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>` [rth: Use qemu_hexdump_line] Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240412073346.458116-8-richard.henderson@linaro.org>
2024-06-05hw/mips/malta: Add re-usable rng_seed_hex_new() methodPhilippe Mathieu-Daudé1-12/+13
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1. Extract common code from reinitialize_rng_seed and load_kernel to rng_seed_hex_new. Using qemu_hexdump_line both fixes the deprecation warning and simplifies the code base. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> [rth: Use qemu_hexdump_line.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240412073346.458116-7-richard.henderson@linaro.org>
2024-06-05util/hexdump: Inline g_string_append_printf "%02x"Richard Henderson1-1/+11
Trivial arithmetic can be used for emitting the nibbles, rather than full-blown printf formatting. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240412073346.458116-6-richard.henderson@linaro.org>
2024-06-05util/hexdump: Add unit_len and block_len to qemu_hexdump_lineRichard Henderson3-11/+27
Generalize the current 1 byte unit and 4 byte blocking within the output. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240412073346.458116-5-richard.henderson@linaro.org>
2024-06-05util/hexdump: Use a GString for qemu_hexdump_lineRichard Henderson3-22/+34
Allocate a new, or append to an existing GString instead of using a fixed sized buffer. Require the caller to determine the length of the line -- do not bound len here. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240412073346.458116-4-richard.henderson@linaro.org>
2024-06-05Merge tag 'pull-sp-20240605' of https://gitlab.com/rth7680/qemu into stagingRichard Henderson12-334/+1566
target/sparc: Implement FMAF, IMA, VIS3 and VIS4 extensions linux-user: Add ioctl for BLKBSZSET # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmZgjpgdHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV98zwf+OUnUolzhyhBFcCuo # xZRuHiQLgPMLvBpBCY7OcGMTHjh53pYRJAKuSd623WaIs8olshdgo4xRc2tn6WAb # oSoABkiJ0H/f7N8XGC7cDVvpG9kCbtXJfzz6s3GkoEWGu557ecflsV5ODEoyeI3O # otilWnCsj43bt7lyltS4YGHWU7Dc9MBLrziPnSWhHuyTv1olFJFXoBAentZnfIAa # lKTu0y/koqael15cUZfYCYDinot5ssIh906E2u7q5Rd9T0N+IGmmQ3auybMLlGR8 # 8lw4UR0LceErHP6/GTT6VgSHeiaLXBQmqKeTXu+6Yy+ABH21b4Nkgj+PHdv2lxRf # h057tw== # =E35I # -----END PGP SIGNATURE----- # gpg: Signature made Wed 05 Jun 2024 09:13:12 AM PDT # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate] * tag 'pull-sp-20240605' of https://gitlab.com/rth7680/qemu: (38 commits) target/sparc: Enable VIS4 feature bit target/sparc: Implement monitor ASIs target/sparc: Implement MWAIT target/sparc: Implement SUBXC, SUBXCcc target/sparc: Implement FPMIN, FPMAX target/sparc: Implement VIS4 comparisons target/sparc: Implement 8-bit FPADD, FPADDS, and FPADDUS target/sparc: Implement FALIGNDATAi target/sparc: Add feature bit for VIS4 target/sparc: Implement IMA extension target/sparc: Enable VIS3 feature bit target/sparc: Implement XMULX target/sparc: Implement UMULXHI target/sparc: Implement PDISTN target/sparc: Implement MOVsTOw, MOVdTOx, MOVwTOs, MOVxTOd target/sparc: Implement LZCNT target/sparc: Implement LDXEFSR target/sparc: Implement FSLL, FSRL, FSRA, FSLAS target/sparc: Implement FPCMPEQ8, FPCMPNE8, FPCMPULE8, FPCMPUGT8 target/sparc: Implement FPADDS, FPSUBS ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>