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

Re: [Xen-devel] [RFC 20/22] xen/arm: p2m: Re-implement p2m_insert_mapping using p2m_set_entry



Hi Stefano,

On 06/09/2016 19:57, Stefano Stabellini wrote:
On Thu, 28 Jul 2016, Julien Grall wrote:
The function p2m_insert_mapping can be re-implemented using the generic
function p2m_set_entry.

Note that the mapping is not reverted anymore if Xen fails to insert a
mapping. This was added to ensure the MMIO are not kept half-mapped
in case of failure and to follow the x86 counterpart. This was removed
on the x86 part by commit c3c756bd "x86/p2m: use large pages for MMIO
mappings" and I think we should let the caller taking care of it.

Finally drop the operation INSERT in apply_* as nobody is using it
anymore. Note that the functios could have been dropped in one go at the
                           ^ functions

end, however I find easier to drop the operations one by one avoiding a
big deletion in the patch that convert the last operation.

Signed-off-by: Julien Grall <julien.grall@xxxxxxx>

---
    Whilst there is no safety checks on what is replaced in the P2M
    (such as foreign/grant mapping as x86 does), we may want to add it
    ensuring the guest is not doing something dumb. Any opinions?

We don't necessarily need to protect a guest from its own dumbness, as
long as we can correctly deal with it (account for grant and foreign
mappings replaced this way).

I think this could be a good improvement for the future and help debugging potential bug in the guest.

Anyway, it is not strictly necessary today given that all the reference counting should be done properly. I will add it in my todo list.


Given that the old code doesn't do it anyway:

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

Thank you!

Regards,

--
Julien Grall

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

 


Rackspace

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