Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932457AbcDKOD2 (ORCPT ); Mon, 11 Apr 2016 10:03:28 -0400 Received: from foss.arm.com ([217.140.101.70]:49859 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753939AbcDKODZ (ORCPT ); Mon, 11 Apr 2016 10:03:25 -0400 Subject: Re: [PATCH v5 6/9] irqchip/gic-v3: Parse and export virtual GIC information To: Shanker Donthineni , kvmarm@lists.cs.columbia.edu References: <1459769860-6629-1-git-send-email-julien.grall@arm.com> <1459769860-6629-7-git-send-email-julien.grall@arm.com> <570868EE.9090200@codeaurora.org> Cc: al.stone@linaro.org, kvm@vger.kernel.org, marc.zyngier@arm.com, linux-kernel@vger.kernel.org, fu.wei@linaro.org, Thomas Gleixner , Jason Cooper , linux-arm-kernel@lists.infradead.org, gg@slimlogic.co.uk From: Julien Grall Message-ID: <570BAEA3.5090007@arm.com> Date: Mon, 11 Apr 2016 15:03:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <570868EE.9090200@codeaurora.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 926 Lines: 35 On 09/04/16 03:29, Shanker Donthineni wrote: > Hi Julien, Hello Shanker, > On 04/04/2016 06:37 AM, Julien Grall wrote: >> +static int __init gic_acpi_parse_virt_madt_gicc(struct >> acpi_subtable_header *header, >> + const unsigned long end) >> +{ >> + struct acpi_madt_generic_interrupt *gicc = >> + (struct acpi_madt_generic_interrupt *)header; >> + int maint_irq_mode; >> + static int first_madt = true; >> + >> + maint_irq_mode = (gicc->flags & ACPI_MADT_VGIC_IRQ_MODE) ? >> + ACPI_EDGE_SENSITIVE : ACPI_LEVEL_SENSITIVE; >> + > Do you think GICC parameters are valid for an unusable processor? Good point. We don't know if the value will be valid when the processor is unusable. > If not we need a validation check here, some thing like this to skip > GICC subtable entry. > > if (!(gicc->flags & ACPI_MADT_ENABLED)) > return 0; I will add this check. Regards, -- Julien Grall