- May 12, 2021
-
-
Markus Armbruster authored
Target lm32 was deprecated in commit d8498005, v5.2.0. See there for rationale. Some of its code lives on in device models derived from milkymist ones: hw/char/digic-uart.c and hw/display/bcm2835_fb.c. Cc: Michael Walle <michael@walle.cc> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20210503084034.3804963-2-armbru@redhat.com> Acked-by:
Michael Walle <michael@walle.cc> [Trivial conflicts resolved, reST markup fixed]
-
Thomas Huth authored
There are no known users of this CPU anymore, and there are no binaries available online which could be used for regression tests, so the code has likely completely bit-rotten already. It's been marked as deprecated since two releases now and nobody spoke up that there is still a need to keep it, thus let's remove it now. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20210430160355.698194-1-thuth@redhat.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> [Commit message typos fixed, trivial conflicts resolved] Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- May 10, 2021
-
-
Peter Maydell authored
The WFI insn is not system-mode only, though it doesn't usually make a huge amount of sense for userspace code to execute it. Currently if you try it in qemu-arm then the helper function will raise an EXCP_HLT exception, which is not covered by the switch in cpu_loop() and results in an abort: qemu: unhandled CPU exception 0x10001 - aborting R00=00000001 R01=408003e4 R02=408003ec R03=000102ec R04=00010a28 R05=00010158 R06=00087460 R07=00010158 R08=00000000 R09=00000000 R10=00085b7c R11=408002a4 R12=408002b8 R13=408002a0 R14=0001057c R15=000102f8 PSR=60000010 -ZC- A usr32 qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x7fcbfa4f0a12 Make the WFI helper function return immediately in the usermode emulator. This turns WFI into a NOP, which is OK because: * architecturally "WFI is a NOP" is a permitted implementation * aarch64 Linux kernels use the SCTLR_EL1.nTWI bit to trap userspace WFI and NOP it (though aarch32 kernels currently just let WFI do whatever it would do) We could in theory make the translate.c code special case user-mode emulation and NOP the insn entirely rather than making the helper do nothing, but because no real world code will be trying to execute WFI we don't care about efficiency and the helper provides a single place where we can make the change rather than having to touch multiple places in translate.c and translate-a64.c. Fixes: https://bugs.launchpad.net/qemu/+bug/1926759 Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430162212.825-1-peter.maydell@linaro.org
-
Peter Maydell authored
Switch translate-neon.c.inc from being #included into translate.c to being its own compilation unit. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-14-peter.maydell@linaro.org
-
Peter Maydell authored
Make the remaining functions needed by the translate-neon code global. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-13-peter.maydell@linaro.org
-
Peter Maydell authored
Move the NeonGenThreeOpEnvFn typedef to translate.h together with the other similar typedefs. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20210430132740.10391-12-peter.maydell@linaro.org
-
Peter Maydell authored
The VFPGenFixPointFn typedef is unused; delete it. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20210430132740.10391-11-peter.maydell@linaro.org
-
Peter Maydell authored
The function vfp_reg_ptr() is used only in translate-neon.c.inc; move it there. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-10-peter.maydell@linaro.org
-
Peter Maydell authored
Switch translate-vfp.c.inc from being #included into translate.c to being its own compilation unit. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-9-peter.maydell@linaro.org
-
Peter Maydell authored
Make the remaining functions which are needed by translate-vfp.c.inc global. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-8-peter.maydell@linaro.org
-
Peter Maydell authored
The functions vfp_load_reg32(), vfp_load_reg64(), vfp_store_reg32() and vfp_store_reg64() are used only in translate-vfp.c.inc. Move them to that file. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-7-peter.maydell@linaro.org
-
Peter Maydell authored
Move the various gen_aa32* functions and macros out of translate.c and into translate-a32.h. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-6-peter.maydell@linaro.org
-
Peter Maydell authored
Currently the trans functions for m-nocp.decode all live in translate-vfp.inc.c; move them out into their own translation unit, translate-m-nocp.c. The trans_* functions here are pure code motion with no changes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-5-peter.maydell@linaro.org
-
Peter Maydell authored
We want to split out the .c.inc files which are currently included into translate.c so they are separate compilation units. To do this we need to make some functions which are currently file-local to translate.c have global scope; create a translate-a32.h paralleling the existing translate-a64.h as a place for these declarations to live, so that code moved into the new compilation units can call them. The functions made global here are those required by the m-nocp.decode functions, except that I have converted the whole family of {read,write}_neon_element* and also both the load_cpu and store_cpu functions for consistency, even though m-nocp only wants a few functions from each. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-4-peter.maydell@linaro.org
-
Peter Maydell authored
The unallocated_encoding() function is the same in both translate-a64.c and translate.c; make the translate.c function global and drop the translate-a64.c version. To do this we need to also share gen_exception_insn(), which currently exists in two slightly different versions for A32 and A64: merge those into a single function that can work for both. This will be useful for splitting up translate.c, which will require unallocated_encoding() to no longer be file-local. It's also hopefully less confusing to have only one version of the function rather than two. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-3-peter.maydell@linaro.org
-
Peter Maydell authored
Some of the constant expanders defined in translate.c are generically useful and will be used by the separate C files for VFP and Neon once they are created; move the expander definitions to translate.h. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210430132740.10391-2-peter.maydell@linaro.org
-
Peter Maydell authored
In tlbi_aa64_vae2is_write() the calculation bits = tlbbits_for_regime(env, secure ? ARMMMUIdx_E2 : ARMMMUIdx_SE2, pageaddr) has the two arms of the ?: expression reversed. Fix the bug. Fixes: b6ad6062 Reported-by:
Rebecca Cran <rebecca@nuviainc.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Rémi Denis-Courmont <remi.denis.courmont@huawei.com> Reviewed-by:
Rebecca Cran <rebecca@nuviainc.com> Message-id: 20210420123106.10861-1-peter.maydell@linaro.org
-
- May 04, 2021
-
-
Philippe Mathieu-Daudé authored
Since cpu_check_irqs() doesn't reference to anything outside of CPUSPARCState, it better belongs to the architectural code in target/, rather than the hardware specific code in hw/. Note: while we moved the trace events, we don't rename them. Remark: this allows us to build the leon3 machine stand alone, fixing this link failure (because cpu_check_irqs is defined in hw/sparc/sun4m.c which is only built when CONFIG_SUN4M is selected): /usr/bin/ld: target_sparc_win_helper.c.o: in function `cpu_put_psr': target/sparc/win_helper.c:91: undefined reference to `cpu_check_irqs' Suggested-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210428141655.387430-5-f4bug@amsat.org> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Philippe Mathieu-Daudé authored
When building without the leon3 machine, we get this link failure: /usr/bin/ld: target_sparc_int32_helper.c.o: in function `leon3_irq_manager': target/sparc/int32_helper.c:172: undefined reference to `leon3_irq_ack' This is because the leon3_irq_ack() is declared in hw/sparc/leon3.c, which is only build when CONFIG_LEON3 is selected. Fix by moving the leon3_cache_control_int() / leon3_irq_manager() (which are specific to the leon3 machine) to hw/sparc/leon3.c. Move the trace events along (but don't rename them). leon3_irq_ack() is now locally used, declare it static to reduce its scope. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
KONRAD Frederic <frederic.konrad@adacore.com> Tested-by:
KONRAD Frederic <frederic.konrad@adacore.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20210428141655.387430-2-f4bug@amsat.org> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Reinoud Zandijk authored
Signed-off-by:
Kamil Rytarowski <kamil@NetBSD.org> Signed-off-by:
Reinoud Zandijk <reinoud@NetBSD.org> Message-Id: <20210402202535.11550-4-reinoud@NetBSD.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Reinoud Zandijk authored
Signed-off-by:
Kamil Rytarowski <kamil@NetBSD.org> Signed-off-by:
Reinoud Zandijk <reinoud@NetBSD.org> Message-Id: <20210402202535.11550-3-reinoud@NetBSD.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Bruno Larsen (billionai) authored
Since vscr is not an spr, its initialization was removed from the spr registration functions, and moved to the relevant init_procs. We may look into adding vscr to the reset path instead of the init path (as suggested by David Gibson), but this looked like a good enough solution for now. Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210430193533.82136-6-bruno.larsen@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
We elide values when registering sprs, we might as well save space in the array as well. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210501022923.1179736-3-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Introduce 3 helper macros to elide arguments that we cannot supply. This reduces the repetition required to get the job done. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210501022923.1179736-2-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Nicholas Piggin authored
POWER10 adds a new bit that modifies interrupt behaviour, LPCR[HAIL], and it removes support for the LPCR[AIL]=0b10 mode. Reviewed-by:
Cédric Le Goater <clg@kaod.org> Tested-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Message-Id: <20210501072436.145444-3-npiggin@gmail.com> [dwg: Corrected tab indenting] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Nicholas Piggin authored
The AIL logic is becoming unmanageable spread all over powerpc_excp(), and it is slated to get even worse with POWER10 support. Move it all to a new helper function. Reviewed-by:
Cédric Le Goater <clg@kaod.org> Tested-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Message-Id: <20210501072436.145444-2-npiggin@gmail.com> [dwg: Corrected tab indenting] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
code motion to remove opcode callback table from translate_init.c.inc to translate.c in preparation to remove the #include <translate_init.c.inc> from translate.c. Also created destroy_ppc_opcodes and removed that logic from ppc_cpu_unrealize Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210429162130.2412-2-bruno.larsen@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
All the code related to gdb has been moved from translate_init.c.inc file to the gdbstub.c file, where it makes more sense. Version 4 fixes the omission of internal.h in gdbstub, mentioned in <87sg3d2gf5.fsf@linux.ibm.com>, and the extra blank line. Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Suggested-by:
Fabiano Rosas <farosas@linux.ibm.com> Message-Id: <20210426184706.48040-1-bruno.larsen@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Ravi Bangoria authored
Power10 is introducing second DAWR. Use real register names (with suffix 0) from ISA for current macros and variables used by Qemu. One exception to this is KVM_REG_PPC_DAWR[X]. This is from kernel uapi header and thus not changed in kernel as well as Qemu. Signed-off-by:
Ravi Bangoria <ravi.bangoria@linux.ibm.com> Reviewed-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Message-Id: <20210412114433.129702-3-ravi.bangoria@linux.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Nicholas Piggin authored
This must have slipped through the cracks between adding POWER10 support and scv support. Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Message-Id: <20210415054227.1793812-3-npiggin@gmail.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Nicholas Piggin authored
ISA v3.0 radix guest execution has a quirk in AIL behaviour such that the LPCR[AIL] value can apply to hypervisor interrupts. This affects machines that emulate HV=1 mode (i.e., powernv9). Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Message-Id: <20210415054227.1793812-2-npiggin@gmail.com> Reviewed-by:
Fabiano Rosas <farosas@linux.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Verify that hflags was updated correctly whenever we change cpu state that is used by hflags. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323184340.619757-11-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
We weren't recording MSR_GS in hflags, which means that BookE memory accesses were essentially random vs Guest State. Instead of adding this bit directly, record the completed mmu indexes instead. This makes it obvious that we are recording exactly the information that we need. This also means that we can stop directly recording MSR_IR. Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323184340.619757-9-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Nothing within the translator -- or anywhere else for that matter -- checks MSR_SA or MSR_AP on the 602. This may be a mistake. However, for the moment, we need not record these bits in hflags. This allows us to simplify HFLAGS_VSX computation by moving it to overlap with MSR_VSX. Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323184340.619757-8-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Because this bit was not in hflags, the privilege check for tlb instructions was essentially random. Recompute hflags when storing to LPCR. Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323184340.619757-7-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Perform the test against FSCR_SCV at runtime, in the helper. This means we can remove the incorrect set against SCV in ppc_tr_init_disas_context and do not need to add an HFLAGS bit. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323184340.619757-6-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Because these bits were not in hflags, the code generated for single-stepping on BookE was essentially random. Recompute hflags when storing to dbcr0. Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323184340.619757-5-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
It will be stored in tb->flags, which is also uint32_t, so let's use the correct size. Reviewed-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323184340.619757-4-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Copying flags directly from msr has drawbacks: (1) msr bits mean different things per cpu, (2) msr has 64 bits on 64 cpus while tb->flags has only 32 bits. Create a enum to define these bits. Document the origin of each bit and validate those bits that must match MSR. This fixes the truncation of env->hflags to tb->flags, because we no longer have hflags bits set above bit 31. Most of the code in ppc_tr_init_disas_context is moved over to hreg_compute_hflags. Some of it is simple extractions from msr, some requires examining other cpu flags. Anything that is moved becomes a simple extract from hflags in ppc_tr_init_disas_context. Several existing bugs are left in ppc_tr_init_disas_context, where additional changes are required -- to be addressed in future patches. Remove a broken #if 0 block. Reported-by:
Ivan Warren <ivan@vmfacility.fr> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323184340.619757-3-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Extract post_load_update_msr to share between cpu_load_old and cpu_post_load in updating the msr. Suggested-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323184340.619757-2-richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-