xen/arm: domheap mappings can have avail > 0
We use 2 MB slots to map domain pages. As a consequence one slot can be used for more than one 4k page mapping.
Change the ASSERT to reflect that.
xen/arch/arm/mm.c +2 -2
@@ -216,7 +216,7 @@ void unmap_domain_page(const void *va)local_irq_save (flags);ASSERT (slot >=0 && slot <DOMHEAP_ENTRIES ); -ASSERT (map[slot].pt.avail !=0 ); +ASSERT (map[slot].pt.avail >0 ); map[slot].pt.avail--;
@@ -230,7 +230,7 @@ unsigned long domain_page_map_to_mfn(const void *va)unsigned long offset = ((unsigned long )va>>THIRD_SHIFT ) &LPAE_ENTRY_MASK ;ASSERT (slot >=0 && slot <DOMHEAP_ENTRIES ); -ASSERT (map[slot].pt.avail !=0 ); +ASSERT (map[slot].pt.avail >0 );return map[slot].pt.base + offset; }
Quoted 4 lines · Stefano Stabellini
We use 2 MB slots to map domain pages. As a consequence one slot can be used for more than one 4k page mapping.
Change the ASSERT to reflect that.
But it already does -- AFAICT this patch has no effect.
Tim.
Quoted 29 lines
Signed-off-by Stefano Stabellini <[email protected]>xen/arch/arm/mm.c +2
-2@@ -216,7 +216,7 @@ void unmap_domain_page(const void *va)local_irq_save (flags);ASSERT (slot >=0 && slot <DOMHEAP_ENTRIES ); -ASSERT (map[slot].pt.avail !=0 ); +ASSERT (map[slot].pt.avail >0 ); map[slot].pt.avail--;@@ -230,7 +230,7 @@ unsigned long domain_page_map_to_mfn(const void *va)unsigned long offset = ((unsigned long )va>>THIRD_SHIFT ) &LPAE_ENTRY_MASK ;ASSERT (slot >=0 && slot <DOMHEAP_ENTRIES ); -ASSERT (map[slot].pt.avail !=0 ); +ASSERT (map[slot].pt.avail >0 );return map[slot].pt.base + offset; }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 8 lines · Tim Deegan
Quoted 4 lines · Stefano Stabellini
We use 2 MB slots to map domain pages. As a consequence one slot can be used for more than one 4k page mapping.
Change the ASSERT to reflect that.
But it already does -- AFAICT this patch has no effect.
Yes, you are right, sorry
Quoted 31 lines
Quoted 30 lines
Signed-off-by Stefano Stabellini <[email protected]>xen/arch/arm/mm.c +2
-2@@ -216,7 +216,7 @@ void unmap_domain_page(const void *va)local_irq_save (flags);ASSERT (slot >=0 && slot <DOMHEAP_ENTRIES ); -ASSERT (map[slot].pt.avail !=0 ); +ASSERT (map[slot].pt.avail >0 ); map[slot].pt.avail--;@@ -230,7 +230,7 @@ unsigned long domain_page_map_to_mfn(const void *va)unsigned long offset = ((unsigned long )va>>THIRD_SHIFT ) &LPAE_ENTRY_MASK ;ASSERT (slot >=0 && slot <DOMHEAP_ENTRIES ); -ASSERT (map[slot].pt.avail !=0 ); +ASSERT (map[slot].pt.avail >0 );return map[slot].pt.base + offset; }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel