Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2b83133 authored by Dongjiu Geng's avatar Dongjiu Geng Committed by Christoffer Dall
Browse files

KVM: arm/arm64: fix the incompatible matching for external abort



kvm_vcpu_dabt_isextabt() tries to match a full fault syndrome, but
calls kvm_vcpu_trap_get_fault_type() that only returns the fault class,
thus reducing the scope of the check. This doesn't cause any observable
bug yet as we end-up matching a closely related syndrome for which we
return the same value.

Using kvm_vcpu_trap_get_fault() instead fixes it for good.

Signed-off-by: default avatarDongjiu Geng <gengdongjiu@huawei.com>
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent 74a64a98
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -233,7 +233,7 @@ static inline u8 kvm_vcpu_trap_get_fault_type(struct kvm_vcpu *vcpu)


static inline bool kvm_vcpu_dabt_isextabt(struct kvm_vcpu *vcpu)
static inline bool kvm_vcpu_dabt_isextabt(struct kvm_vcpu *vcpu)
{
{
	switch (kvm_vcpu_trap_get_fault_type(vcpu)) {
	switch (kvm_vcpu_trap_get_fault(vcpu)) {
	case FSC_SEA:
	case FSC_SEA:
	case FSC_SEA_TTW0:
	case FSC_SEA_TTW0:
	case FSC_SEA_TTW1:
	case FSC_SEA_TTW1:
+1 −1
Original line number Original line Diff line number Diff line
@@ -240,7 +240,7 @@ static inline u8 kvm_vcpu_trap_get_fault_type(const struct kvm_vcpu *vcpu)


static inline bool kvm_vcpu_dabt_isextabt(const struct kvm_vcpu *vcpu)
static inline bool kvm_vcpu_dabt_isextabt(const struct kvm_vcpu *vcpu)
{
{
	switch (kvm_vcpu_trap_get_fault_type(vcpu)) {
	switch (kvm_vcpu_trap_get_fault(vcpu)) {
	case FSC_SEA:
	case FSC_SEA:
	case FSC_SEA_TTW0:
	case FSC_SEA_TTW0:
	case FSC_SEA_TTW1:
	case FSC_SEA_TTW1: