]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Install stage-2 translation before enabling traps
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 6 Dec 2018 17:31:21 +0000 (17:31 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 10 Dec 2018 11:58:48 +0000 (11:58 +0000)
commitfadc9bc672a14963d14e87a186d22bd012abc0da
tree53f157cbbb7830b1a09fef9cab3eb2deb43428a2
parentd1fea056cbaaa20ce3b606a03a24070a232f6385
arm64: KVM: Install stage-2 translation before enabling traps

It is a bit odd that we only install stage-2 translation after having
cleared HCR_EL2.TGE, which means that there is a window during which
AT requests could fail as stage-2 is not configured yet.

Let's move stage-2 configuration before we clear TGE, making the
guest entry sequence clearer: we first configure all the guest stuff,
then only switch to the guest translation regime.

While we're at it, do the same thing for !VHE. It doesn't hurt,
and keeps things symmetric.

Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kvm/hyp/switch.c