From: Eric Auger <eric.auger@redhat.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org,
qemu-arm@nongnu.org, ola.hugosson@arm.com
Subject: Re: [PATCH 2/2] hw/arm/smmu-common: Fix TTB1 handling
Date: Mon, 13 Feb 2023 17:30:03 +0100 [thread overview]
Message-ID: <1964d20f-e18b-5875-914b-16f2f3acee37@redhat.com> (raw)
In-Reply-To: <20230210163731.970130-3-jean-philippe@linaro.org>
Hi Jean,
On 2/10/23 17:37, Jean-Philippe Brucker wrote:
> Addresses targeting the second translation table (TTB1) in the SMMU have
> all upper bits set (except for the top byte when TBI is enabled). Fix
> the TTB1 check.
>
> Reported-by: Ola Hugosson <ola.hugosson@arm.com>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> ---
> hw/arm/smmu-common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
> index 2b8c67b9a1..0a5a60ca1e 100644
> --- a/hw/arm/smmu-common.c
> +++ b/hw/arm/smmu-common.c
> @@ -249,7 +249,7 @@ SMMUTransTableInfo *select_tt(SMMUTransCfg *cfg, dma_addr_t iova)
> /* there is a ttbr0 region and we are in it (high bits all zero) */
> return &cfg->tt[0];
> } else if (cfg->tt[1].tsz &&
> - !extract64(iova, 64 - cfg->tt[1].tsz, cfg->tt[1].tsz - tbi_byte)) {
> + sextract64(iova, 64 - cfg->tt[1].tsz, cfg->tt[1].tsz - tbi_byte) == -1) {
> /* there is a ttbr1 region and we are in it (high bits all one) */
> return &cfg->tt[1];
> } else if (!cfg->tt[0].tsz) {
Reviewed-by: Eric Auger <eric.auger@redhat.com>
While reading the spec again, I noticed we do not support VAX. Is it
something that we would need to support?
Thanks!
Eric
next prev parent reply other threads:[~2023-02-13 16:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 16:37 [PATCH 0/2] hw/arm/smmu: Fixes for TTB1 Jean-Philippe Brucker
2023-02-10 16:37 ` [PATCH 1/2] hw/arm/smmu-common: Support 64-bit addresses Jean-Philippe Brucker
2023-02-11 23:28 ` Richard Henderson
2023-02-13 16:22 ` Eric Auger
2023-02-10 16:37 ` [PATCH 2/2] hw/arm/smmu-common: Fix TTB1 handling Jean-Philippe Brucker
2023-02-11 23:32 ` Richard Henderson
2023-02-13 16:30 ` Eric Auger [this message]
2023-02-14 16:46 ` Jean-Philippe Brucker
2023-02-14 18:36 ` Eric Auger
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=1964d20f-e18b-5875-914b-16f2f3acee37@redhat.com \
--to=eric.auger@redhat.com \
--cc=jean-philippe@linaro.org \
--cc=ola.hugosson@arm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@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).