All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: kvmarm@lists.cs.columbia.edu
Cc: kernel-team@android.com, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/4] KVM: arm64: Fixes to early stage-2 fault handling
Date: Wed, 29 Jul 2020 11:28:17 +0100	[thread overview]
Message-ID: <20200729102821.23392-1-will@kernel.org> (raw)

Hi all,

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

  https://lore.kernel.org/r/20200724143506.17772-1-will@kernel.org

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 <james.morse@arm.com>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: kernel-team@android.com

--->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(-)

-- 
2.28.0.rc0.142.g3c755180ce-goog

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will@kernel.org>
To: kvmarm@lists.cs.columbia.edu
Cc: James Morse <james.morse@arm.com>,
	kernel-team@android.com, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Suzuki Poulose <suzuki.poulose@arm.com>
Subject: [PATCH v2 0/4] KVM: arm64: Fixes to early stage-2 fault handling
Date: Wed, 29 Jul 2020 11:28:17 +0100	[thread overview]
Message-ID: <20200729102821.23392-1-will@kernel.org> (raw)

Hi all,

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

  https://lore.kernel.org/r/20200724143506.17772-1-will@kernel.org

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 <james.morse@arm.com>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: kernel-team@android.com

--->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(-)

-- 
2.28.0.rc0.142.g3c755180ce-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2020-07-29 10:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 10:28 Will Deacon [this message]
2020-07-29 10:28 ` [PATCH v2 0/4] KVM: arm64: Fixes to early stage-2 fault handling Will Deacon
2020-07-29 10:28 ` [PATCH v2 1/4] KVM: arm64: Rename kvm_vcpu_dabt_isextabt() Will Deacon
2020-07-29 10:28   ` Will Deacon
2020-07-29 10:28 ` [PATCH v2 2/4] KVM: arm64: Handle data and instruction external aborts the same way Will Deacon
2020-07-29 10:28   ` Will Deacon
2020-07-29 10:28 ` [PATCH v2 3/4] KVM: arm64: Don't skip cache maintenance for read-only memslots Will Deacon
2020-07-29 10:28   ` Will Deacon
2020-07-29 10:28 ` [PATCH v2 4/4] KVM: arm64: Move S1PTW S2 fault logic out of io_mem_abort() Will Deacon
2020-07-29 10:28   ` Will Deacon
2020-07-30 15:06 ` [PATCH v2 0/4] KVM: arm64: Fixes to early stage-2 fault handling Marc Zyngier
2020-07-30 15:06   ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200729102821.23392-1-will@kernel.org \
    --to=will@kernel.org \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.