Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: arm64: Enable FEAT_{LS64, LS64_V} in the supported guest

Using FEAT_{LS64, LS64_V} instructions in a guest is also controlled
by HCRX_EL2.{EnALS, EnASR}. Enable it if guest has related feature.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Oliver Upton <oupton@kernel.org>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Yicong Yang and committed by
Will Deacon
151b92c9 dea58da4

+6
+6
arch/arm64/include/asm/kvm_emulate.h
··· 695 695 696 696 if (kvm_has_sctlr2(kvm)) 697 697 vcpu->arch.hcrx_el2 |= HCRX_EL2_SCTLR2En; 698 + 699 + if (kvm_has_feat(kvm, ID_AA64ISAR1_EL1, LS64, LS64)) 700 + vcpu->arch.hcrx_el2 |= HCRX_EL2_EnALS; 701 + 702 + if (kvm_has_feat(kvm, ID_AA64ISAR1_EL1, LS64, LS64_V)) 703 + vcpu->arch.hcrx_el2 |= HCRX_EL2_EnASR; 698 704 } 699 705 } 700 706 #endif /* __ARM64_KVM_EMULATE_H__ */