From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>,
Ian Campbell <ian.campbell@citirx.com>,
tim@xen.org, vijay.kilari@gmail.com,
stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH RFC 1/9] xen: arm: rename p2m->first_level to p2m->root.
Date: Wed, 30 Jul 2014 17:06:52 +0100 [thread overview]
Message-ID: <53D9181C.40505@linaro.org> (raw)
In-Reply-To: <3ef2b68c511f3e31de409b76757b95c78b99d750.1406728037.git.ian.campbell@citrix.com>
Hi Ian,
On 07/30/2014 02:47 PM, Ian Campbell wrote:
> From: Ian Campbell <ian.campbell@citirx.com>
>
> This was previously part of Vigaya's "xen/arm: Add 4-level page table
> for stage 2 translation" but is split out here to make that patch
> easier to read. I also switched from ->root_level to just ->root.
The last sentence doesn't seem to be relevant. At least I don't find any
such change in the patch.
Regards,
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> ---
> xen/arch/arm/p2m.c | 24 ++++++++++++------------
> xen/drivers/passthrough/arm/smmu.c | 2 +-
> xen/include/asm-arm/p2m.h | 2 +-
> 3 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index 143199b..61958ba 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -12,8 +12,8 @@
> #include <asm/page.h>
>
> /* First level P2M is 2 consecutive pages */
> -#define P2M_FIRST_ORDER 1
> -#define P2M_FIRST_ENTRIES (LPAE_ENTRIES<<P2M_FIRST_ORDER)
> +#define P2M_ROOT_ORDER 1
> +#define P2M_ROOT_ENTRIES (LPAE_ENTRIES<<P2M_ROOT_ORDER)
>
> static bool_t p2m_valid(lpae_t pte)
> {
> @@ -61,9 +61,9 @@ void dump_p2m_lookup(struct domain *d, paddr_t addr)
> }
>
> printk("P2M @ %p mfn:0x%lx\n",
> - p2m->first_level, page_to_mfn(p2m->first_level));
> + p2m->root, page_to_mfn(p2m->root));
>
> - first = __map_domain_page(p2m->first_level);
> + first = __map_domain_page(p2m->root);
> dump_pt_walk(first, addr);
> unmap_domain_page(first);
> }
> @@ -137,10 +137,10 @@ static lpae_t *p2m_map_first(struct p2m_domain *p2m, paddr_t addr)
> {
> struct page_info *page;
>
> - if ( first_linear_offset(addr) >= P2M_FIRST_ENTRIES )
> + if ( first_linear_offset(addr) >= P2M_ROOT_ENTRIES )
> return NULL;
>
> - page = p2m->first_level + p2m_first_level_index(addr);
> + page = p2m->root + p2m_first_level_index(addr);
>
> return __map_domain_page(page);
> }
> @@ -879,7 +879,7 @@ int p2m_alloc_table(struct domain *d)
> struct p2m_domain *p2m = &d->arch.p2m;
> struct page_info *page;
>
> - page = alloc_domheap_pages(NULL, P2M_FIRST_ORDER, 0);
> + page = alloc_domheap_pages(NULL, P2M_ROOT_ORDER, 0);
> if ( page == NULL )
> return -ENOMEM;
>
> @@ -889,9 +889,9 @@ int p2m_alloc_table(struct domain *d)
> clear_and_clean_page(page);
> clear_and_clean_page(page + 1);
>
> - p2m->first_level = page;
> + p2m->root = page;
>
> - d->arch.vttbr = page_to_maddr(p2m->first_level)
> + d->arch.vttbr = page_to_maddr(p2m->root)
> | ((uint64_t)p2m->vmid&0xff)<<48;
>
> /* Make sure that all TLBs corresponding to the new VMID are flushed
> @@ -968,9 +968,9 @@ void p2m_teardown(struct domain *d)
> while ( (pg = page_list_remove_head(&p2m->pages)) )
> free_domheap_page(pg);
>
> - free_domheap_pages(p2m->first_level, P2M_FIRST_ORDER);
> + free_domheap_pages(p2m->root, P2M_ROOT_ORDER);
>
> - p2m->first_level = NULL;
> + p2m->root = NULL;
>
> p2m_free_vmid(d);
>
> @@ -994,7 +994,7 @@ int p2m_init(struct domain *d)
>
> d->arch.vttbr = 0;
>
> - p2m->first_level = NULL;
> + p2m->root = NULL;
>
> p2m->max_mapped_gfn = 0;
> p2m->lowest_mapped_gfn = ULONG_MAX;
> diff --git a/xen/drivers/passthrough/arm/smmu.c b/xen/drivers/passthrough/arm/smmu.c
> index f4eb2a2..42bde75 100644
> --- a/xen/drivers/passthrough/arm/smmu.c
> +++ b/xen/drivers/passthrough/arm/smmu.c
> @@ -937,7 +937,7 @@ static void arm_smmu_init_context_bank(struct arm_smmu_domain_cfg *cfg)
> paddr_t p2maddr;
>
> ASSERT(cfg->domain != NULL);
> - p2maddr = page_to_maddr(cfg->domain->arch.p2m.first_level);
> + p2maddr = page_to_maddr(cfg->domain->arch.p2m.root);
>
> gr1_base = SMMU_GR1(smmu);
> cb_base = SMMU_CB_BASE(smmu) + SMMU_CB(smmu, cfg->cbndx);
> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
> index 06c93a0..cfd0c52 100644
> --- a/xen/include/asm-arm/p2m.h
> +++ b/xen/include/asm-arm/p2m.h
> @@ -14,7 +14,7 @@ struct p2m_domain {
> struct page_list_head pages;
>
> /* Root of p2m page tables, 2 contiguous pages */
> - struct page_info *first_level;
> + struct page_info *root;
>
> /* Current VMID in use */
> uint8_t vmid;
>
--
Julien Grall
next prev parent reply other threads:[~2014-07-30 16:06 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 13:44 [PATCH RFC 0/9] xen: arm: support for > 40-bit physical addressing Ian Campbell
2014-07-30 13:47 ` [PATCH RFC 1/9] xen: arm: rename p2m->first_level to p2m->root Ian Campbell
2014-07-30 13:47 ` [PATCH RFC 2/9] xen: arm: Implement variable levels in dump_pt_walk Ian Campbell
2014-07-30 16:40 ` Julien Grall
2014-07-30 13:47 ` [PATCH RFC 3/9] xen: arm: handle concatenated root tables " Ian Campbell
2014-07-30 16:58 ` Julien Grall
2014-09-04 14:40 ` Ian Campbell
2014-09-08 20:54 ` Julien Grall
2014-07-30 13:47 ` [PATCH RFC 4/9] xen: arm: move setup_virt_paging to p2m.c Ian Campbell
2014-07-30 17:00 ` Julien Grall
2014-07-30 13:47 ` [PATCH RFC 5/9] xen: arm: Defer setting of VTCR_EL2 until after CPUs are up Ian Campbell
2014-07-30 17:11 ` Julien Grall
2014-09-04 14:50 ` Ian Campbell
2014-07-30 13:47 ` [PATCH RFC 6/9] xen: arm: handle variable p2m levels in p2m_lookup Ian Campbell
2014-07-31 11:14 ` Julien Grall
2014-09-04 14:54 ` Ian Campbell
2014-07-30 13:47 ` [PATCH RFC 7/9] xen: arm: handle variable p2m levels in apply_p2m_changes Ian Campbell
2014-07-31 15:38 ` Julien Grall
2014-08-11 7:00 ` Vijay Kilari
2014-08-26 9:11 ` Vijay Kilari
2014-09-04 14:01 ` Ian Campbell
2014-07-30 13:47 ` [PATCH RFC 8/9] xen: arm: support for up to 48-bit physical addressing on arm64 Ian Campbell
2014-08-07 15:33 ` Julien Grall
2014-07-30 13:47 ` [PATCH RFC 9/9] xen: arm: support for up to 48-bit IPA " Ian Campbell
2014-08-07 15:49 ` Julien Grall
2014-07-30 16:06 ` Julien Grall [this message]
2014-07-30 16:19 ` [PATCH RFC 1/9] xen: arm: rename p2m->first_level to p2m->root Ian Campbell
2014-07-30 16:23 ` Julien Grall
2014-07-31 8:22 ` [PATCH RFC 0/9] xen: arm: support for > 40-bit physical addressing Vijay Kilari
2014-07-31 8:54 ` Ian Campbell
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=53D9181C.40505@linaro.org \
--to=julien.grall@linaro.org \
--cc=Vijaya.Kumar@caviumnetworks.com \
--cc=ian.campbell@citirx.com \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=vijay.kilari@gmail.com \
--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.