From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:adf:fb8f:0:0:0:0:0 with SMTP id a15csp6907072wrr; Fri, 15 Nov 2019 06:55:51 -0800 (PST) X-Google-Smtp-Source: APXvYqw5x3yIO4o/oWzUwSaN102qhOCNt6OLalXoz0Bzr1amziIu1AKmQdD+4BnpzrBZ8xlo0fpW X-Received: by 2002:a17:906:5fd0:: with SMTP id k16mr1393661ejv.243.1573829751313; Fri, 15 Nov 2019 06:55:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573829751; cv=none; d=google.com; s=arc-20160816; b=zq1lcsZWE8rgACiem1CoPk2/uJZAhgUOrLuAcn2f31wgEXY2YR0EmmHW5IjRqvpgX4 SHjOJJxcqzKLfKORsCZ8UYl8kVhURgARQ7yBke36Hm4x+E1d/BaKKpKippxMYPh6AM2A MgQWwiKJ3YRCSSbJuUAxdjGfYHZtCH40T+8y0WjwFtF0FzyLPhm7+PIqUcuuwFM+KdaX 1OqqwrxH7PPHHL0kFTTxkqtK+JbFxqCq22pM1b9v+I3vtFi2HaFd2wooJCE8PD64tjKd EIHM5wsI+skmGyAQlVZ+nz++BxmGHzVnTZIrkXpCJQ5hQrHYhBktk7P7gdIvY4BN90Ck Xxpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=0rorQVHKK9jfAoq/OSb/+Jl9+t1z4hwT4nWpoleuD6s=; b=RG5P4s3CTQ2pZ5caG4Pkv/mCDhJonHxUh8ueUQ3wtFRRFoTpwmkPBCoMwZcxN7zs3s 1hd79F4fTCXg0faHADnvA1m0vtoOwLNvvsZ1eAhzvfnfJSh0NEhx9IanVFuxuYvtKEEK 8C6PaOOoJr+a/LHCW6QbTNeCsG9Gfw0XuuDKNJxnXy2OlohuL4CFZFQ4Z/EHezoPM63m XxPB+n476mWzqSG93x91RHWdAlD+vRRv8HUYuIKF6rdV1RHAHfA7FkLzbVvJLOM3/ZtT juxLQrt3BQ1W5iAmQyN6ku1rKHVV+OUdezCLuyD7HeOk4eFLRMCfGVt9CTeok3/fCRr7 E0Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Hw8KZv6q; spf=pass (google.com: best guess record for domain of kvm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=kvm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si5568564ejw.412.2019.11.15.06.55.51; Fri, 15 Nov 2019 06:55:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of kvm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Hw8KZv6q; spf=pass (google.com: best guess record for domain of kvm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=kvm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727786AbfKOOzu (ORCPT + 4 others); Fri, 15 Nov 2019 09:55:50 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:32072 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727799AbfKOOzs (ORCPT ); Fri, 15 Nov 2019 09:55:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573829748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0rorQVHKK9jfAoq/OSb/+Jl9+t1z4hwT4nWpoleuD6s=; b=Hw8KZv6qo/ROgH2xZt1qFuS7bb1/a136O2wjh3mPFPUJFvtQBVuwvRoTcsPxTDPgR+WrIo 7mNy5Rs+gqJNxgV79czheqR8Wy279raoESmllzBCMibmaZAgF6nHdVLmMW7xLozm6v9laS 1mDiz87Ek0uXgMwwGIC+/SdWFTNWzFw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-51-U1O2p4rXNzuo3glGwPq_PQ-1; Fri, 15 Nov 2019 09:55:45 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6F2ED104FB65; Fri, 15 Nov 2019 14:55:42 +0000 (UTC) Received: from localhost (unknown [10.43.2.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id B67DD4645F; Fri, 15 Nov 2019 14:55:29 +0000 (UTC) Date: Fri, 15 Nov 2019 15:55:27 +0100 From: Igor Mammedov To: gengdongjiu Cc: "zhengxiang (A)" , "pbonzini@redhat.com" , "mst@redhat.com" , "shannon.zhaosl@gmail.com" , "peter.maydell@linaro.org" , "lersek@redhat.com" , "james.morse@arm.com" , "mtosatti@redhat.com" , "rth@twiddle.net" , "ehabkost@redhat.com" , "Jonathan Cameron" , "xuwei (O)" , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , "qemu-arm@nongnu.org" , Linuxarm , "Wanghaibin (D)" Subject: Re: [RESEND PATCH v21 3/6] ACPI: Add APEI GHES table generation support Message-ID: <20191115155527.287ee95b@redhat.com> In-Reply-To: <19b1b4b9ceb24aad9f34ab4e58bccab3@huawei.com> References: <19b1b4b9ceb24aad9f34ab4e58bccab3@huawei.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: U1O2p4rXNzuo3glGwPq_PQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-TUID: lhcSKMHf6DH4 On Fri, 15 Nov 2019 14:32:47 +0000 gengdongjiu wrote: > > > + */ > > > +static void acpi_ghes_build_notify(GArray *table, const uint8_t type= ) =20 > >=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 dat= a needed to construct them from supplied arguments. =20 >=20 > I very used your suggested method in previous series[1], but other mainta= iner suggested to move this function to this file, because he think only GH= ES used it Using this file is ok, what I've meant for you to split function from this patch into a separate smaller patch. With the way code split now I have to review 2 big complex patches at the same which makes reviewing hard and I have a hard time convincing myself that code it correct. Moving small self-contained chunks of code in to separate smaller patches makes review easier. >=20 > [1]: > https://patchwork.ozlabs.org/cover/1099428/ >=20 > > =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 > >=20 > > /* > > Initialize "etc/hardware_errors" and "etc/hardware_errors_addr" fwcfg= blobs. > > See docs/specs/acpi_hest_ghes.rst for blobs format */ =20 > > > +void acpi_ghes_build_error_table(GArray *hardware_errors, BIOSLinker > > > +*linker) =20 > > build_ghes_error_table() > >=20 > > also I'd move this function into its own patch along with other related= code that initializes and wires it into virt board. =20 >=20 > I ever use your suggested method[1], but other maintainer, it seems Micha= el, suggested to move these functions to this file that used it, because he= think only GHES used it. >=20 > [1]: > https://patchwork.ozlabs.org/patch/1099424/ > https://patchwork.ozlabs.org/patch/1099425/ > https://patchwork.ozlabs.org/patch/1099430/ >=20 >=20 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.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 03EE3C432C3 for ; Fri, 15 Nov 2019 14:56:38 +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 C01D12053B for ; Fri, 15 Nov 2019 14:56:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Hw8KZv6q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C01D12053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVd1Y-0002dY-V7 for qemu-devel@archiver.kernel.org; Fri, 15 Nov 2019 09:56:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37441) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVd0p-00026T-Vn for qemu-devel@nongnu.org; Fri, 15 Nov 2019 09:55:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVd0n-0000Ih-8t for qemu-devel@nongnu.org; Fri, 15 Nov 2019 09:55:50 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:27446 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVd0n-0000II-5x for qemu-devel@nongnu.org; Fri, 15 Nov 2019 09:55:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573829748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0rorQVHKK9jfAoq/OSb/+Jl9+t1z4hwT4nWpoleuD6s=; b=Hw8KZv6qo/ROgH2xZt1qFuS7bb1/a136O2wjh3mPFPUJFvtQBVuwvRoTcsPxTDPgR+WrIo 7mNy5Rs+gqJNxgV79czheqR8Wy279raoESmllzBCMibmaZAgF6nHdVLmMW7xLozm6v9laS 1mDiz87Ek0uXgMwwGIC+/SdWFTNWzFw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-51-U1O2p4rXNzuo3glGwPq_PQ-1; Fri, 15 Nov 2019 09:55:45 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6F2ED104FB65; Fri, 15 Nov 2019 14:55:42 +0000 (UTC) Received: from localhost (unknown [10.43.2.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id B67DD4645F; Fri, 15 Nov 2019 14:55:29 +0000 (UTC) Date: Fri, 15 Nov 2019 15:55:27 +0100 From: Igor Mammedov To: gengdongjiu Subject: Re: [RESEND PATCH v21 3/6] ACPI: Add APEI GHES table generation support Message-ID: <20191115155527.287ee95b@redhat.com> In-Reply-To: <19b1b4b9ceb24aad9f34ab4e58bccab3@huawei.com> References: <19b1b4b9ceb24aad9f34ab4e58bccab3@huawei.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: U1O2p4rXNzuo3glGwPq_PQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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" , "zhengxiang \(A\)" , "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" On Fri, 15 Nov 2019 14:32:47 +0000 gengdongjiu wrote: > > > + */ > > > +static void acpi_ghes_build_notify(GArray *table, const uint8_t type= ) =20 > >=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 dat= a needed to construct them from supplied arguments. =20 >=20 > I very used your suggested method in previous series[1], but other mainta= iner suggested to move this function to this file, because he think only GH= ES used it Using this file is ok, what I've meant for you to split function from this patch into a separate smaller patch. With the way code split now I have to review 2 big complex patches at the same which makes reviewing hard and I have a hard time convincing myself that code it correct. Moving small self-contained chunks of code in to separate smaller patches makes review easier. >=20 > [1]: > https://patchwork.ozlabs.org/cover/1099428/ >=20 > > =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 > >=20 > > /* > > Initialize "etc/hardware_errors" and "etc/hardware_errors_addr" fwcfg= blobs. > > See docs/specs/acpi_hest_ghes.rst for blobs format */ =20 > > > +void acpi_ghes_build_error_table(GArray *hardware_errors, BIOSLinker > > > +*linker) =20 > > build_ghes_error_table() > >=20 > > also I'd move this function into its own patch along with other related= code that initializes and wires it into virt board. =20 >=20 > I ever use your suggested method[1], but other maintainer, it seems Micha= el, suggested to move these functions to this file that used it, because he= think only GHES used it. >=20 > [1]: > https://patchwork.ozlabs.org/patch/1099424/ > https://patchwork.ozlabs.org/patch/1099425/ > https://patchwork.ozlabs.org/patch/1099430/ >=20 >=20