[PATCH v1 0/2] KVM: arm: nv: fix AT S* behaviour

Volodymyr Babchuk posted 2 patches 1 month, 4 weeks ago
arch/arm64/kvm/at.c       | 4 ++--
arch/arm64/kvm/sys_regs.c | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
[PATCH v1 0/2] KVM: arm: nv: fix AT S* behaviour
Posted by Volodymyr Babchuk 1 month, 4 weeks ago
These two small patches fix bug in AT S12*/AT S1* emulation, which
returned IPA (aka result of S1 translation) regardles of what nested
hypervisor asked.

This was a tricky issue, as it worked for VHE nested hypervisors by
pure chance. These hypervisors require S1 translation only, and they
got it becase KVM tried fast path first, which left correct values in
PAR_EL1 almost by accident.

Also, this worked fine for Xen with Dom0 only, because Dom0 is
identity mapped (IPA=PA). So again, returning result of S1 translation
when emulating AT S12 worked for Dom0.

I stumbled on this issue only when I tried to launch DomU under
Xen. In that case IPA!=PA and we need real S2 translation.

The first patch ensures that nVHE hypevisor will got its S2
translation, the second patch ensures that the hypervisor will really
see result of this translation.

Volodymyr Babchuk (2):
  KVM: arm64: nv: fix S2 translation for nVHE guests
  KVM: arm64: nv: update CPU register PAR_EL1 after 'at s*'

 arch/arm64/kvm/at.c       | 4 ++--
 arch/arm64/kvm/sys_regs.c | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

-- 
2.50.1