[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 04/10] xen/arm: Implement get_maximum_gpfn hypercall for arm
From: Evgeny Fedotov <e.fedotov@xxxxxxxxxxx> 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@xxxxxxxxxxx> --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |