From: Wei Huang <w1.huang@samsung.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com,
julien.grall@linaro.org, jaeyong.yoo@samsung.com,
xen-devel@lists.xen.org, yjhyun.yoo@samsung.com
Subject: Re: [PATCH 2/6] xen/arm: implement get_maximum_gpfn hypercall
Date: Thu, 10 Apr 2014 16:54:27 -0500 [thread overview]
Message-ID: <53471313.3090001@samsung.com> (raw)
In-Reply-To: <5346D4A1.5030909@citrix.com>
On 04/10/2014 12:28 PM, Andrew Cooper wrote:
> On 10/04/14 17:48, 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>
>
> Common implementation and a specific arch_get_maximum_gpfn() ?
>
> ~Andrew
Yes, will do.
>
>> ---
>> 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);
>> +}
>> +
>> /*
>> * Local variables:
>> * mode: C
>> diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h
>> index b8d4e7d..341493a 100644
>> --- a/xen/include/asm-arm/mm.h
>> +++ b/xen/include/asm-arm/mm.h
>> @@ -341,6 +341,8 @@ static inline void put_page_and_type(struct page_info *page)
>> put_page(page);
>> }
>>
>> +void get_gma_start_end(struct domain *d, paddr_t *start, paddr_t *end);
>> +
>> #endif /* __ARCH_ARM_MM__ */
>> /*
>> * Local variables:
>
>
next prev parent reply other threads:[~2014-04-10 21:54 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 [this message]
2014-04-11 13:17 ` Julien Grall
2014-04-11 13:15 ` Julien Grall
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=53471313.3090001@samsung.com \
--to=w1.huang@samsung.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=jaeyong.yoo@samsung.com \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@eu.citrix.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.