From: Julien Grall <julien.grall@citrix.com>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, xen-devel@lists.xen.org
Cc: julien.grall@citrix.com, edgar.iglesias@xilinx.com, tim@xen.org,
ian.campbell@citrix.com, stefano.stabellini@citrix.com
Subject: Re: [PATCH v3 2/3] xen/arm: Add p2m_ipa_bits
Date: Thu, 30 Apr 2015 15:52:20 +0100 [thread overview]
Message-ID: <554241A4.1000806@citrix.com> (raw)
In-Reply-To: <1430394937-29122-3-git-send-email-edgar.iglesias@gmail.com>
Hi Edgar,
On 30/04/15 12:55, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
>
> Export p2m_ipa_bits holding the bit size of IPA addresses used
NIT: I think "addresses" is redundant here. IPA always has the word
"address" in it
> in p2m tables.
>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> ---
> xen/arch/arm/p2m.c | 5 +++++
> xen/include/asm-arm/p2m.h | 3 +++
> 2 files changed, 8 insertions(+)
>
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index 8dfee24..377e5e6 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -27,6 +27,9 @@ static unsigned int __read_mostly p2m_root_level;
>
> #define P2M_ROOT_PAGES (1<<P2M_ROOT_ORDER)
>
> +/* Size of IPA addresses in bits. */
Ditto.
> +unsigned int p2m_ipa_bits;
> +
> static bool_t p2m_valid(lpae_t pte)
> {
> return pte.p2m.valid;
> @@ -1515,6 +1518,7 @@ void __init setup_virt_paging(void)
>
> #ifdef CONFIG_ARM_32
> printk("P2M: 40-bit IPA\n");
> + p2m_ipa_bits = 40;
> val |= VTCR_T0SZ(0x18); /* 40 bit IPA */
> val |= VTCR_SL0(0x1); /* P2M starts at first level */
> #else /* CONFIG_ARM_64 */
> @@ -1557,6 +1561,7 @@ void __init setup_virt_paging(void)
>
> p2m_root_order = pa_range_info[pa_range].root_order;
> p2m_root_level = 2 - pa_range_info[pa_range].sl0;
> + p2m_ipa_bits = 64 - pa_range_info[pa_range].t0sz;
>
> printk("P2M: %d-bit IPA with %d-bit PA\n",
> 64 - pa_range_info[pa_range].t0sz,
> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
> index 341df55..0c808f4 100644
> --- a/xen/include/asm-arm/p2m.h
> +++ b/xen/include/asm-arm/p2m.h
> @@ -10,6 +10,9 @@
>
> #define paddr_bits PADDR_BITS
>
> +/* Holds the bitsize of IPA addresses in p2m tables. */
Same here.
s/bitsize/bit size/?
With thoses changes:
Reviewed-by: Julien Grall <julien.grall@citrix.com>
Regards,
--
Julien Grall
next prev parent reply other threads:[~2015-04-30 14:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 11:55 [PATCH v3 0/3] Set SMMU s2 input-size based on p2m tables Edgar E. Iglesias
2015-04-30 11:55 ` [PATCH v3 1/3] xen/arm: Re-order iommu_setup to after setup_virt_paging Edgar E. Iglesias
2015-04-30 11:55 ` [PATCH v3 2/3] xen/arm: Add p2m_ipa_bits Edgar E. Iglesias
2015-04-30 14:52 ` Julien Grall [this message]
2015-04-30 11:55 ` [PATCH v3 3/3] xen/iommu: arm: Use p2m_ipa_bits as stage2 input size Edgar E. Iglesias
2015-04-30 15:07 ` Julien Grall
2015-05-01 1:39 ` Edgar E. Iglesias
2015-05-01 10:20 ` 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=554241A4.1000806@citrix.com \
--to=julien.grall@citrix.com \
--cc=edgar.iglesias@gmail.com \
--cc=edgar.iglesias@xilinx.com \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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.