[PATCH OLK-6.6] KVM: arm64: Check whether GICv4.0 is enabled

virt inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9KBKD ------------------------------------------------------------------ Check whether GICv4.0 is enabled. Only when GICv4.0 is enabled, then limit the number of vlpis to 4096. Fixes: 12e11032205e ("irqchip: gicv3: Add workaround for hip09 erratum 162200803") Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by: Jian Cai <caijian11@h-partners.com> --- arch/arm64/kvm/vgic/vgic-mmio-v3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/vgic/vgic-mmio-v3.c b/arch/arm64/kvm/vgic/vgic-mmio-v3.c index 961c3a79f41d..f9f47c91ee03 100644 --- a/arch/arm64/kvm/vgic/vgic-mmio-v3.c +++ b/arch/arm64/kvm/vgic/vgic-mmio-v3.c @@ -84,9 +84,11 @@ static unsigned long vgic_mmio_read_v3_misc(struct kvm_vcpu *vcpu, value |= (INTERRUPT_ID_BITS_ITS - 1) << 19; value |= GICD_TYPER_LPIS; /* Limit the number of vlpis to 4096 */ - if (kvm_vgic_global_state.flags & FLAGS_WORKAROUND_HIP10_ERRATUM_162200803) + if (kvm_vgic_global_state.has_gicv4 && + !kvm_vgic_global_state.has_gicv4_1 && + kvm_vgic_global_state.flags & + FLAGS_WORKAROUND_HIP10_ERRATUM_162200803) value |= 11 << GICD_TYPER_NUM_LPIS_SHIFT; - } else { value |= (INTERRUPT_ID_BITS_SPIS - 1) << 19; } -- 2.33.0

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/16696 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/ACQ... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/16696 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/ACQ...
participants (2)
-
patchwork bot
-
Zhou Wang