From: Julien Grall <julien.grall@arm.com>
To: Sergej Proskurin <proskurin@sec.in.tum.de>,
xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [RFC PATCH 2/4] arm/mem_access: Change value of TTBCR_SZ_MASK
Date: Tue, 2 May 2017 12:56:44 +0100 [thread overview]
Message-ID: <1f9c1ea5-f951-cfb1-a91b-7b0136456fc8@arm.com> (raw)
In-Reply-To: <20170430194838.29932-3-proskurin@sec.in.tum.de>
Hi Sergej,
On 30/04/17 20:48, Sergej Proskurin wrote:
> The TTBCR_SZ holds only 3 bits and thus must be masked with the value
> 0x7 instead of the previously used value 0xf.
Please quote the spec (paragaph + version) when you do a such change.
TTBCR_* flags are used for both TCR_EL1 (AArch64) and TTBCR (AArch32).
Looking at the spec (ARM DDI 0487A.k_iss10775) TCR_EL1.{T0SZ,T1SZ) is
encoded on 6 bits and TTBCR_EL1.{T0SZ,T1SZ} is encoded on 3 bits, with
the following 3 bits RES0.
So the mask here should be 0x3f.
Cheers,
>
> Signed-off-by: Sergej Proskurin <proskurin@sec.in.tum.de>
> ---
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Julien Grall <julien.grall@arm.com>
> ---
> xen/include/asm-arm/processor.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
> index 4fdf86070b..c8b8cff311 100644
> --- a/xen/include/asm-arm/processor.h
> +++ b/xen/include/asm-arm/processor.h
> @@ -94,7 +94,7 @@
> #define TTBCR_N_2KB _AC(0x03,U)
> #define TTBCR_N_1KB _AC(0x04,U)
>
> -#define TTBCR_SZ_MASK 0xf
> +#define TTBCR_SZ_MASK _AC(0x7,UL)
>
> /* SCTLR System Control Register. */
> /* HSCTLR is a subset of this. */
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-05-02 11:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-30 19:48 [RFC PATCH 0/4] arm/mem_access: Walk guest page tables in SW if mem_access is active Sergej Proskurin
2017-04-30 19:48 ` [RFC PATCH 1/4] arm/mem_access: Move TTBCR_SZ_MASK to processor.h Sergej Proskurin
2017-05-02 11:47 ` Julien Grall
2017-04-30 19:48 ` [RFC PATCH 2/4] arm/mem_access: Change value of TTBCR_SZ_MASK Sergej Proskurin
2017-05-02 11:56 ` Julien Grall [this message]
2017-05-02 12:01 ` Julien Grall
2017-05-08 6:40 ` Sergej Proskurin
2017-05-08 11:31 ` Julien Grall
2017-05-08 6:25 ` Sergej Proskurin
2017-04-30 19:48 ` [RFC PATCH 3/4] arm/mem_access: Add further TCR_EL1/TTBCR defines Sergej Proskurin
2017-05-02 12:01 ` Julien Grall
2017-04-30 19:48 ` [RFC PATCH 4/4] arm/mem_access: Add software guest-page-table walk Sergej Proskurin
2017-05-01 14:38 ` Razvan Cojocaru
2017-05-01 15:39 ` Sergej Proskurin
2017-05-02 15:17 ` Julien Grall
2017-05-08 9:22 ` Sergej Proskurin
2017-05-08 11:44 ` Julien Grall
2017-05-08 19:42 ` Tamas K Lengyel
2017-05-08 20:53 ` Julien Grall
2017-05-08 21:22 ` Tamas K Lengyel
2017-05-09 7:17 ` Sergej Proskurin
2017-05-09 8:09 ` Julien Grall
2017-05-09 16:04 ` Tamas K Lengyel
2017-05-09 16:22 ` Julien Grall
2017-05-09 16:45 ` Tamas K Lengyel
2017-05-09 18:55 ` Julien Grall
2017-05-09 18:56 ` Julien Grall
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=1f9c1ea5-f951-cfb1-a91b-7b0136456fc8@arm.com \
--to=julien.grall@arm.com \
--cc=proskurin@sec.in.tum.de \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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).