RE: [PATCH v2 2/2] KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3 compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Marc Zyngier [mailto:maz@xxxxxxxxxx]
> Sent: 15 January 2021 14:15
> To: Ard Biesheuvel <ardb@xxxxxxxxxx>
> Cc: Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>; kvmarm
> <kvmarm@xxxxxxxxxxxxxxxxxxxxx>; Shameerali Kolothum Thodi
> <shameerali.kolothum.thodi@xxxxxxxxxx>; James Morse
> <james.morse@xxxxxxx>; Julien Thierry <julien.thierry.kdev@xxxxxxxxx>;
> Suzuki K Poulose <suzuki.poulose@xxxxxxx>; Android Kernel Team
> <kernel-team@xxxxxxxxxxx>
> Subject: Re: [PATCH v2 2/2] KVM: arm64: Workaround firmware wrongly
> advertising GICv2-on-v3 compatibility
> 
> On 2021-01-15 14:08, Ard Biesheuvel wrote:
> > On Fri, 15 Jan 2021 at 15:03, Marc Zyngier <maz@xxxxxxxxxx> wrote:
> 
> [...]
> 
> >> diff --git a/arch/arm64/kvm/vgic/vgic-v3.c
> >> b/arch/arm64/kvm/vgic/vgic-v3.c index 8e7bf3151057..67b27b47312b
> >> 100644
> >> --- a/arch/arm64/kvm/vgic/vgic-v3.c
> >> +++ b/arch/arm64/kvm/vgic/vgic-v3.c
> >> @@ -584,8 +584,10 @@ early_param("kvm-arm.vgic_v4_enable",
> >> early_gicv4_enable);
> >>  int vgic_v3_probe(const struct gic_kvm_info *info)  {
> >>         u64 ich_vtr_el2 = kvm_call_hyp_ret(__vgic_v3_get_gic_config);
> >> +       bool has_v2;
> >>         int ret;
> >>
> >> +       has_v2 = ich_vtr_el2 >> 63;
> >>         ich_vtr_el2 = (u32)ich_vtr_el2;
> >>
> >>         /*
> >> @@ -605,13 +607,15 @@ int vgic_v3_probe(const struct gic_kvm_info
> >> *info)
> >>                          gicv4_enable ? "en" : "dis");
> >>         }
> >>
> >> +       kvm_vgic_global_state.vcpu_base = 0;
> >> +
> >>         if (!info->vcpu.start) {
> >>                 kvm_info("GICv3: no GICV resource entry\n");
> >> -               kvm_vgic_global_state.vcpu_base = 0;
> >> +       } else if (!has_v2) {
> >> +               pr_warn("CPU interface incapable of MMIO access\n");
> >
> > Could we include FW_BUG here to stress that this is a firmware problem?
> 
> Absolutely! That's what it now looks like:
> 
> [    2.648452] kvm [1]: IPA Size Limit: 40 bits
> [    2.649259] [Firmware Bug]: CPU interface incapable of MMIO access
> [    2.649620] kvm [1]: disabling GICv2 emulation
> [    2.650227] kvm [1]: GIC system register CPU interface enabled
> [    2.652004] kvm [1]: vgic interrupt IRQ9
> [    2.655623] kvm [1]: VHE mode initialized successfully
> 
> Updated version pushed out.

Is there a v3 for this series? I couldn't find one.

Anyways, tested this series on a D06 with faulty firmware and it is working as expected.
FWIW,

   Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@xxxxxxxxxx>

Thanks,
Shameer

> Thanks,
> 
>          M.
> --
> Jazz is not dead. It just smells funny...
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux