[PATCH v10 06/17] Xen: ARM: Add support for mapping platform device mmio
From: Shannon Zhao <hidden>
Date: 2016-04-07 01:37:52
Also in:
linux-devicetree, linux-efi, lkml
From: Shannon Zhao <hidden>
Date: 2016-04-07 01:37:52
Also in:
linux-devicetree, linux-efi, lkml
On 2016/4/6 20:16, Julien Grall wrote:
quoted
+ 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