From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a05:7022:429:b0:85:21:bd5b with SMTP id 41csp766885dlf; Tue, 30 Jul 2024 04:37:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXu/1MfjCjDedjckmV8vX963OCT/D927b/CxFVy8hbv+6OD+tZbVAYKAn1i/yosrYB6SUYJYXvKzwPxwSOl1me7/oWKfq6W X-Google-Smtp-Source: AGHT+IFUeAPwG7eKE3nvL3CPqtclw1qoniCcamm3Tpg9XZB18qn9PECVK3Cy4N4SZ+ACcXg+psS1 X-Received: by 2002:a05:620a:4152:b0:79d:7ae0:ffd2 with SMTP id af79cd13be357-7a1e52cc703mr1478236485a.49.1722339423180; Tue, 30 Jul 2024 04:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722339423; cv=none; d=google.com; s=arc-20160816; b=I+Hbq7Weii/xtS2vFuGSGh6BNxSaJYtGJ8vbA3kOAdRO1ZdaWYwC4IFcFiStpJsFpe UgPv2qR2jhGRXebGoPPmPSBSZwNgGbLguRzd/tu0a2/Vu3ywfGpCkbrV1QwbzQqrdXpY ymea+Hh93k0NusHMmHRYUmD0h7HMJRUfeojHJOAYtoMvEZo1M52hrSymCfnmnAZgtio4 n05hbK/sAk67gzvF1YSxcABZJsL3UNDraK7Pa7Y3MiPCPosjA2v2Pj+KDvTGaBrYtuSi WJJT7G3/ILsslbGJFHdKcjV1IRqLwy+KAmlHU3oTuxBk95/hnH2VhLaZbSixetQK8DZ6 L8UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition:in-reply-to :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/MhlZfGAJ0otC0ssjOAlnO2L85Oh2aojhs/WkLFKmkY=; fh=h+g+qZK+PYO31+n6nSspcV2yery8K2wggzmMyCl3FQc=; b=R50yCPGjZ7NQtIjKKzzwIjaHQrBpVoJ9Kot411xFCw9jw4w+8U8Bc3YDjEv8okjdVj ZrFS7R254rsEgJKrMCLfSnB+/+kdh+4cfCMz8O4uLD0vO7F5weD36DJoiYXXbFHrM7uL gpCQcAL2FRmOVB6ZLnUi+uNYVCa5VM3T/8P60KNpozCUmYSpEBxIldHhbIAfEXEaIwSu SDayazyWbBetoMbS3GsrJTQg1saaYgniQVuCv/3rI/KJg5IGvOPkhK0pYtw/Gsp/MVOS akmnJGk04den5w3Bgr428OYUEHI0LPfwNJ4OnR/HE1Gk+7d0uhxLjWbE0SPimvE69WU3 ZddQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YHKssXBF; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1d739b8f4si1255811685a.108.2024.07.30.04.37.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 04:37:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YHKssXBF; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYl9p-0000Nv-E3; Tue, 30 Jul 2024 07:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYl9o-0000Mv-Qd for qemu-arm@nongnu.org; Tue, 30 Jul 2024 07:36:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYl9m-000493-Lk for qemu-arm@nongnu.org; Tue, 30 Jul 2024 07:36:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722339401; 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: in-reply-to:in-reply-to:references:references; bh=/MhlZfGAJ0otC0ssjOAlnO2L85Oh2aojhs/WkLFKmkY=; b=YHKssXBFtjxqkVkxrQl3GyjpAf157LucpYPiwME1MCKOUUZLju8ZUL9i+vIfcQkVjdHA7T 4sLG4cvqUv41d4tisOEj+aE/adkZ0RF0rIJF9mvcfSz6AdizGeiNuDsd5MBR8TD0M68c2K DMflVf7TCyrc51P5N5qjstv/99eZY7E= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-55-NGWg0CyPMD-tqlDYif58GQ-1; Tue, 30 Jul 2024 07:36:39 -0400 X-MC-Unique: NGWg0CyPMD-tqlDYif58GQ-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5a77d9b75a2so1878453a12.3 for ; Tue, 30 Jul 2024 04:36:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722339398; x=1722944198; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/MhlZfGAJ0otC0ssjOAlnO2L85Oh2aojhs/WkLFKmkY=; b=L0V3aXfqOfoqxPfN2zKfzUAh/uD6DHJnmHbcTT5ea4o5dGt/YbR5a89lsSlFrcHD4b lTgEOVUdPqK1Sv9U9oLyx8xmeJXgtUmqoNHE6TJ21B8xvghlbScCylN0G4WZKRW9zeta GK/bcFlQV4UW0raA6YVqpUgbC5CLijpaD1YRKQRslaVicjdPiJ30Ubgj7HuxRAowmowb De5zcrWgKpTh9uy3E24KnoO4JR3hfPMuBXvseOfrvI8URO20Sk81LNP9+MJn/ZNEL16y 4sTBOPlIkxmZtP4qjyHJlUyxysKpPXzbxBaiI7tf85SWmgaHL5C+/cDX6dCj6bJheh+D B5Uw== X-Forwarded-Encrypted: i=1; AJvYcCVPJ5pMnRx+nZlcS3jjnz7Oe09kUANc/Q6HNWuDVSbanbpQtNvpUPl3pKYhLUh7J8SfQADcxO/eQV3Maiqe06UxpHLw X-Gm-Message-State: AOJu0YyGbSkWUafeQdV2yRBcNXZNXUMeo6H2UWrxa6nckaDjQz+uoQ2l cxOJT0zEm4v0puF16uo4VEvQRA6w4mGIVvtJ75qw+A0S3OrogK+eD8idvCTRRur6WB8Zs5P6ON1 ELq+ZCNs8cFaKKhMARVR7CCGWV6mQcCcW39N/9bQSSeFgjWryKA== X-Received: by 2002:a50:935a:0:b0:595:71c7:39dd with SMTP id 4fb4d7f45d1cf-5b0223d9958mr7248112a12.34.1722339398278; Tue, 30 Jul 2024 04:36:38 -0700 (PDT) X-Received: by 2002:a50:935a:0:b0:595:71c7:39dd with SMTP id 4fb4d7f45d1cf-5b0223d9958mr7248088a12.34.1722339397440; Tue, 30 Jul 2024 04:36:37 -0700 (PDT) Received: from redhat.com ([2.55.35.236]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac63590d1esm7155100a12.27.2024.07.30.04.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 04:36:36 -0700 (PDT) Date: Tue, 30 Jul 2024 07:36:32 -0400 From: "Michael S. Tsirkin" To: Igor Mammedov Cc: Mauro Carvalho Chehab , Jonathan Cameron , Shiju Jose , Ani Sinha , Dongjiu Geng , linux-kernel@vger.kernel.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: Re: [PATCH v3 6/7] acpi/ghes: update comments to point to newer ACPI specs Message-ID: <20240730073447-mutt-send-email-mst@kernel.org> References: <66c1ab4988589be99ae925c6361548f55fea58b0.1721630625.git.mchehab+huawei@kernel.org> <20240730132430.44d9e4ae@imammedo.users.ipa.redhat.com> MIME-Version: 1.0 In-Reply-To: <20240730132430.44d9e4ae@imammedo.users.ipa.redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.125, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: PFPj4euBrxDh On Tue, Jul 30, 2024 at 01:24:30PM +0200, Igor Mammedov wrote: > On Mon, 22 Jul 2024 08:45:58 +0200 > Mauro Carvalho Chehab wrote: > > > There is one reference to ACPI 4.0 and several references > > to ACPI 6.x versions. > > > > Update them to point to ACPI 6.5 whenever possible. > > when it comes to APCI doc comments, they should point to > the 1st (earliest) revision that provides given feature/value/field/table. Yes. And the motivation is twofold. First, guests are built against old acpi versions. knowing in which version things appeared helps us know which guests support a feature. Second, acpi guys keep churning out new versions. It makes no sense to try and update to latest one, it will soon get out of date again. > > > There's one reference that was kept pointing to ACPI 6.4, > > though, with HEST revision 1. > > > > ACPI 6.5 now defines HEST revision 2, and defined a new > > way to handle source types starting from 12. According > > with ACPI 6.5 revision history: > > > > 2312 Update to the HEST table and adding new error > > source descriptor - Table 18.2. > > > > Yet, the spec doesn't define yet any new source > > descriptors. It just defines a different behavior when > > source type is above 11. > > > > I also double-checked GHES implementation on an open > > source project (Linux Kernel). Currently upstream > > doesn't currently handle HEST revision, ignoring such > > field. > > > > In any case, revision 2 seems to be backward-compatible > > with revison 1 when type <= 11 and just one error is > > contained on a HEST record. > > > > So, while it is probably safe to update it, there's no > > real need. So, let's keep the implementation using > > an ACPI 6.4 compatible table, e. g. HEST revision 1. > > > > Signed-off-by: Mauro Carvalho Chehab > > --- > > hw/acpi/ghes.c | 48 ++++++++++++++++++++++++++++-------------------- > > 1 file changed, 28 insertions(+), 20 deletions(-) > > > > diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c > > index 6075ef5893ce..ebf1b812aaaa 100644 > > --- a/hw/acpi/ghes.c > > +++ b/hw/acpi/ghes.c > > @@ -45,9 +45,9 @@ > > #define GAS_ADDR_OFFSET 4 > > > > /* > > - * The total size of Generic Error Data Entry > > - * ACPI 6.1/6.2: 18.3.2.7.1 Generic Error Data, > > - * Table 18-343 Generic Error Data Entry > > + * The total size of Generic Error Data Entry before data field > > + * ACPI 6.5: 18.3.2.7.1 Generic Error Data, > > + * Table 18.12 Generic Error Data Entry > > */ > > #define ACPI_GHES_DATA_LENGTH 72 > > > > @@ -65,8 +65,8 @@ > > > > /* > > * Total size for Generic Error Status Block except Generic Error Data Entries > > - * ACPI 6.2: 18.3.2.7.1 Generic Error Data, > > - * Table 18-380 Generic Error Status Block > > + * ACPI 6.5: 18.3.2.7.1 Generic Error Data, > > + * Table 18.11 Generic Error Status Block > > */ > > #define ACPI_GHES_GESB_SIZE 20 > > > > @@ -82,7 +82,8 @@ enum AcpiGenericErrorSeverity { > > > > /* > > * Hardware Error Notification > > - * ACPI 4.0: 17.3.2.7 Hardware Error Notification > > + * ACPI 6.5: 18.3.2.9 Hardware Error Notification, > > + * Table 18.14 - Hardware Error Notification Structure > > * Composes dummy Hardware Error Notification descriptor of specified type > > */ > > static void build_ghes_hw_error_notification(GArray *table, const uint8_t type) > > @@ -112,7 +113,8 @@ static void build_ghes_hw_error_notification(GArray *table, const uint8_t type) > > > > /* > > * Generic Error Data Entry > > - * ACPI 6.1: 18.3.2.7.1 Generic Error Data > > + * ACPI 6.5: 18.3.2.7.1 Generic Error Data, > > + * Table 18.12 - Generic Error Data Entry > > */ > > static void acpi_ghes_generic_error_data(GArray *table, > > const uint8_t *section_type, uint32_t error_severity, > > @@ -148,7 +150,8 @@ static void acpi_ghes_generic_error_data(GArray *table, > > > > /* > > * Generic Error Status Block > > - * ACPI 6.1: 18.3.2.7.1 Generic Error Data > > + * ACPI 6.5: 18.3.2.7.1 Generic Error Data, > > + * Table 18.11 - Generic Hardware Error Source Structure > > */ > > static void acpi_ghes_generic_error_status(GArray *table, uint32_t block_status, > > uint32_t raw_data_offset, uint32_t raw_data_length, > > @@ -429,15 +432,18 @@ void build_ghes_error_table(GArray *hardware_errors, BIOSLinker *linker) > > 0, sizeof(uint64_t), ACPI_GHES_ERRORS_FW_CFG_FILE, 0); > > } > > > > -/* Build Generic Hardware Error Source version 2 (GHESv2) */ > > +/* > > + * Build Generic Hardware Error Source version 2 (GHESv2) > > + * ACPI 6.5: 18.3.2.8 Generic Hardware Error Source version 2 (GHESv2 - Type 10), > > + * Table 18.13: Generic Hardware Error Source version 2 (GHESv2) > > + */ > > static void build_ghes_v2(GArray *table_data, int source_id, BIOSLinker *linker) > > { > > uint64_t address_offset; > > - /* > > - * Type: > > - * Generic Hardware Error Source version 2(GHESv2 - Type 10) > > - */ > > + /* Type: (GHESv2 - Type 10) */ > > build_append_int_noprefix(table_data, ACPI_GHES_SOURCE_GENERIC_ERROR_V2, 2); > > + > > + /* ACPI 6.5: Table 18.10 - Generic Hardware Error Source Structure */ > > /* Source Id */ > > build_append_int_noprefix(table_data, source_id, 2); > > /* Related Source Id */ > > @@ -481,11 +487,8 @@ static void build_ghes_v2(GArray *table_data, int source_id, BIOSLinker *linker) > > /* Error Status Block Length */ > > build_append_int_noprefix(table_data, ACPI_GHES_MAX_RAW_DATA_LENGTH, 4); > > > > - /* > > - * Read Ack Register > > - * ACPI 6.1: 18.3.2.8 Generic Hardware Error Source > > - * version 2 (GHESv2 - Type 10) > > - */ > > + /* ACPI 6.5: fields defined at GHESv2 table */ > > + /* Read Ack Register */ > > address_offset = table_data->len; > > build_append_gas(table_data, AML_AS_SYSTEM_MEMORY, 0x40, 0, > > 4 /* QWord access */, 0); > > @@ -504,11 +507,16 @@ static void build_ghes_v2(GArray *table_data, int source_id, BIOSLinker *linker) > > build_append_int_noprefix(table_data, 0x1, 8); > > } > > > > -/* Build Hardware Error Source Table */ > > +/* > > + * Build Hardware Error Source Table > > + * ACPI 6.4: 18.3.2 ACPI Error Source > > + * Table 18.2: Hardware Error Source Table (HEST) > > + */ > > void acpi_build_hest(GArray *table_data, BIOSLinker *linker, > > const char *oem_id, const char *oem_table_id) > > { > > - AcpiTable table = { .sig = "HEST", .rev = 1, > > + AcpiTable table = { .sig = "HEST", > > + .rev = 1, /* ACPI 4.0 to 6.4 */ > > .oem_id = oem_id, .oem_table_id = oem_table_id }; > > > > acpi_table_begin(&table, table_data);