Skip to content

KVM: arm64: Fixes to early stage-2 fault handling

Will Deacon kvmarm linux-arm-kernel 2 versions – Applied

Status from this message: Applied to kvm-arm64/misc-5.9, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyApplied
  2. v17 patches 8 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: arm64: Rename kvm_vcpu_dabt_isextabt()arch/arm64/include/asm/kvm_emulate.h arch/arm64/kvm/hyp/switch.c arch/arm64/kvm/mmu.c+3 -30 replies
2/4KVM: arm64: Handle data and instruction external aborts the same wayarch/arm64/kvm/mmu.c+3 -60 replies
3/4KVM: arm64: Don't skip cache maintenance for read-only memslotsarch/arm64/kvm/mmu.c+1 -10 replies
4/4KVM: arm64: Move S1PTW S2 fault logic out of io_mem_abort()arch/arm64/kvm/mmio.c arch/arm64/kvm/mmu.c+12 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] KVM: arm64: Fixes to early stage-2 fault handling

Hi all,

This is version two of the patches I posted last week:

https://lore.kernel.org/r/[email protected]

I got my brain in a twist with exactly what is reported in HPFAR for a stage-2 abort on a stage-1 table walk, so I don't think any of these are serious any more.

With these changes, the early stage-2 fault handling follows:

S2 instruction abort:
* Not in memslot, or S2 fault on S1 walk for tables in R/O memslot:
=> inject external iabt to guest

S2 data abort:
* Not in memslot:

    - S2 fault on S1 walk:      inject external dabt to guest
    - Cache maintenance:        skip instr
    - Syndrome valid            EXIT_MMIO
    - Syndrome invalid          EXIT_NISV

* Write fault in R/O memslot:
- S2 fault on S1 walk: inject external dabt to guest
- Access is write:
- Syndrome valid EXIT_MMIO
- Syndrome invalid EXIT_NISV (includes cache maintenance)

Everything else gets handled by handle_access_fault()/user_mem_abort().

Will

Cc James Morse <[email protected]>
Cc Suzuki Poulose <[email protected]>

--->8

Will Deacon (4):
KVM: arm64: Rename kvm_vcpu_dabt_isextabt()
KVM: arm64: Handle data and instruction external aborts the same way
KVM: arm64: Don't skip cache maintenance for read-only memslots
KVM: arm64: Move S1PTW S2 fault logic out of io_mem_abort()

 arch/arm64/include/asm/kvm_emulate.h |  2 +-
 arch/arm64/kvm/hyp/switch.c          |  2 +-
 arch/arm64/kvm/mmio.c                |  6 ------
 arch/arm64/kvm/mmu.c                 | 26 +++++++++++++++++---------
 4 files changed, 19 insertions(+), 17 deletions(-)
Signature · 6 lines
2.28.0.rc0.142.g3c755180ce-goog

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm