Re: [PATCH 00/15] Split off nVHE hyp code

From: Marc Zyngier
Date: Thu Apr 30 2020 - 13:53:50 EST


Hi David,

Thanks for posting this, looks quite interesting!

On 2020-04-30 15:48, David Brazdil wrote:
Refactor files in arch/arm64/kvm/hyp to compile all code which runs in EL2
under nVHE into separate object files from the rest of KVM. This is done in
preparation for being able to unmap .hyp.text from EL1 but has other benefits,
notably:
* safe use of KASAN/UBSAN/GCOV instrumentation on VHE code,
* cleaner HVC API,
* no need for __hyp_text annotations.

nVHE-specific code is moved to hyp/nvhe and compiled with custom build rules
similar to those used by EFI stub. Shared source files are compiled under both
VHE and nVHE build rules. Where a source file contained both VHE and nVHE code,
it is split into a shared header file and two C source files. This is done one
file per commit to make review easier.

Do you have any figure on how much bigger the final kernel becomes once this
is applied? I guess I can find out pretty easily, but this is the kind of thing
that would be useful to make part of your cover letter.

I'll try to review this shortly.

Thanks,

M.