[PATCH v2] target/ppc: Fix SPE unavailable exception triggering

2020-07-27 Thread Matthieu Bucchianeri
://bugs.launchpad.net/qemu/+bug/1611394 Signed-off-by: Matthieu Bucchianeri --- v2: Split out fix for TCG leak in gen_evmwsmiaa(). Based-on: <20200727172114.31415-1-matthieu.bucchian...@leostella.com> ([PATCH] target/ppc: Fix TCG leak with the evmwsmiaa instruction) target/ppc/translate/spe-impl.inc.

[PATCH] target/ppc: Fix TCG leak with the evmwsmiaa instruction

2020-07-27 Thread Matthieu Bucchianeri
is not propagated. This will be fixed in my patch for bug #1888918. Signed-off-by: Matthieu Bucchianeri --- target/ppc/translate/spe-impl.inc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/translate/spe-impl.inc.c b/target/ppc/translate/spe-impl.inc.c index

Re: [PATCH] target/ppc: Fix SPE unavailable exception triggering

2020-07-26 Thread Matthieu Bucchianeri
Hello Balaton, Thank you for your thorough review! See my response below. > > static inline void gen_evmwsmiaa(DisasContext *ctx) { > > -TCGv_i64 acc = tcg_temp_new_i64(); > > -TCGv_i64 tmp = tcg_temp_new_i64(); > > +TCGv_i64 acc; > > +TCGv_i64 tmp; > > + > > +if (unlikely(!ct

RE: [PATCH] target/ppc: Fix SPE unavailable exception triggering

2020-07-25 Thread Matthieu Bucchianeri
-unavailable-exception-triggering.patch has no obvious style problems and is ready for submission. Please let me know if any other action is required. -Original Message- From: no-re...@patchew.org Sent: Saturday, July 25, 2020 2:04 PM To: Matthieu Bucchianeri Cc: qemu-devel@nongnu.org; qemu

[PATCH] target/ppc: Fix SPE unavailable exception triggering

2020-07-25 Thread Matthieu Bucchianeri
://bugs.launchpad.net/qemu/+bug/1611394 Signed-off-by: Matthieu Bucchianeri --- target/ppc/translate/spe-impl.inc.c | 101 ++-- 1 file changed, 66 insertions(+), 35 deletions(-) diff --git a/target/ppc/translate/spe-impl.inc.c b/target/ppc/translate/spe-impl.inc.c index 36b4d5654d

[Bug 1611394] Re: qemu-ppc: Scalar Single-Precision Floating-Point instructions should not test MSR[SPV]

2020-07-25 Thread Matthieu Bucchianeri
** Changed in: qemu Assignee: (unassigned) => Matthieu Bucchianeri (matthieu-bucchianeri) ** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.ne

[Bug 1888918] Re: qemu-system-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-25 Thread Matthieu Bucchianeri
** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1888918 Title: qemu-system-ppc: Floating point instructions do not properly generate the SPE/Em

[Bug 1888918] Re: qemu-system-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-25 Thread Matthieu Bucchianeri
Testing performed on the patch sent to the mailing list: 1) make check 2) Run the "spe-bug.c" userspace program, observed the correct result: # qemu/ppc-softmmu/qemu-system-ppc -nographic -machine mpc8544ds -kernel buildroot/output/images/uImage -hda buildroot/output/images/rootfs.cpio -append

[Bug 1888918] Re: qemu-system-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-25 Thread Matthieu Bucchianeri
> Note that on the MPC8548, it is observed that the "brinc" > instruction does generate the interrupt, which contradicts > section 4.2.3 SPE/Embedded Floating-Point Unavailable Interrupt > of the Signal Processing Engine (SPE) Programming Environments > Manual, Rev. 0 (see the quote in the descript

[Bug 1888918] Re: qemu-system-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-24 Thread Matthieu Bucchianeri
** Summary changed: - qemu-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt + qemu-system-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt ** Description changed: Whe

[Bug 1888918] Re: qemu-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-24 Thread Matthieu Bucchianeri
** Changed in: qemu Assignee: (unassigned) => Matthieu Bucchianeri (matthieu-bucchianeri) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1888918 Title: qemu-ppc: Floating point instructions

[Bug 1611394] Re: qemu-ppc: Scalar Single-Precision Floating-Point instructions should not test MSR[SPV]

2020-07-24 Thread Matthieu Bucchianeri
I have filed a broader ticket, Bug #1888918, reporting a very similar issue that leads to corruption/bad arithmetic when using double- precision & vector instructions. I will be submitting a patch in the next few days that will also address this ticket. -- You received this bug notification beca

[Bug 1888918] Re: qemu-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-24 Thread Matthieu Bucchianeri
Attaching the output of the test module run on QEMU. As shown in the description, 39 instructions do not comply with the rule described in the Signal Processing Engine (SPE) Programming Environments Manual, Rev. 0. QEMU was run as follows: # qemu/ppc-softmmu/qemu-system-ppc -nographic -machine mp

[Bug 1888918] Re: qemu-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-24 Thread Matthieu Bucchianeri
I have already written a patch for this issue, that I will be submitting to the community in the next few days. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1888918 Title: qemu-ppc: Floating point

[Bug 1888918] Re: qemu-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-24 Thread Matthieu Bucchianeri
Attaching the test program mentioned in the description. This program (a kernel module, in fact) can be loaded on a Linux system both in QEMU or on real hardware. In the next comments, I will attach the detailed output of the test program. ** Attachment added: "SPE test module" https://bugs.l

[Bug 1888918] Re: qemu-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-24 Thread Matthieu Bucchianeri
Attaching the output of the test module (above) when run on a real MPC8548. This is to establish a baseline validating which instructions shall or shall not generate the SPE/Embedded Floating-Point Unavailable interrupt. Note that on the MPC8548, it is observed that the "brinc" instruction does ge

[Bug 1888918] [NEW] qemu-ppc: Floating point instructions do not properly generate the SPE/Embedded Floating-Point Unavailable interrupt

2020-07-24 Thread Matthieu Bucchianeri
Public bug reported: When emulating certain floating point instructions or vector instructions on PowerPC machines, QEMU does not properly generate the SPE/Embedded Floating-Point Unavailable interrupt. As described in the Signal Processing Engine (SPE) Programming Environments Manual, Rev. 0, av