OSDN Git Service

kvm: arm64: Add helper for loading the stage2 setting for a VM
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 26 Sep 2018 16:32:39 +0000 (17:32 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 1 Oct 2018 12:08:41 +0000 (13:08 +0100)
commit9f98ddd6686cc9469fb73b11ddd403271d65cbdf
treeb5c87f8b5faeaefcf88d2fbfb959ee4776dbdd1c
parent7788a28062aca211979ecd2c334e06e2ef5281cc
kvm: arm64: Add helper for loading the stage2 setting for a VM

We load the stage2 context of a guest for different operations,
including running the guest and tlb maintenance on behalf of the
guest. As of now only the vttbr is private to the guest, but this
is about to change with IPA per VM. Add a helper to load the stage2
configuration for a VM, which could do the right thing with the
future changes.

Cc: Christoffer Dall <cdall@kernel.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/kvm_hyp.h
arch/arm64/kvm/hyp/switch.c
arch/arm64/kvm/hyp/tlb.c