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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0B7C7C54FB3 for ; Mon, 2 Jun 2025 10:23:20 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uM2Jl-0006HQ-KF; Mon, 02 Jun 2025 06:22:58 -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 1uM2Jf-0006Gg-GW for qemu-devel@nongnu.org; Mon, 02 Jun 2025 06:22:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uM2Jd-0005rs-Rx for qemu-devel@nongnu.org; Mon, 02 Jun 2025 06:22:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748859768; 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=CKMj/dmcZFnIoX+/jXJwdMyeYm/ORc0hdxg4CxCECwk=; b=Q0QXgeEHE8JrwbFxBCIH2P+xB/V/6ht8I78e6IoB03ZVh9k99z+qasneDXwSkG8HsKDQHP jFTDZeS2UIJvQ1F0QyW/SupSHCzEcvl9GJlBBrCOf+t70vzoFnGItp9mmpVCdGpV053WDH cCbO5J4RxW6s85uyML6N+ULhg1uTOyc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-688-Lsy6AbuwPg2-AyLbapAAIw-1; Mon, 02 Jun 2025 06:22:47 -0400 X-MC-Unique: Lsy6AbuwPg2-AyLbapAAIw-1 X-Mimecast-MFC-AGG-ID: Lsy6AbuwPg2-AyLbapAAIw_1748859766 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-451d5600a54so10277595e9.2 for ; Mon, 02 Jun 2025 03:22:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748859766; x=1749464566; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CKMj/dmcZFnIoX+/jXJwdMyeYm/ORc0hdxg4CxCECwk=; b=BqOn667ydfElydO/lSBQ3qJtWfEzHAcyhMX8hGhbuoH+WVo8fhC3My/H7cH1r9b18b aCxrpgdW58TC1AYjRyVnBfPH4kTaZuQvihnXZpN8MHTaevhrUBrklavciah6CgFpCK0g 2tDVSusfiYvqNGqeCHyV45idLAjMGL5hDxzqqAXseXw8oruuwudKRlHswHC5d3+47Es3 UY+kLmQTcYeIjUnouqSvjHZuQqPbPAyWilNi0q3ucFUdXH71u7LeFkuQorPb/EfTDKdP KKL31r/sHE9nHUD2TaffhuLr5jTX48ghtZK38581ySnoMRfThkMfEyxA+oQprLr7UZwu l4zw== X-Forwarded-Encrypted: i=1; AJvYcCWOPa/+/YXCG6D1VR08dpNB+h7gJSXb62BLEVzR5E4dALM+fa5uCi9rCIhggy3meoXPJ9PRAo046NqL@nongnu.org X-Gm-Message-State: AOJu0YyS0uSdx1Csb4Ap4CxYSioYkwBZf2+jN67peBnZnU0YgC0v9iFz qj+onAn4nPa7T5GBVysw20lg968E+CU2t4USHEvGNrEYuPUkGtmBS2h0UGODGG+BSKXT+SEaw4C 9FjK3rEv0FP9xQ1mA+gEO+wOZQ3IiIA429vm99ioqAMC4dafedV03iIx/ X-Gm-Gg: ASbGncvNI6Yhv2EmiOGcfI1gB9Op7PXomZhQs2evPb6Uzj7fKmfA7ktkKV/fEh7nOHq nuze1yFXO8cW/7g1FDRoYF3H8sp8CTLf4tFsz5SoN5itXHZdq+XDjGImxjm9Ebu+0AhB1uY7hz+ 2DA2OgHV1/DC+AViPbjzx1zuIwmy5DUT//eqcOnkyAmudBao7170WsRfR7mZtR7cUkx4VzSsFcG oh6ttOcYDmY6C2s8fAs2QFz1kKY3zeXUmGOg5BjPExUVLEEEN6YVABTA405HI84+qjfB+VrcKyx 7OJ0dAi6mrRanA7/oeD73IjsqcVSUGkF X-Received: by 2002:a05:600c:1c08:b0:43c:ec0a:ddfd with SMTP id 5b1f17b1804b1-450d64e2cedmr95031915e9.6.1748859765969; Mon, 02 Jun 2025 03:22:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEeawgvYHwXYBD7Ncx6S/vt4KgrtY/j8BkA9OdXSa/4ZY4UEAQYaLMSnHOrNdPF14e7MUUAoA== X-Received: by 2002:a05:600c:1c08:b0:43c:ec0a:ddfd with SMTP id 5b1f17b1804b1-450d64e2cedmr95031585e9.6.1748859765515; Mon, 02 Jun 2025 03:22:45 -0700 (PDT) Received: from imammedo.users.ipa.redhat.com ([85.93.96.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d7fb80f6sm115820455e9.28.2025.06.02.03.22.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jun 2025 03:22:45 -0700 (PDT) Date: Mon, 2 Jun 2025 12:22:44 +0200 From: Igor Mammedov To: Mauro Carvalho Chehab Cc: "Michael S. Tsirkin" , Jonathan Cameron , Shiju Jose , qemu-arm@nongnu.org, qemu-devel@nongnu.org, Philippe =?UTF-8?B?TWF0aGll?= =?UTF-8?B?dS1EYXVkw6k=?= , Ani Sinha , Eduardo Habkost , Marcel Apfelbaum , Peter Maydell , Shannon Zhao , Yanan Wang , Zhao Liu , linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 12/20] acpi/generic_event_device: add logic to detect if HEST addr is available Message-ID: <20250602122244.081a1960@imammedo.users.ipa.redhat.com> In-Reply-To: <20250530221810.694ce02e@foz.lan> References: <20250528174212.2823d3de@imammedo.users.ipa.redhat.com> <20250530080120-mutt-send-email-mst@kernel.org> <20250530164903.0f9f8444@imammedo.users.ipa.redhat.com> <20250530221810.694ce02e@foz.lan> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.071, 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_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Fri, 30 May 2025 22:18:10 +0200 Mauro Carvalho Chehab wrote: > Em Fri, 30 May 2025 16:49:03 +0200 > Igor Mammedov escreveu: > > > On Fri, 30 May 2025 08:01:28 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, May 28, 2025 at 05:42:12PM +0200, Igor Mammedov wrote: > > > > On Tue, 20 May 2025 08:41:31 +0200 > > > > Mauro Carvalho Chehab wrote: > > > > > > > > > Create a new property (x-has-hest-addr) and use it to detect if > > > > > the GHES table offsets can be calculated from the HEST address > > > > > (qemu 10.0 and upper) or via the legacy way via an offset obtained > > > > > from the hardware_errors firmware file. > > > > > > > > > > > > it doesn't apply to current master anymore > > > > > > indeed. Mauro? > > > > Michael, > > it's trivial conflict in machine compat, > > could you fix it up while applying? > > IMHO, that's the best. The thing is, as code gets merged upstream with > backports, conflicts happen. > > I can re-send the series, if you prefer, as I'm keeping it rebasing it > from time to time at: > https://gitlab.com/mchehab_kernel/qemu/-/tree/qemu_submitted?ref_type=heads > > (it is on the top of upstream/master) > > But even that might have conflicts on your test tree if you pick > other patches touching this backport table: > > > -GlobalProperty hw_compat_10_0[] = {}; > > +GlobalProperty hw_compat_10_0[] = { > > + { TYPE_ACPI_GED, "x-has-hest-addr", "false" }, > > +}; > > (this was the code when I sent the PR. When applying upstream, > such hunk is now(*): > > GlobalProperty hw_compat_10_0[] = { > { "scsi-hd", "dpofua", "off" }, > + { TYPE_ACPI_GED, "x-has-hest-addr", "false" }, > }; > > > (*) https://gitlab.com/mchehab_kernel/qemu/-/commit/08c4859f8c6f36d7dccf2b773be88847e5d1fe0c > > If you still prefer that I resubmit the entire PR, let me know. If it's the only patch that needs rebase and doesn't affect the rest, I'd say there is no need to spam the list with whole series respin, just post rebased v10 12/20 as reply here If it's more than that, respin series. > > Regards, > Mauro > 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0DB50C54FB3 for ; Mon, 2 Jun 2025 12:58:51 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uM4k5-000440-Ef; Mon, 02 Jun 2025 08:58:17 -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 1uM4k3-000433-96; Mon, 02 Jun 2025 08:58:15 -0400 Received: from nyc.source.kernel.org ([147.75.193.91]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uM4k1-0000F6-Lx; Mon, 02 Jun 2025 08:58:15 -0400 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 3B8DFA4FFAD; Mon, 2 Jun 2025 12:58:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D77FFC4CEEB; Mon, 2 Jun 2025 12:58:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748869091; bh=UGpf4ScskYQqBIauC9Wo+ugO/mp6oc4eJcEYr5RIoR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u8HhRNzrCqHQLjErCeTW1ab/J/WOyCqQ4162WtH2eKR1PymS4yPY6Ly2akh9ieK4C +mjQnJhhT5NdJf9n2AdRXyEspFZIXMlTfHhUPgZ02+hRDIlQJFh5yVEJsHAtF7FGHu gAWbVC+dxfIhrp32HBUAOjKUUkhcbTDjhL5GETxUOwEwvg/PjcR61cfP9FJRT+i/p9 i5If//kwZA7DkPz0K13JfvFBcYpCz0GU7uS+MBmlVPAhaxjR7SjujtA6VMQelcaaJw DUTl63rJg6DoO2/sPTXEmhEqed0N7Q40LzRiojUy8aJhfX9wrOF03xJih9g/mf8p0J SzO9y7fGtFF6A== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1uM4jx-000000008oD-3sD1; Mon, 02 Jun 2025 14:58:09 +0200 From: Mauro Carvalho Chehab To: Igor Mammedov , "Michael S . Tsirkin" Cc: Jonathan Cameron , Shiju Jose , qemu-arm@nongnu.org, qemu-devel@nongnu.org, Mauro Carvalho Chehab , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ani Sinha , Eduardo Habkost , Marcel Apfelbaum , Peter Maydell , Shannon Zhao , Yanan Wang , Zhao Liu , linux-kernel@vger.kernel.org Subject: [PATCH v10 12/20 RESEND] acpi/generic_event_device: add logic to detect if HEST addr is available Date: Mon, 2 Jun 2025 14:57:12 +0200 Message-ID: <20250602122244.081a1960@imammedo.users.ipa.redhat.com>, Mauro Carvalho Chehab X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250530221810.694ce02e@foz.lan> References: <20250530221810.694ce02e@foz.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=147.75.193.91; envelope-from=mchehab+huawei@kernel.org; helo=nyc.source.kernel.org X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.015, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, INVALID_MSGID=0.568, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Message-ID: <20250602125712.zRS3rDnUwpgBqaN6Cxy87fcfw2wsfLpc_wcW4oZ1UMI@z> Create a new property (x-has-hest-addr) and use it to detect if the GHES table offsets can be calculated from the HEST address (qemu 10.0 and upper) or via the legacy way via an offset obtained from the hardware_errors firmware file. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- PS.: patch resent as the previous version was "12/26" instead of "12/20" v10: - rebased on the top of upstream hw/acpi/generic_event_device.c | 2 ++ hw/arm/virt-acpi-build.c | 18 ++++++++++++++++-- hw/core/machine.c | 2 ++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index d292f61b4e41..3cf9dab0d01a 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -318,6 +318,8 @@ static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev) static const Property acpi_ged_properties[] = { DEFINE_PROP_UINT32("ged-event", AcpiGedState, ged_event_bitmap, 0), + DEFINE_PROP_BOOL("x-has-hest-addr", AcpiGedState, + ghes_state.use_hest_addr, false), }; static const VMStateDescription vmstate_memhp_state = { diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index da3ebf403ef9..3126234e657d 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -893,6 +893,10 @@ static const AcpiNotificationSourceId hest_ghes_notify[] = { { ACPI_HEST_SRC_ID_SYNC, ACPI_GHES_NOTIFY_SEA }, }; +static const AcpiNotificationSourceId hest_ghes_notify_10_0[] = { + { ACPI_HEST_SRC_ID_SYNC, ACPI_GHES_NOTIFY_SEA }, +}; + static void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) { @@ -947,15 +951,25 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) if (vms->ras) { AcpiGedState *acpi_ged_state; + static const AcpiNotificationSourceId *notify; + unsigned int notify_sz; AcpiGhesState *ags; acpi_ged_state = ACPI_GED(vms->acpi_dev); ags = &acpi_ged_state->ghes_state; if (ags) { acpi_add_table(table_offsets, tables_blob); + + if (!ags->use_hest_addr) { + notify = hest_ghes_notify_10_0; + notify_sz = ARRAY_SIZE(hest_ghes_notify_10_0); + } else { + notify = hest_ghes_notify; + notify_sz = ARRAY_SIZE(hest_ghes_notify); + } + acpi_build_hest(ags, tables_blob, tables->hardware_errors, - tables->linker, hest_ghes_notify, - ARRAY_SIZE(hest_ghes_notify), + tables->linker, notify, notify_sz, vms->oem_id, vms->oem_table_id); } } diff --git a/hw/core/machine.c b/hw/core/machine.c index c3f3a5020d0b..aa90a83d8c23 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -35,10 +35,12 @@ #include "hw/virtio/virtio-pci.h" #include "hw/virtio/virtio-net.h" #include "hw/virtio/virtio-iommu.h" +#include "hw/acpi/generic_event_device.h" #include "audio/audio.h" GlobalProperty hw_compat_10_0[] = { { "scsi-hd", "dpofua", "off" }, + { TYPE_ACPI_GED, "x-has-hest-addr", "false" }, }; const size_t hw_compat_10_0_len = G_N_ELEMENTS(hw_compat_10_0); -- 2.49.0