diff options
author | Marc Zyngier <maz@kernel.org> | 2020-03-04 20:33:29 +0000 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-03-24 12:15:51 +0000 |
commit | 7bdabad12784cf03d2ba36fc7dec66d4f2bb3174 (patch) | |
tree | 6ff8c01c39816de2fa902156d56c6afb94b85dc8 /arch/arm64/include/asm | |
parent | d9c3872cd2f86b7295446e35b4801270669d2960 (diff) | |
download | linux-7bdabad12784cf03d2ba36fc7dec66d4f2bb3174.tar.bz2 |
KVM: arm64: GICv4.1: Allow non-trapping WFI when using HW SGIs
Just like for VLPIs, it is beneficial to avoid trapping on WFI when the
vcpu is using the GICv4.1 SGIs.
Add such a check to vcpu_clear_wfx_traps().
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20200304203330.4967-23-maz@kernel.org
Diffstat (limited to 'arch/arm64/include/asm')
-rw-r--r-- | arch/arm64/include/asm/kvm_emulate.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h index f658dda12364..a30b4eec7cb4 100644 --- a/arch/arm64/include/asm/kvm_emulate.h +++ b/arch/arm64/include/asm/kvm_emulate.h @@ -89,7 +89,8 @@ static inline unsigned long *vcpu_hcr(struct kvm_vcpu *vcpu) static inline void vcpu_clear_wfx_traps(struct kvm_vcpu *vcpu) { vcpu->arch.hcr_el2 &= ~HCR_TWE; - if (atomic_read(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vlpi_count)) + if (atomic_read(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vlpi_count) || + vcpu->kvm->arch.vgic.nassgireq) vcpu->arch.hcr_el2 &= ~HCR_TWI; else vcpu->arch.hcr_el2 |= HCR_TWI; |