Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1373004

Re: [PATCH v10 06/17] Xen: ARM: Add support for mapping platform device mmio

From Shannon Zhao <zhaoshenglong@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH v10 06/17] Xen: ARM: Add support for mapping platform device mmio
Date 2016-04-07 03:40 +0200
Message-ID <rl75n-4vo-3@gated-at.bofh.it> (permalink)
References <rj9uF-6rC-1@gated-at.bofh.it> <rj9Eo-6vF-27@gated-at.bofh.it> <rkUBb-3Dr-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v10 06/17] Xen: ARM: Add support for mapping platform  device mmio Julien Grall <julien.grall@arm.com> - 2016-04-06 14:20 +0200
  Re: [PATCH v10 06/17] Xen: ARM: Add support for mapping platform  device mmio Shannon Zhao <zhaoshenglong@huawei.com> - 2016-04-07 03:40 +0200
    Re: [PATCH v10 06/17] Xen: ARM: Add support for mapping platform  device mmio Julien Grall <julien.grall@arm.com> - 2016-04-07 12:40 +0200
      Re: [PATCH v10 06/17] Xen: ARM: Add support for mapping platform  device mmio Shannon Zhao <zhaoshenglong@huawei.com> - 2016-04-07 13:30 +0200

csiph-web