All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: Change back kvm fault condition to translation
@ 2024-03-18 10:02 Wujie Duan
  2024-03-18 10:17 ` Marc Zyngier
  2024-03-26 13:48 ` (subset) " Oliver Upton
  0 siblings, 2 replies; 6+ messages in thread
From: Wujie Duan @ 2024-03-18 10:02 UTC (permalink / raw)
  To: maz
  Cc: oliver.upton, james.morse, suzuki.poulose, yuzenghui, kvmarm,
	Wujie Duan

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-26 13:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 10:02 [PATCH] KVM: arm64: Change back kvm fault condition to translation Wujie Duan
2024-03-18 10:17 ` Marc Zyngier
2024-03-18 10:31   ` Zenghui Yu
2024-03-18 17:22   ` Oliver Upton
2024-03-18 17:43     ` Marc Zyngier
2024-03-26 13:48 ` (subset) " Oliver Upton

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.