On 2016/4/6 20:16, Julien Grall wrote: >> + gpfns[j] = XEN_PFN_DOWN(r->start) + j; >> + idxs[j] = XEN_PFN_DOWN(r->start) + j; >> + } >> + >> + xatp.domid = DOMID_SELF; >> + xatp.size = nr; >> + xatp.space = XENMAPSPACE_dev_mmio; >> + >> + set_xen_guest_handle(xatp.gpfns, gpfns); >> + set_xen_guest_handle(xatp.idxs, idxs); >> + set_xen_guest_handle(xatp.errs, errs); >> + >> + rc = HYPERVISOR_memory_op(XENMEM_add_to_physmap_range, &xatp); >> + kfree(gpfns); >> + kfree(idxs); >> + kfree(errs); >> + if (rc) >> + return rc; > > Shouldn't we redo the mapping if the hypercall fails? Hmm, why? If it fails again when we redo the mapping, what should we do then? Redo again? I think if it fails at the first time it will always fail no matter how many times we do. Thanks, -- Shannon -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html