KVM: arm64: Make indirect vectors preamble behaviour symmetric
authorJames Morse <james.morse@arm.com>
Tue, 18 Jun 2019 15:17:35 +0000 (16:17 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 5 Jul 2019 12:03:29 +0000 (13:03 +0100)
commit5d994374e872bef1bba25c80950af6a77ea470e1
treebb9bd1f1f0ad323a6c6aaa5d3652b73effc917d9
parent3dbf100b0b10e91d65bd83b91cee3ef61f1b96c4
KVM: arm64: Make indirect vectors preamble behaviour symmetric

The KVM indirect vectors support is a little complicated. Different CPUs
may use different exception vectors for KVM that are generated at boot.
Adding new instructions involves checking all the possible combinations
do the right thing.

To make changes here easier to review lets state what we expect of the
preamble:
  1. The first vector run, must always run the preamble.
  2. Patching the head or tail of the vector shouldn't remove
     preamble instructions.

Today, this is easy as we only have one instruction in the preamble.
Change the unpatched tail of the indirect vector so that it always
runs this, regardless of patching.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/kvm/hyp/hyp-entry.S