[PATCH v10 06/17] Xen: ARM: Add support for mapping platform device mmio
Shannon Zhao
zhaoshenglong at huawei.com
Wed Apr 6 18:37:01 PDT 2016
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
More information about the linux-arm-kernel
mailing list