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
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
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.gr...@arm.com>
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 <sstabell...@kernel.org>
Xen-devel mailing list