KVM ARM Archive mirror
 help / color / mirror / Atom feed
From: Wujie Duan <wjduan@linx-info.com>
To: maz@kernel.org
Cc: oliver.upton@linux.dev, james.morse@arm.com,
	suzuki.poulose@arm.com, yuzenghui@huawei.com,
	kvmarm@lists.linux.dev, Wujie Duan <wjduan@linx-info.com>
Subject: [PATCH] Change back kvm fault condition to translation
Date: Mon, 18 Mar 2024 18:01:34 +0800	[thread overview]
Message-ID: <20240318100134.220808-1-wjduan@linx-info.com> (raw)

KVM: arm64: Condition should be esr_fsc_is_translation_fault

In commit '11e5ea5242e3 ("KVM: arm64: Use helpers to
        classify exception types reported via ESR")'
the KVM code was optimized, but the code logic was incorrectly modified.
Therefore, it is being corrected.

Signed-off-by: Wujie Duan <wjduan@linx-info.com>
---
 arch/arm64/kvm/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index 18680771cdb0..dc04bc767865 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -1637,7 +1637,7 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu)
 	fault_ipa = kvm_vcpu_get_fault_ipa(vcpu);
 	is_iabt = kvm_vcpu_trap_is_iabt(vcpu);
 
-	if (esr_fsc_is_permission_fault(esr)) {
+	if (esr_fsc_is_translation_fault(esr)) {
 		/* Beyond sanitised PARange (which is the IPA limit) */
 		if (fault_ipa >= BIT_ULL(get_kvm_ipa_limit())) {
 			kvm_inject_size_fault(vcpu);
-- 
2.40.1


             reply	other threads:[~2024-03-18 10:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 10:01 Wujie Duan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-18 10:00 [PATCH] Change back kvm fault condition to translation Wujie Duan
2024-03-18  9:47 Wujie Duan
     [not found] <20240318053708.192770-1-wjduan@linx-info.com>
     [not found] ` <865xxj29n8.wl-maz@kernel.org>
2024-03-18  9:33   ` Zenghui Yu

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=20240318100134.220808-1-wjduan@linx-info.com \
    --to=wjduan@linx-info.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).