From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, leon.alrae@imgtec.com
Subject: Re: [Qemu-devel] [PATCH] tcg: Merge GETPC and GETRA
Date: Tue, 26 Jul 2016 22:28:57 +1000 [thread overview]
Message-ID: <1469536137.5978.79.camel@kernel.crashing.org> (raw)
In-Reply-To: <1469493760-4205-1-git-send-email-rth@twiddle.net>
On Tue, 2016-07-26 at 06:12 +0530, Richard Henderson wrote:
> The return address argument to the softmmu template helpers was
> confused. In the legacy case, we wanted to indicate that there
> is no return address, and so passed in NULL. However, we then
> immediately subtracted GETPC_ADJ from NULL, resulting in a non-zero
> value, indicating the presence of an (invalid) return address.
>
> Push the GETPC_ADJ subtraction down to the only point it's required:
> immediately before use within cpu_restore_state, after all NULL
> pointer
> checks have been completed. This makes GETPC and GETRA identical.
>
> Remove GETRA as the lesser used macro, replacing all uses with GETPC.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>
> Ben, this should fix the "-2" problem that you reported. Of course,
> as also discussed in that thread, this won't fix the whole issue.
I haven't had a chance to review the details of the patch but I
verified that all my test OSes still boot with it applied ;-)
Cheers,
Ben.
next prev parent reply other threads:[~2016-07-26 12:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 0:42 [Qemu-devel] [PATCH] tcg: Merge GETPC and GETRA Richard Henderson
2016-07-26 1:36 ` Benjamin Herrenschmidt
2016-07-26 11:36 ` Leon Alrae
2016-07-26 12:24 ` [Qemu-devel] [PATCH] ppc: Fix fault PC reporting for lve*/stve* VMX instructions Benjamin Herrenschmidt
2016-07-26 12:28 ` Benjamin Herrenschmidt [this message]
2016-08-03 7:42 ` [Qemu-devel] [PATCH] tcg: Merge GETPC and GETRA Benjamin Herrenschmidt
2016-08-06 9:30 ` Richard Henderson
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=1469536137.5978.79.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=leon.alrae@imgtec.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).