]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: Implement domain_get_maximum_gpfn
authorJulien Grall <julien.grall@linaro.org>
Mon, 20 Apr 2015 15:06:21 +0000 (17:06 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 22 Apr 2015 13:08:10 +0000 (14:08 +0100)
The function domain_get_maximum_gpfn is returning the maximum gpfn ever
mapped in the guest. We can use d->arch.p2m.max_mapped_gfn for this purpose.

We use this in xenaccess as to avoid the user attempting to set page
permissions on pages which don't exist for the domain, as a non-arch specific
sanity check.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/mm.c

index 11a0be84c8f103bf6a0444ae9c0e2e6e1ca92b2f..a91ea774f1f9b18f7855ae0ee3e13a9d00271a67 100644 (file)
@@ -996,7 +996,7 @@ int page_is_ram_type(unsigned long mfn, unsigned long mem_type)
 
 unsigned long domain_get_maximum_gpfn(struct domain *d)
 {
-    return -ENOSYS;
+    return d->arch.p2m.max_mapped_gfn;
 }
 
 void share_xen_page_with_guest(struct page_info *page,