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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 480E6C43215 for ; Fri, 15 Nov 2019 14:35:04 +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 1FEA620733 for ; Fri, 15 Nov 2019 14:35:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FEA620733 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]:40004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVcgg-0000qf-VM for qemu-devel@archiver.kernel.org; Fri, 15 Nov 2019 09:35:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33395) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVcej-0007Qd-NB for qemu-devel@nongnu.org; Fri, 15 Nov 2019 09:33:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVcei-0004OC-EH for qemu-devel@nongnu.org; Fri, 15 Nov 2019 09:33:01 -0500 Received: from lhrrgout.huawei.com ([185.176.76.210]:2050 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVcef-0004C3-KE; Fri, 15 Nov 2019 09:32:57 -0500 Received: from lhreml705-cah.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id EC45E68D6C269495430B; Fri, 15 Nov 2019 14:32:51 +0000 (GMT) Received: from lhreml712-chm.china.huawei.com (10.201.108.63) by lhreml705-cah.china.huawei.com (10.201.108.46) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 15 Nov 2019 14:32:51 +0000 Received: from dggeme755-chm.china.huawei.com (10.3.19.101) by lhreml712-chm.china.huawei.com (10.201.108.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5; Fri, 15 Nov 2019 14:32:50 +0000 Received: from dggeme755-chm.china.huawei.com ([10.7.64.71]) by dggeme755-chm.china.huawei.com ([10.7.64.71]) with mapi id 15.01.1713.004; Fri, 15 Nov 2019 22:32:47 +0800 From: gengdongjiu To: Igor Mammedov , "zhengxiang (A)" Subject: Re: [RESEND PATCH v21 3/6] ACPI: Add APEI GHES table generation support Thread-Topic: [RESEND PATCH v21 3/6] ACPI: Add APEI GHES table generation support Thread-Index: AdWbwWSZ/1gyxkpeREeYn2g+7NgH+g== Date: Fri, 15 Nov 2019 14:32:47 +0000 Message-ID: <19b1b4b9ceb24aad9f34ab4e58bccab3@huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.148.208.87] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.176.76.210 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: "peter.maydell@linaro.org" , "ehabkost@redhat.com" , "kvm@vger.kernel.org" , "mst@redhat.com" , "Wanghaibin \(D\)" , "mtosatti@redhat.com" , "qemu-devel@nongnu.org" , Linuxarm , "shannon.zhaosl@gmail.com" , "qemu-arm@nongnu.org" , "james.morse@arm.com" , "xuwei \(O\)" , Jonathan Cameron , "pbonzini@redhat.com" , "lersek@redhat.com" , "rth@twiddle.net" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" > > + */ > > +static void acpi_ghes_build_notify(GArray *table, const uint8_t type) >=20 > typically format should be build_WHAT(), so > build_ghes_hw_error_notification() >=20 > And I'd move this out into its own patch. > this applies to other trivial in-depended sub-tables, that take all data = needed to construct them from supplied arguments. I very used your suggested method in previous series[1], but other maintain= er suggested to move this function to this file, because he think only GHES= used it [1]: https://patchwork.ozlabs.org/cover/1099428/ >=20 > > +{ > > + /* Type */ > > + build_append_int_noprefix(table, type, 1); > > + /* > > + * Length: > > + * Total length of the structure in bytes > > + */ > > + build_append_int_noprefix(table, 28, 1); > > + /* Configuration Write Enable */ > > + build_append_int_noprefix(table, 0, 2); > > + /* Poll Interval */ > > + build_append_int_noprefix(table, 0, 4); > > + /* Vector */ > > + build_append_int_noprefix(table, 0, 4); > > + /* Switch To Polling Threshold Value */ > > + build_append_int_noprefix(table, 0, 4); > > + /* Switch To Polling Threshold Window */ > > + build_append_int_noprefix(table, 0, 4); > > + /* Error Threshold Value */ > > + build_append_int_noprefix(table, 0, 4); > > + /* Error Threshold Window */ > > + build_append_int_noprefix(table, 0, 4); } > > + >=20 > /* > Initialize "etc/hardware_errors" and "etc/hardware_errors_addr" fwcfg b= lobs. > See docs/specs/acpi_hest_ghes.rst for blobs format */ > > +void acpi_ghes_build_error_table(GArray *hardware_errors, BIOSLinker > > +*linker) > build_ghes_error_table() >=20 > also I'd move this function into its own patch along with other related c= ode that initializes and wires it into virt board. I ever use your suggested method[1], but other maintainer, it seems Michael= , suggested to move these functions to this file that used it, because he t= hink only GHES used it. [1]: https://patchwork.ozlabs.org/patch/1099424/ https://patchwork.ozlabs.org/patch/1099425/ https://patchwork.ozlabs.org/patch/1099430/