qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH for-3.1] target/arm: Remove workaround for small SAU regions
Date: Tue, 6 Nov 2018 18:29:59 +0100	[thread overview]
Message-ID: <e2d9d1f7-4310-d8a6-f50f-c4fd833e166e@redhat.com> (raw)
In-Reply-To: <20181106163801.14474-1-peter.maydell@linaro.org>

On 6/11/18 17:38, Peter Maydell wrote:
> Before we supported direct execution from MMIO regions, we
> implemented workarounds in commit 720424359917887c926a33d2
> which let us avoid doing so, even if the SAU or MPU region
> was less than page-sized.
> 
> Once we implemented execute-from-MMIO, we removed part
> of those workarounds in commit d4b6275df320cee76; but
> we forgot the one in get_phys_addr_pmsav8() which
> suppressed use of small SAU regions in executable regions.
> Remove that workaround now.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   target/arm/helper.c | 12 ------------
>   1 file changed, 12 deletions(-)
> 
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 96301930cc8..ec56becc394 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -10560,18 +10560,6 @@ static bool get_phys_addr_pmsav8(CPUARMState *env, uint32_t address,
>   
>       ret = pmsav8_mpu_lookup(env, address, access_type, mmu_idx, phys_ptr,
>                               txattrs, prot, &mpu_is_subpage, fi, NULL);
> -    /*
> -     * TODO: this is a temporary hack to ignore the fact that the SAU region
> -     * is smaller than a page if this is an executable region. We never
> -     * supported small MPU regions, but we did (accidentally) allow small
> -     * SAU regions, and if we now made small SAU regions not be executable
> -     * then this would break previously working guest code. We can't
> -     * remove this until/unless we implement support for execution from
> -     * small regions.
> -     */
> -    if (*prot & PAGE_EXEC) {
> -        sattrs.subpage = false;
> -    }
>       *page_size = sattrs.subpage || mpu_is_subpage ? 1 : TARGET_PAGE_SIZE;
>       return ret;
>   }
> 

  reply	other threads:[~2018-11-06 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 16:38 [Qemu-devel] [PATCH for-3.1] target/arm: Remove workaround for small SAU regions Peter Maydell
2018-11-06 17:29 ` Philippe Mathieu-Daudé [this message]
2018-11-08  9:19 ` 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=e2d9d1f7-4310-d8a6-f50f-c4fd833e166e@redhat.com \
    --to=philmd@redhat.com \
    --cc=patches@linaro.org \
    --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).