Re: [PATCH 3/3] KVM: arm/arm64: correct AArch32 SPSR on exception entry

2019-12-27 Thread Alexandru Elisei
Hi, On 12/20/19 3:05 PM, Mark Rutland wrote: > Confusingly, there are three SPSR layouts that a kernel may need to deal > with: > > (1) An AArch64 SPSR_ELx view of an AArch64 pstate > (2) An AArch64 SPSR_ELx view of an AArch32 pstate > (3) An AArch32 SPSR_* view of an AArch32 pstate > > When the

Re: [PATCH 2/3] KVM: arm/arm64: correct CPSR on exception entry

2019-12-27 Thread Alexandru Elisei
Hi, On 12/20/19 3:05 PM, Mark Rutland wrote: > When KVM injects an exception into a guest, it generates the CPSR value > from scratch, configuring CPSR.{M,A,I,T,E}, and setting all other > bits to zero. > > This isn't correct, as the architecture specifies that some CPSR bits > are

Re: [PATCH 1/3] KVM: arm64: correct PSTATE on exception entry

2019-12-27 Thread Alexandru Elisei
Hi, On 12/20/19 3:05 PM, Mark Rutland wrote: > When KVM injects an exception into a guest, it generates the PSTATE > value from scratch, configuring PSTATE.{M[4:0],DAIF}, and setting all > other bits to zero. > > This isn't correct, as the architecture specifies that some PSTATE bits > are

Re: [PATCH] arm64: kvm: fix IDMAP overlap with HYP VA

2019-12-27 Thread Russell King - ARM Linux admin
On Fri, Dec 27, 2019 at 11:47:35AM +, Russell King wrote: > Booting 5.4 on LX2160A reveals that KVM is non-functional: > > kvm: Limiting the IPA size due to kernel Virtual Address limit > kvm [1]: IPA Size Limit: 43bits > kvm [1]: IDMAP intersecting with HYP VA, unable to continue > kvm [1]:

[PATCH] arm64: kvm: fix IDMAP overlap with HYP VA

2019-12-27 Thread Russell King
Booting 5.4 on LX2160A reveals that KVM is non-functional: kvm: Limiting the IPA size due to kernel Virtual Address limit kvm [1]: IPA Size Limit: 43bits kvm [1]: IDMAP intersecting with HYP VA, unable to continue kvm [1]: error initializing Hyp mode: -22 Debugging shows: kvm [1]: IDMAP page: