OSDN Git Service

KVM: arm64: nVHE: Use separate vector for the host
authorAndrew Scull <ascull@google.com>
Tue, 15 Sep 2020 10:46:30 +0000 (11:46 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 15 Sep 2020 17:39:02 +0000 (18:39 +0100)
commit6e3bfbb22c51bd1f121ca5c4bce6b51dc6cdceae
tree6495478f83b99802268e556ba94edca89f3decde
parenta0e479523e3fb4fa52c351cc4906f38097de789a
KVM: arm64: nVHE: Use separate vector for the host

The host is treated differently from the guests when an exception is
taken so introduce a separate vector that is specialized for the host.
This also allows the nVHE specific code to move out of hyp-entry.S and
into nvhe/host.S.

The host is only expected to make HVC calls and anything else is
considered invalid and results in a panic.

Hyp initialization is now passed the vector that is used for the host
and it is swapped for the guest vector during the context switch.

Signed-off-by: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200915104643.2543892-7-ascull@google.com
arch/arm64/include/asm/kvm_asm.h
arch/arm64/kernel/image-vars.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/hyp-entry.S
arch/arm64/kvm/hyp/nvhe/Makefile
arch/arm64/kvm/hyp/nvhe/host.S [new file with mode: 0644]
arch/arm64/kvm/hyp/nvhe/switch.c