From: "david@gibson.dropbear.id.au" <david@gibson.dropbear.id.au>
To: Matthieu Bucchianeri <matthieu.bucchianeri@leostella.com>
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] target/ppc: Fix SPE unavailable exception triggering
Date: Mon, 27 Jul 2020 13:29:04 +1000 [thread overview]
Message-ID: <20200727032904.GD84173@umbus.fritz.box> (raw)
In-Reply-To: <SN5P110MB05433223A83842B1686867CB84750@SN5P110MB0543.NAMP110.PROD.OUTLOOK.COM>
[-- Attachment #1: Type: text/plain, Size: 2884 bytes --]
On Sun, Jul 26, 2020 at 04:59:16PM +0000, Matthieu Bucchianeri wrote:
> 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(!ctx->spe_enabled)) {
> > > + gen_exception(ctx, POWERPC_EXCP_SPEU);
> > > + return;
> > > + }
> >
> > Isn't this missing here:
> >
> > acc = tcg_temp_new_i64();
> > tmp = tcg_temp_new_i64();
> >
> > You've removed allocating temps but this hunk does not add it back after the
> > exception unlike others in this patch.
>
> I should have probably mentioned somewhere that this patch also
> fixes a resource leak in that function. It is not very obvious
> when looking at it as a patch, but if you take a look at the
> original code, you will see that I removed these allocations on
> purpose:
>
>
>https://github.com/qemu/qemu/blob/d577dbaac7553767232faabb6a3e291aebd348ae/target/ppc/translate/spe-impl.inc.c#L532
Ok, can you please split the memory leak fix into a separate patch to
make this easier to review.
>
> > static inline void gen_evmwsmiaa(DisasContext *ctx)
> > {
> > TCGv_i64 acc = tcg_temp_new_i64();
> > TCGv_i64 tmp = tcg_temp_new_i64();
> >
> > gen_evmwsmi(ctx); /* rD := rA * rB */
> >
> > acc = tcg_temp_new_i64();
> > tmp = tcg_temp_new_i64();
>
> I apologize for not making this any more clear in my description.
>
> Let me know if this looks correct now, with the full context in mind.
>
> Thanks.
>
> LeoStella, LLC
> A joint venture of Thales Alenia Space and Spaceflight Industries
>
> 12501 E Marginal Way S • Tukwila, WA 98168
>
> Proprietary Document: This document may contain trade secrets or otherwise proprietary and confidential information owned by LeoStella LLC. It is intended only for the individual addressee and may not be copied, distributed, or otherwise disclosed without LeoStella LLC express prior written authorization.
> Export Controlled: This document may contain technical data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751 et seq.) or the Export Administration Act of 1979, as amended, Title 50,U.S.C., app 2401 et seq. Violation of these export laws are subject to severe criminal penalties. Recipient shall not export, re-export, or otherwise transfer or share this document to any foreign person (as defined by U.S. export laws) without advance written authorization from LeoStella LLC.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-07-27 3:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-25 19:14 [PATCH] target/ppc: Fix SPE unavailable exception triggering Matthieu Bucchianeri
2020-07-25 21:04 ` no-reply
2020-07-25 21:04 ` no-reply
2020-07-26 4:07 ` Matthieu Bucchianeri
2020-07-26 10:04 ` BALATON Zoltan
2020-07-26 16:59 ` Matthieu Bucchianeri
2020-07-27 3:29 ` david [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200727032904.GD84173@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=matthieu.bucchianeri@leostella.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).