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

Re: [Xen-devel] [PATCH] arm/gic-v3: Fix driver probe fail on GICv4 hardware

Hello Shanker,

Please mention in the title and the commit message that is patch is ACPI only.

On 27/05/16 00:59, Shanker Donthineni wrote:
The current driver probe fails on hardware which has GICv4 version,
even though it is fully compatible to GICv3. This patch fixes the
issue by registering the same probe function for GICv4 hardware.

Signed-off-by: Shanker Donthineni <shankerd@xxxxxxxxxxxxxx>
  xen/arch/arm/gic-v3.c     | 13 +++++++++++++
  xen/include/asm-arm/gic.h |  1 +
  2 files changed, 14 insertions(+)

diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index a095064..594cf6e 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -1604,10 +1604,23 @@ static int __init gicv3_acpi_preinit(const void *data)
      return 0;

+static int __init gicv4_acpi_preinit(const void *data)
+    gicv3_info.hw_version = GIC_V4;

It will crash Xen as soon as DOM0 is created (see the BUG() in arch_domain_create). Please test any patch before sending on the ML.

Anyway, there is no support of GICv4 in Xen. Instead Xen will drive it using the GICv3 driver. So the hardware version should be GIC_V3 here.

+    register_gic_ops(&gicv3_ops);
+    return 0;
          .class_type = ACPI_MADT_GIC_VERSION_V3,
          .init = gicv3_acpi_preinit,
+        .class_type = ACPI_MADT_GIC_VERSION_V4,
+        .init = gicv4_acpi_preinit,

diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
index cd97bb2..5be814a 100644
--- a/xen/include/asm-arm/gic.h
+++ b/xen/include/asm-arm/gic.h
@@ -218,6 +218,7 @@ struct gic_lr {
  enum gic_version {
+    GIC_V4,

  extern enum gic_version gic_hw_version(void);


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.