All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Jia He <hejianet@gmail.com>
Cc: qemu-arm <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	jia.he@hxt-semitech.com, Eric Auger <eric.auger@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw/arm/smmuv3: fix smmu emulation when guest smmu is in passthrough mode
Date: Thu, 7 Jun 2018 14:39:38 +0100	[thread overview]
Message-ID: <CAFEAcA__8bZEku0vUAVQzheb8kjgZeRbKw_TXy6bY9RnKi+U9A@mail.gmail.com> (raw)
In-Reply-To: <1528378684-14487-1-git-send-email-hejianet@gmail.com>

On 7 June 2018 at 14:38, Jia He <hejianet@gmail.com> wrote:
> There is an exception when I passes iommu.passthrough=1 to guest's
> kernel boot parameter(host QDF2400 kernel 4.17, guest kernel 4.14).
> The guest will be hang when booting up.
>
> When guest smmu is in passthrough mode, entry.perm will not be assigned
> to flag in smmuv3_translate. It seems not be correct.
>
> After this patch, I have tested in 4 cases and all passed.
> host smmu on/passthrough + guest smmu on/passthrough
>
> Signed-off-by: jia.he@hxt-semitech.com
> ---
>  hw/arm/smmuv3.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
> index 42dc521..5c46102 100644
> --- a/hw/arm/smmuv3.c
> +++ b/hw/arm/smmuv3.c
> @@ -560,6 +560,12 @@ static IOMMUTLBEntry smmuv3_translate(IOMMUMemoryRegion *mr, hwaddr addr,
>      }
>
>      ret = smmuv3_decode_config(mr, &cfg, &event);
> +
> +    if (cfg.bypassed) {
> +        ret = 0;
> +        goto out;
> +    }
> +
>      if (ret) {
>          goto out;
>      }
> --
> 1.8.3.1
>

Ccing Eric as the author of the smmuv3 code.

thanks
-- PMM

  reply	other threads:[~2018-06-07 13:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 13:38 [Qemu-devel] [PATCH] hw/arm/smmuv3: fix smmu emulation when guest smmu is in passthrough mode Jia He
2018-06-07 13:39 ` Peter Maydell [this message]
2018-06-07 17:06 ` Auger Eric
2018-06-08  1:12   ` Jia He

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=CAFEAcA__8bZEku0vUAVQzheb8kjgZeRbKw_TXy6bY9RnKi+U9A@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=eric.auger@redhat.com \
    --cc=hejianet@gmail.com \
    --cc=jia.he@hxt-semitech.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.