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

Re: [Xen-devel] [PATCH] xen/grant-table: Avoid m2p_override during mapping



On 13/01/14 10:18, Roger Pau Monné wrote:
@@ -958,26 +942,14 @@ int gnttab_unmap_refs(struct gnttab_unmap_grant_ref 
*unmap_ops,
                        set_phys_to_machine(unmap_ops[i].host_addr >> 
PAGE_SHIFT,
                                        INVALID_P2M_ENTRY);
                }
-               return ret;
-       }
-
-       if (!in_interrupt() && paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) {
-               arch_enter_lazy_mmu_mode();
-               lazy = true;
-       }
-
-       for (i = 0; i < count; i++) {
-               ret = m2p_remove_override(pages[i], kmap_ops ?
-                                      &kmap_ops[i] : NULL);
-               if (ret)
-                       goto out;
+       } else {
+               for (i = 0; i < count; i++) {
+                               set_phys_to_machine(page_to_pfn(pages[i]),
+                                                   pages[i]->index);

You seem to relay on page->index containing the old mfn, but I don't see
it being set on gnttab_map_refs (it's only set on m2p_add_override
AFAICT), maybe I'm missing something?

Roger.


Indeed, I'll fix that, and I will also cut the function prototype update out into a separate patch for better readability.

Zoli

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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