Commit 8a53b72c authored by Zenghui Yu's avatar Zenghui Yu Committed by Zheng Zengkai
Browse files

KVM: arm64: Fix {fp_asimd,sve}_exit_stat manipulation

virt inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I65EGT


CVE: NA

----------------------------------------------------

Currently fp_asimd_exit_stat is accumulated for *both* FP/ASIMD and SVE
traps so that user can not distinguish between these two via debugfs.

Fix the manipulation for both exception classes.

Signed-off-by: default avatarZenghui Yu <yuzenghui@huawei.com>
Reviewed-by: default avatarKeqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 6c79301e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -223,7 +223,11 @@ static inline bool __hyp_handle_fpsimd(struct kvm_vcpu *vcpu)
	    esr_ec != ESR_ELx_EC_SVE)
		return false;

	if (esr_ec == ESR_ELx_EC_FP_ASIMD)
		vcpu->stat.fp_asimd_exit_stat++;
	else	/* SVE trap */
		vcpu->stat.sve_exit_stat++;

	/* Don't handle SVE traps for non-SVE vcpus here: */
	if (!sve_guest)
		if (esr_ec != ESR_ELx_EC_FP_ASIMD)