From: Jaeyong Yoo <jaeyong.yoo@samsung.com>
To: xen-devel@lists.xen.org
Cc: Evgeny Fedotov <e.fedotov@samsung.com>
Subject: [PATCH v3 04/10] xen/arm: Implement get_maximum_gpfn hypercall for arm
Date: Thu, 01 Aug 2013 21:57:47 +0900 [thread overview]
Message-ID: <1375361873-32145-5-git-send-email-jaeyong.yoo@samsung.com> (raw)
In-Reply-To: <1375361873-32145-1-git-send-email-jaeyong.yoo@samsung.com>
From: Evgeny Fedotov <e.fedotov@samsung.com>
By using the memory map info in arch_domain (from set_memory_map hypercall)
implement get_maximum_gpfn hypercall.
Singed-off-by: Evgeny Fedotov <e.fedotov@samsung.com>
---
xen/arch/arm/mm.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 3c83447..9d5d3e0 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -762,7 +762,16 @@ int page_is_ram_type(unsigned long mfn, unsigned long mem_type)
unsigned long domain_get_maximum_gpfn(struct domain *d)
{
- return -ENOSYS;
+ xen_pfn_t max = 0;
+ int nr_banks;
+
+ spin_lock(&d->arch.map_lock);
+ nr_banks = d->arch.map_domain.nr_banks;
+ if ( nr_banks )
+ max = (d->arch.map_domain.bank[nr_banks - 1].start +
+ d->arch.map_domain.bank[nr_banks - 1].size) >> PAGE_SHIFT;
+ spin_unlock(&d->arch.map_lock);
+ return (unsigned long) max;
}
void share_xen_page_with_guest(struct page_info *page,
--
1.8.1.2
next prev parent reply other threads:[~2013-08-01 12:57 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 12:57 [PATCH v3 00/10] xen/arm: live migration support in arndale board Jaeyong Yoo
2013-08-01 12:57 ` [PATCH v3 01/10] xen/arm: Implement hvm save and restore Jaeyong Yoo
2013-08-01 12:57 ` [PATCH v3 02/10] xen/arm: Add more registers for saving and restoring vcpu registers Jaeyong Yoo
2013-08-01 12:57 ` [PATCH v3 03/10] xen/arm: Implement set_memory_map hypercall Jaeyong Yoo
2013-08-01 12:57 ` Jaeyong Yoo [this message]
2013-08-01 12:57 ` [PATCH v3 05/10] xen/arm: Implement modify_returncode Jaeyong Yoo
2013-08-01 12:57 ` [PATCH v3 06/10] xen/arm: Implement virtual-linear page table for guest p2m mapping in live migration Jaeyong Yoo
2013-08-01 12:57 ` [PATCH v3 07/10] xen/arm: Add handling write fault for dirty-page tracing Jaeyong Yoo
2013-08-04 16:27 ` Stefano Stabellini
2013-08-05 0:23 ` Jaeyong Yoo
2013-08-05 11:11 ` Stefano Stabellini
2013-08-05 11:39 ` Jaeyong Yoo
2013-08-05 13:49 ` Stefano Stabellini
2013-08-05 13:52 ` Ian Campbell
2013-08-06 11:56 ` Jaeyong Yoo
2013-08-06 13:17 ` Ian Campbell
2013-08-07 1:24 ` Jaeyong Yoo
2013-08-15 4:24 ` Jaeyong Yoo
2013-08-17 22:16 ` Ian Campbell
2013-08-17 22:21 ` Ian Campbell
2013-08-20 10:15 ` Jaeyong Yoo
2013-08-18 6:39 ` Ian Campbell
2013-08-20 10:19 ` Jaeyong Yoo
2013-08-17 23:51 ` Julien Grall
2013-08-20 10:16 ` Jaeyong Yoo
2013-08-01 12:57 ` [PATCH v3 08/10] xen/arm: Fixing clear_guest_offset macro Jaeyong Yoo
2013-08-01 12:57 ` [PATCH v3 09/10] xen/arm: Implement hypercall for dirty page tracing (shadow op) Jaeyong Yoo
2013-08-01 12:57 ` [PATCH v3 10/10] xen/arm: Implement toolstack for xl restore/save and migrate Jaeyong Yoo
2013-09-25 15:59 ` [PATCH v3 00/10] xen/arm: live migration support in arndale board Ian Campbell
2013-09-26 6:23 ` Jaeyong Yoo
2013-09-26 15:13 ` 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=1375361873-32145-5-git-send-email-jaeyong.yoo@samsung.com \
--to=jaeyong.yoo@samsung.com \
--cc=e.fedotov@samsung.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 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).