[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/arm: map_dev_mmio_region: The iomem permission check should be done on MFN



commit 652a11ee2fa710c05df09b21cfeab6bad94e06cc
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Tue Jun 14 12:50:26 2016 +0100
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Mon Jul 11 18:41:48 2016 +0100

    xen/arm: map_dev_mmio_region: The iomem permission check should be done on 
MFN
    
    The helper iomem_access_permitted expects MFNs in parameters and not
    GNFs. Thankfully only the hardware domain can call this function and
    it will always be with GFNS == MFNs for now.
    
    Also, fix the printf to use the MFN range and not the GFN one.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
    Reviewed-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/p2m.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index aa4e774..0395a40 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -1277,14 +1277,14 @@ int map_dev_mmio_region(struct domain *d,
 {
     int res;
 
-    if ( !(nr && iomem_access_permitted(d, start_gfn, start_gfn + nr - 1)) )
+    if ( !(nr && iomem_access_permitted(d, mfn, mfn + nr - 1)) )
         return 0;
 
     res = map_mmio_regions(d, start_gfn, nr, mfn);
     if ( res < 0 )
     {
         printk(XENLOG_G_ERR "Unable to map [%#lx - %#lx] in Dom%d\n",
-               start_gfn, start_gfn + nr - 1, d->domain_id);
+               mfn, mfn + nr - 1, d->domain_id);
         return res;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.