• J
    KVM: arm64: Abstract the size of the HYP vectors pre-amble · 3dbf100b
    James Morse 提交于
    The EL2 vector hardening feature causes KVM to generate vectors for
    each type of CPU present in the system. The generated sequences already
    do some of the early guest-exit work (i.e. saving registers). To avoid
    duplication the generated vectors branch to the original vector just
    after the preamble. This size is hard coded.
    
    Adding new instructions to the HYP vector causes strange side effects,
    which are difficult to debug as the affected code is patched in at
    runtime.
    
    Add KVM_VECTOR_PREAMBLE to tell kvm_patch_vector_branch() how big
    the preamble is. The valid_vect macro can then validate this at
    build time.
    Reviewed-by: NJulien Thierry <julien.thierry@arm.com>
    Signed-off-by: NJames Morse <james.morse@arm.com>
    Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
    3dbf100b
va_layout.c 5.3 KB