Re: [PATCH 03/18] arm64: hyp-stub: Move elx_sync into the vectors
From: Pavel Tatashin <pasha.tatashin@soleen.com>
Date: 2021-06-08 17:46:50
Also in:
kexec, linux-mm, lkml
From: Pavel Tatashin <pasha.tatashin@soleen.com>
Date: 2021-06-08 17:46:50
Also in:
kexec, linux-mm, lkml
On Tue, Jun 1, 2021 at 9:18 PM Pavel Tatashin [off-list ref] wrote:
quoted
quoted
It cannot call mutate_to_vhe because #HVC_VHE_RESTART is not used here. But, if it had to it would not work as we cannot return to the old kernel text after relocation.OK, so you are happy with having a dangling branch pointing to nowhere? Something in me screams that it isn't a good idea, in general. If HVC_SOFT_RESTART is all you need, I'd rather you have a small stub that implements exactly that and nothing else. Feel free to extract it as a reusable macro if you want.
Using macro won't help here to save kernel text. Optimally, we would want to use only one vector table to reduce kernel text memory usage. I could do that by overwriting sync entries in trans_pgd_copy_el2_vectors(). But, that would be ugly, as I would need to have some specific assumptions about what entries need to be overwritten. Therefore, I decided to move the vector table that we currently have in hibernate code, and make it common between kexec and hibernate; trans_pgd_copy_el2_vectors() will use that table's body to create copies. Thanks, Pasha _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel