From: Julien Grall <julien.grall@linaro.org>
To: Wei Huang <w1.huang@samsung.com>
Cc: stefano.stabellini@eu.citrix.com, yjhyun.yoo@samsung.com,
ian.campbell@citrix.com, jaeyong.yoo@samsung.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH 2/6] xen/arm: implement get_maximum_gpfn hypercall
Date: Fri, 11 Apr 2014 14:15:21 +0100 [thread overview]
Message-ID: <5347EAE9.2010808@linaro.org> (raw)
In-Reply-To: <1397148539-19084-3-git-send-email-w1.huang@samsung.com>
Hello Wei,
On 04/10/2014 05:48 PM, Wei Huang wrote:
> From: Jaeyong Yoo <jaeyong.yoo@samsung.com>
>
> This patchi implements get_maximum_gpfn by using the memory map
> info in arch_domain (from set_memory_map hypercall).
>
> Signed-off-by: Evgeny Fedotov <e.fedotov@samsung.com>
> ---
> xen/arch/arm/mm.c | 19 ++++++++++++++++++-
> xen/include/asm-arm/mm.h | 2 ++
> 2 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index 362bc8d..14b4686 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -947,7 +947,11 @@ int page_is_ram_type(unsigned long mfn, unsigned long mem_type)
>
> unsigned long domain_get_maximum_gpfn(struct domain *d)
> {
> - return -ENOSYS;
> + paddr_t end;
> +
> + get_gma_start_end(d, NULL, &end);
> +
> + return (unsigned long) (end >> PAGE_SHIFT);
> }
> void share_xen_page_with_guest(struct page_info *page,
> @@ -1235,6 +1239,19 @@ int is_iomem_page(unsigned long mfn)
> return 1;
> return 0;
> }
> +
> +/*
> + * Return start and end addresses of guest
> + */
> +void get_gma_start_end(struct domain *d, paddr_t *start, paddr_t *end)
> +{
> + if ( start )
> + *start = GUEST_RAM_BASE;
> +
> + if ( end )
> + *end = GUEST_RAM_BASE + ((paddr_t) d->max_pages << PAGE_SHIFT);
> +}
> +
Ian plans to add multiple banks support for the guest very soon. This
solution will stop to work.
Late december, we've introduce max_mapped_pfn for ARM which give the
maximum pfn mapped in the guest.
Would it suit for your purpose? FYI x86 uses a similar solution.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-04-11 13:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 16:48 [PATCH 0/6] xen/arm: Xen save/restore/live migration support Wei Huang
2014-04-10 16:48 ` [PATCH 1/6] xen/arm: Save and restore support for hvm context hypercall Wei Huang
2014-04-10 17:26 ` Andrew Cooper
2014-04-10 21:53 ` Wei Huang
2014-04-11 13:57 ` Julien Grall
2014-04-10 16:48 ` [PATCH 2/6] xen/arm: implement get_maximum_gpfn hypercall Wei Huang
2014-04-10 17:28 ` Andrew Cooper
2014-04-10 21:54 ` Wei Huang
2014-04-11 13:17 ` Julien Grall
2014-04-11 13:15 ` Julien Grall [this message]
2014-04-10 16:48 ` [PATCH 3/6] xen/arm: Implement do_suspend function Wei Huang
2014-04-11 14:10 ` Julien Grall
2014-04-10 16:48 ` [PATCH 4/6] xen/arm: Implement VLPT for guest p2m mapping in live migration Wei Huang
2014-04-10 16:48 ` [PATCH 5/6] xen/arm: Implement hypercall for dirty page tracing Wei Huang
2014-04-10 16:48 ` [PATCH 6/6] xen/arm: Implement toolstack for xl restore/save and migrate Wei Huang
2014-04-11 14:15 ` [PATCH 0/6] xen/arm: Xen save/restore/live migration support Julien Grall
2014-04-11 14:22 ` Wei Huang
2014-04-11 14:33 ` Julien Grall
2014-04-11 15:36 ` Wei Huang
2014-04-11 15:53 ` Julien Grall
2014-04-11 16:15 ` Wei Huang
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=5347EAE9.2010808@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=jaeyong.yoo@samsung.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=w1.huang@samsung.com \
--cc=xen-devel@lists.xen.org \
--cc=yjhyun.yoo@samsung.com \
/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.