All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm64: Work around firmware wongly advertising GICv2 compatibility
@ 2021-01-08 17:12 ` Marc Zyngier
  0 siblings, 0 replies; 16+ messages in thread
From: Marc Zyngier @ 2021-01-08 17:12 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm; +Cc: kernel-team, Ard Biesheuvel

It appears that there is firmware out there that advertise GICv2
compatibility on GICv3, despite the CPUs not being able to actually do
it. That's a bummer, and at best creates unexpected behaviours for the
users. At worse, it will crash the machine. Awesome!

In order to mitigate this issue, try and validate whether we can
actually flip the CPU into supporting MMIO accesses instead of system
registers. If we can't, ignore the compatibility information and
shout. It's not completely foolproof, but it should cover the existing
broken platforms...

The workaround is much bigger than Shameer's initial proposal, but
that's because I wanted to keep it localised to KVM, and not spread
the horror at every level (after all, only KVM is concerned with v2
compat).

Marc Zyngier (2):
  KVM: arm64: Rename __vgic_v3_get_ich_vtr_el2() to
    __vgic_v3_get_gic_config()
  KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3
    compatibility

 arch/arm64/include/asm/kvm_asm.h   |  4 +--
 arch/arm64/kvm/hyp/nvhe/hyp-main.c |  6 ++---
 arch/arm64/kvm/hyp/vgic-v3-sr.c    | 39 ++++++++++++++++++++++++++++--
 arch/arm64/kvm/vgic/vgic-v3.c      | 12 ++++++---
 4 files changed, 51 insertions(+), 10 deletions(-)

-- 
2.29.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-01-11 13:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-08 17:12 [PATCH 0/2] KVM: arm64: Work around firmware wongly advertising GICv2 compatibility Marc Zyngier
2021-01-08 17:12 ` Marc Zyngier
2021-01-08 17:12 ` [PATCH 1/2] KVM: arm64: Rename __vgic_v3_get_ich_vtr_el2() to __vgic_v3_get_gic_config() Marc Zyngier
2021-01-08 17:12   ` Marc Zyngier
2021-01-08 17:12 ` [PATCH 2/2] KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3 compatibility Marc Zyngier
2021-01-08 17:12   ` Marc Zyngier
2021-01-08 17:59   ` Ard Biesheuvel
2021-01-08 17:59     ` Ard Biesheuvel
2021-01-08 18:12     ` Marc Zyngier
2021-01-08 18:12       ` Marc Zyngier
2021-01-08 18:19       ` Ard Biesheuvel
2021-01-08 18:19         ` Ard Biesheuvel
2021-01-11 12:21   ` Shameerali Kolothum Thodi
2021-01-11 12:21     ` Shameerali Kolothum Thodi
2021-01-11 13:20     ` Marc Zyngier
2021-01-11 13:20       ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.