From: Sergey Fedorov <sergey.fedorov@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-arm] [PATCH 4/4] target-arm: Avoid unnecessary TLB flush on TCR_EL2 writes
Date: Mon, 4 Apr 2016 17:58:31 +0300 [thread overview]
Message-ID: <57028117.5090008@linaro.org> (raw)
In-Reply-To: <1459435778-5526-5-git-send-email-peter.maydell@linaro.org>
On 31/03/16 17:49, Peter Maydell wrote:
> The TCR_EL2 regdef was incorrectly using the vmsa_tcr_el1_write
> function for writes. Since TCR_EL2 doesn't have the A1 bit that
> TCR_EL1 does, we don't need to do a tlb_flush() when it is written.
> Remove the unnecessary .writefn and also the harmless but unneeded
> .raw_writefn and .resetfn definitions.
How about TCR_EL3 which doesn't have A1 bit as well?
Kind regards,
Sergey
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> target-arm/helper.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/target-arm/helper.c b/target-arm/helper.c
> index 09638b2..4dbd844 100644
> --- a/target-arm/helper.c
> +++ b/target-arm/helper.c
> @@ -3559,8 +3559,10 @@ static const ARMCPRegInfo el2_cp_reginfo[] = {
> .resetvalue = 0 },
> { .name = "TCR_EL2", .state = ARM_CP_STATE_BOTH,
> .opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 2,
> - .access = PL2_RW, .writefn = vmsa_tcr_el1_write,
> - .resetfn = vmsa_ttbcr_reset, .raw_writefn = raw_write,
> + .access = PL2_RW,
> + /* no .writefn needed as this can't cause an ASID change;
> + * no .raw_writefn or .resetfn needed as we never use mask/base_mask
> + */
> .fieldoffset = offsetof(CPUARMState, cp15.tcr_el[2]) },
> { .name = "VTCR", .state = ARM_CP_STATE_AA32,
> .cp = 15, .opc1 = 4, .crn = 2, .crm = 1, .opc2 = 2,
WARNING: multiple messages have this Message-ID (diff)
From: Sergey Fedorov <sergey.fedorov@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] target-arm: Avoid unnecessary TLB flush on TCR_EL2 writes
Date: Mon, 4 Apr 2016 17:58:31 +0300 [thread overview]
Message-ID: <57028117.5090008@linaro.org> (raw)
In-Reply-To: <1459435778-5526-5-git-send-email-peter.maydell@linaro.org>
On 31/03/16 17:49, Peter Maydell wrote:
> The TCR_EL2 regdef was incorrectly using the vmsa_tcr_el1_write
> function for writes. Since TCR_EL2 doesn't have the A1 bit that
> TCR_EL1 does, we don't need to do a tlb_flush() when it is written.
> Remove the unnecessary .writefn and also the harmless but unneeded
> .raw_writefn and .resetfn definitions.
How about TCR_EL3 which doesn't have A1 bit as well?
Kind regards,
Sergey
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> target-arm/helper.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/target-arm/helper.c b/target-arm/helper.c
> index 09638b2..4dbd844 100644
> --- a/target-arm/helper.c
> +++ b/target-arm/helper.c
> @@ -3559,8 +3559,10 @@ static const ARMCPRegInfo el2_cp_reginfo[] = {
> .resetvalue = 0 },
> { .name = "TCR_EL2", .state = ARM_CP_STATE_BOTH,
> .opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 2,
> - .access = PL2_RW, .writefn = vmsa_tcr_el1_write,
> - .resetfn = vmsa_ttbcr_reset, .raw_writefn = raw_write,
> + .access = PL2_RW,
> + /* no .writefn needed as this can't cause an ASID change;
> + * no .raw_writefn or .resetfn needed as we never use mask/base_mask
> + */
> .fieldoffset = offsetof(CPUARMState, cp15.tcr_el[2]) },
> { .name = "VTCR", .state = ARM_CP_STATE_AA32,
> .cp = 15, .opc1 = 4, .crn = 2, .crm = 1, .opc2 = 2,
next prev parent reply other threads:[~2016-04-04 14:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 14:49 [Qemu-arm] [PATCH for-2.6 0/4] various regdef fixes for EL2/EL3 regs Peter Maydell
2016-03-31 14:49 ` [Qemu-devel] " Peter Maydell
2016-03-31 14:49 ` [Qemu-arm] [PATCH 1/4] target-arm: Correctly reset SCTLR_EL3 for 64-bit CPUs Peter Maydell
2016-03-31 14:49 ` [Qemu-devel] " Peter Maydell
2016-03-31 14:59 ` [Qemu-arm] " Laurent Desnogues
2016-03-31 14:59 ` Laurent Desnogues
2016-04-04 14:13 ` [Qemu-arm] " Sergey Fedorov
2016-04-04 14:13 ` [Qemu-devel] " Sergey Fedorov
2016-03-31 14:49 ` [Qemu-arm] [PATCH 2/4] target-arm: Remove incorrect ALIAS tags from ESR_EL2 and ESR_EL3 Peter Maydell
2016-03-31 14:49 ` [Qemu-devel] " Peter Maydell
2016-04-04 14:16 ` [Qemu-arm] " Sergey Fedorov
2016-04-04 14:16 ` [Qemu-devel] " Sergey Fedorov
2016-03-31 14:49 ` [Qemu-arm] [PATCH 3/4] target-arm: Make the 64-bit version of VTCR do the migration Peter Maydell
2016-03-31 14:49 ` [Qemu-devel] " Peter Maydell
2016-04-04 14:22 ` [Qemu-arm] " Sergey Fedorov
2016-04-04 14:22 ` [Qemu-devel] " Sergey Fedorov
2016-03-31 14:49 ` [Qemu-arm] [PATCH 4/4] target-arm: Avoid unnecessary TLB flush on TCR_EL2 writes Peter Maydell
2016-03-31 14:49 ` [Qemu-devel] " Peter Maydell
2016-04-04 14:58 ` Sergey Fedorov [this message]
2016-04-04 14:58 ` Sergey Fedorov
2016-04-04 15:01 ` [Qemu-arm] " Peter Maydell
2016-04-04 15:01 ` [Qemu-devel] " Peter Maydell
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=57028117.5090008@linaro.org \
--to=sergey.fedorov@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 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.