From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31618C4CECE for ; Thu, 17 Oct 2019 06:20:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10B5D214E0 for ; Thu, 17 Oct 2019 06:20:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437123AbfJQGUw (ORCPT ); Thu, 17 Oct 2019 02:20:52 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:37056 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731726AbfJQGUv (ORCPT ); Thu, 17 Oct 2019 02:20:51 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id EE5F4266ADB1D7F2B102; Thu, 17 Oct 2019 14:20:49 +0800 (CST) Received: from [127.0.0.1] (10.133.224.57) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Thu, 17 Oct 2019 14:20:39 +0800 Subject: Re: [PATCH v19 3/5] ACPI: Add APEI GHES table generation support To: Peter Maydell CC: Paolo Bonzini , "Michael S. Tsirkin" , Igor Mammedov , Shannon Zhao , Laszlo Ersek , James Morse , gengdongjiu , Marcelo Tosatti , Richard Henderson , Eduardo Habkost , Jonathan Cameron , "xuwei (O)" , kvm-devel , "QEMU Developers" , qemu-arm , Linuxarm , References: <20191015140140.34748-1-zhengxiang9@huawei.com> <20191015140140.34748-4-zhengxiang9@huawei.com> From: Xiang Zheng Message-ID: Date: Thu, 17 Oct 2019 14:20:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.224.57] X-CFilter-Loop: Reflected Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 2019/10/15 22:52, Peter Maydell wrote: > On Tue, 15 Oct 2019 at 15:02, Xiang Zheng wrote: >> >> From: Dongjiu Geng >> >> This patch implements APEI GHES Table generation via fw_cfg blobs. Now >> it only supports ARMv8 SEA, a type of GHESv2 error source. Afterwards, >> we can extend the supported types if needed. For the CPER section, >> currently it is memory section because kernel mainly wants userspace to >> handle the memory errors. >> >> This patch follows the spec ACPI 6.2 to build the Hardware Error Source >> table. For more detailed information, please refer to document: >> docs/specs/acpi_hest_ghes.rst >> >> Suggested-by: Laszlo Ersek >> Signed-off-by: Dongjiu Geng >> Signed-off-by: Xiang Zheng > >> + /* Error Status Address */ >> + build_append_gas(table_data, AML_SYSTEM_MEMORY, 0x40, 0, >> + 4 /* QWord access */, 0); > > Hi; this doesn't seem to compile with clang: > > /home/petmay01/linaro/qemu-from-laptop/qemu/hw/acpi/acpi_ghes.c:330:34: > error: implicit conversion from > enumeration type 'AmlRegionSpace' to different enumeration type > 'AmlAddressSpace' > [-Werror,-Wenum-conversion] > build_append_gas(table_data, AML_SYSTEM_MEMORY, 0x40, 0, > ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~ > /home/petmay01/linaro/qemu-from-laptop/qemu/hw/acpi/acpi_ghes.c:351:34: > error: implicit conversion from > enumeration type 'AmlRegionSpace' to different enumeration type > 'AmlAddressSpace' > [-Werror,-Wenum-conversion] > build_append_gas(table_data, AML_SYSTEM_MEMORY, 0x40, 0, > ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~ > 2 errors generated. > > Should these be AML_AS_SYSTEM_MEMORY, or should the build_append_gas() > function be taking an AmlRegionSpace rather than an AmlAddressSpace ? Yes, these should be AML_AS_SYSTEM_MEMORY, the first field of Generic Address Structure(GAS) is Address Space ID. I will fix these compile errors. > > thanks > -- PMM > > . > -- Thanks, Xiang From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E137FC4CECE for ; Thu, 17 Oct 2019 06:21:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B62E82054F for ; Thu, 17 Oct 2019 06:21:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B62E82054F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKzAM-0007OQ-UW for qemu-devel@archiver.kernel.org; Thu, 17 Oct 2019 02:21:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53268) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKz9e-0006qP-N8 for qemu-devel@nongnu.org; Thu, 17 Oct 2019 02:20:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKz9d-00027u-Ip for qemu-devel@nongnu.org; Thu, 17 Oct 2019 02:20:58 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58366 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iKz9a-00026V-OZ; Thu, 17 Oct 2019 02:20:55 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id EE5F4266ADB1D7F2B102; Thu, 17 Oct 2019 14:20:49 +0800 (CST) Received: from [127.0.0.1] (10.133.224.57) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Thu, 17 Oct 2019 14:20:39 +0800 Subject: Re: [PATCH v19 3/5] ACPI: Add APEI GHES table generation support To: Peter Maydell References: <20191015140140.34748-1-zhengxiang9@huawei.com> <20191015140140.34748-4-zhengxiang9@huawei.com> From: Xiang Zheng Message-ID: Date: Thu, 17 Oct 2019 14:20:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.224.57] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , kvm-devel , "Michael S. Tsirkin" , wanghaibin.wang@huawei.com, Marcelo Tosatti , Linuxarm , QEMU Developers , gengdongjiu , Shannon Zhao , qemu-arm , James Morse , Jonathan Cameron , Igor Mammedov , Paolo Bonzini , "xuwei \(O\)" , Laszlo Ersek , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 2019/10/15 22:52, Peter Maydell wrote: > On Tue, 15 Oct 2019 at 15:02, Xiang Zheng wrote: >> >> From: Dongjiu Geng >> >> This patch implements APEI GHES Table generation via fw_cfg blobs. Now >> it only supports ARMv8 SEA, a type of GHESv2 error source. Afterwards, >> we can extend the supported types if needed. For the CPER section, >> currently it is memory section because kernel mainly wants userspace to >> handle the memory errors. >> >> This patch follows the spec ACPI 6.2 to build the Hardware Error Source >> table. For more detailed information, please refer to document: >> docs/specs/acpi_hest_ghes.rst >> >> Suggested-by: Laszlo Ersek >> Signed-off-by: Dongjiu Geng >> Signed-off-by: Xiang Zheng > >> + /* Error Status Address */ >> + build_append_gas(table_data, AML_SYSTEM_MEMORY, 0x40, 0, >> + 4 /* QWord access */, 0); > > Hi; this doesn't seem to compile with clang: > > /home/petmay01/linaro/qemu-from-laptop/qemu/hw/acpi/acpi_ghes.c:330:34: > error: implicit conversion from > enumeration type 'AmlRegionSpace' to different enumeration type > 'AmlAddressSpace' > [-Werror,-Wenum-conversion] > build_append_gas(table_data, AML_SYSTEM_MEMORY, 0x40, 0, > ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~ > /home/petmay01/linaro/qemu-from-laptop/qemu/hw/acpi/acpi_ghes.c:351:34: > error: implicit conversion from > enumeration type 'AmlRegionSpace' to different enumeration type > 'AmlAddressSpace' > [-Werror,-Wenum-conversion] > build_append_gas(table_data, AML_SYSTEM_MEMORY, 0x40, 0, > ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~ > 2 errors generated. > > Should these be AML_AS_SYSTEM_MEMORY, or should the build_append_gas() > function be taking an AmlRegionSpace rather than an AmlAddressSpace ? Yes, these should be AML_AS_SYSTEM_MEMORY, the first field of Generic Address Structure(GAS) is Address Space ID. I will fix these compile errors. > > thanks > -- PMM > > . > -- Thanks, Xiang