From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530102; cv=none; d=zohomail.com; s=zohoarc; b=Tqdxl+MsuNQYAZdZ4CI6L9GCnzwitvIbmwzXkUgwBC8GZOqYc48ObayMP5VBv6fwFjJeFjztN6lvjxNOqV3Pcd5TjpgVwC6VOyxPPkCd/M0d/I+iFx1/eEr/Uz4dX1J6IN6gDct6gW3hnmEDeXZPkEfOX3FZodTB4q1RJgR1Yyg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530102; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IEjyaQ/WiNyM94I3xXQBC4kfpcQUqZHnB4E47is1W6o=; b=MQWsKlKdn6Zj4+3pJk05VM9H+dHAHxYwymNcLu0blLenoZHEfQYB7IOljDnNi7q+Ht/SB69VuVdagq7flLLK5QeJrBENNIhZjpb9GLdgrebFxNE8DhBbCMI9hCwA48UuX8ZUP4Q6RjUozGu8P+fqJOrl2ef9o7Bq4ICi86a1Lno= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530102425927.7120374171897; Tue, 3 Mar 2026 01:28:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM11-0003r7-Sb; Tue, 03 Mar 2026 04:26:07 -0500 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 1vxM0o-0003iA-G8 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:25:56 -0500 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 1vxM0k-0004OA-2x for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:25:53 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-628-dT6IPha_POKAmp--9ujiNQ-1; Tue, 03 Mar 2026 04:25:43 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 187A719560B2; Tue, 3 Mar 2026 09:25:42 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4BCC130001B9; Tue, 3 Mar 2026 09:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529947; 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=IEjyaQ/WiNyM94I3xXQBC4kfpcQUqZHnB4E47is1W6o=; b=NvpQuFUxwV7hOc9sT9u0y22JAAq8PJ3Feu8jVrV63n7utoQ7sb5rgQ4lEi9ELX23ju6mtf SypViQJR0xgcSyKYcqLi/FP3cU8cICFCJCZOdivwWB6q4mrsn4+fk9aFWSJo3pah/3fDf2 wYxgA/zdVtHBotHJ9z33r6iucGMguBU= X-MC-Unique: dT6IPha_POKAmp--9ujiNQ-1 X-Mimecast-MFC-AGG-ID: dT6IPha_POKAmp--9ujiNQ_1772529942 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 01/21] acpi: add API to build WDAT instructions Date: Tue, 3 Mar 2026 10:25:12 +0100 Message-ID: <20260303092532.2410177-2-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530105562139100 Add definitions for WDAT[1] actions/instructions and build_append_wdat_ins() API to build table entries. 1) "Hardware Watchdog Timers Design=C2=A0Specification" https://uefi.org/acpi 'Watchdog Action Table (WDAT)' Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- include/hw/acpi/wdat.h | 118 +++++++++++++++++++++++++++++++++++++++++ hw/acpi/aml-build.c | 14 +++++ 2 files changed, 132 insertions(+) create mode 100644 include/hw/acpi/wdat.h diff --git a/include/hw/acpi/wdat.h b/include/hw/acpi/wdat.h new file mode 100644 index 0000000000..89803eef4b --- /dev/null +++ b/include/hw/acpi/wdat.h @@ -0,0 +1,118 @@ +/* + * Watchdog Action Table (WDAT) definitions + * + * Copyright Red Hat, Inc. 2026 + * Author(s): Igor Mammedov + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef QEMU_HW_ACPI_WDAT_H +#define QEMU_HW_ACPI_WDAT_H + +#include "hw/acpi/acpi-defs.h" + +/* + * Watchdog actions as described in + * "Hardware Watchdog Timers Design=C2=A0Specification" + * for link to spec see https://uefi.org/acpi + * 'Watchdog Action Table (WDAT)' + */ +typedef enum { + /* + * Restarts the watchdog timer's countdown. This action is + * required. + */ + WDAT_ACTION_RESET =3D 0x1, + /* + * Returns the current countdown value of the watchdog hardware + * (in count intervals). + */ + WDAT_ACTION_QUERY_CURRENT_COUNTDOWN_PERIOD =3D 0x4, + /* + * Returns the countdown value the watchdog hardware is + * configured to use when reset (in count intervals). + */ + WDAT_ACTION_QUERY_COUNTDOWN_PERIOD =3D 0x5, + /* + * Sets the countdown value (in count intervals) to be used when + * the watchdog timer is reset. This action is required if + * WDAT_ACTION_RESET does not explicitly write a new + * countdown value to a register during a reset. Otherwise, this + * action is optional. + */ + WDAT_ACTION_SET_COUNTDOWN_PERIOD =3D 0x6, + /* + * Determines if the watchdog hardware is currently in enabled/ + * running state. The same result must occur when performed from + * both from enabled/stopped state and enabled/running state. If + * the watchdog hardware is disabled, results are indeterminate. + * This action is required. + */ + WDAT_ACTION_QUERY_RUNNING_STATE =3D 0x8, + /* + * Starts the watchdog, if not already in running state. If the + * watchdog hardware is disabled, results are indeterminate. + * This action is required. + */ + WDAT_ACTION_SET_RUNNING_STATE =3D 0x9, + /* + * Determines if the watchdog hardware is currently in enabled/ + * stopped state. The same result must occur when performed from + * both the enabled/stopped state and enabled/running state. If + * the watchdog hardware is disabled, results are indeterminate. + * This action is required. + */ + WDAT_ACTION_QUERY_STOPPED_STATE =3D 0xA, + /* + * Stops the watchdog, if not already in stopped state. If the + * watchdog hardware is disabled, results are indeterminate. + * This action is required. + */ + WDAT_ACTION_SET_STOPPED_STATE =3D 0xB, + /* + * Determines if the watchdog hardware is configured to perform a + * reboot when the watchdog is fired. + */ + WDAT_ACTION_QUERY_REBOOT =3D 0x10, + /* + * Configures the watchdog hardware to perform a reboot when it + * is fired. + */ + WDAT_ACTION_SET_REBOOT =3D 0x11, + /* + * Determines if the watchdog hardware is configured to perform a + * system shutdown when fired. + */ + WDAT_ACTION_QUERY_SHUTDOWN =3D 0x12, + /* + * Configures the watchdog hardware to perform a system shutdown + * when fired. + */ + WDAT_ACTION_SET_SHUTDOWN =3D 0x13, + /* + * Determines if the current boot was caused by the watchdog + * firing. The boot status is required to be set if the watchdog + * fired and caused a reboot. It is recommended that the + * Watchdog Status be set if the watchdog fired and caused a + * shutdown. This action is required. + */ + WDAT_ACTION_QUERY_WATCHDOG_STATUS =3D 0x20, + /* + * Sets the watchdog's boot status to the default value. This + * action is required. + */ + WDAT_ACTION_SET_WATCHDOG_STATUS =3D 0x21, +} WDATAction; + +#define WDAT_INS_READ_VALUE 0x0 +#define WDAT_INS_READ_COUNTDOWN 0x1 +#define WDAT_INS_WRITE_VALUE 0x2 +#define WDAT_INS_WRITE_COUNTDOWN 0x3 +#define WDAT_INS_PRESERVE_REGISTER 0x80 + +void build_append_wdat_ins(GArray *table_data, + WDATAction action, uint8_t flags, + struct AcpiGenericAddress as, + uint32_t val, uint32_t mask); + +#endif /* QEMU_HW_ACPI_WDAT_H */ diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ea1c415b21..9f9ce28dcc 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -32,6 +32,7 @@ #include "hw/pci/pci_bus.h" #include "hw/pci/pci_bridge.h" #include "qemu/cutils.h" +#include "hw/acpi/wdat.h" =20 static GArray *build_alloc_array(void) { @@ -2647,3 +2648,16 @@ Aml *aml_error_device(void) =20 return dev; } + +void build_append_wdat_ins(GArray *table_data, + WDATAction action, uint8_t flags, + struct AcpiGenericAddress as, + uint32_t val, uint32_t mask) +{ + build_append_int_noprefix(table_data, action, 1); /* Watchdog Actio= n */ + build_append_int_noprefix(table_data, flags, 1); /* Instruction Fl= ags */ + build_append_int_noprefix(table_data, 0, 2); /* Reserved */ + build_append_gas_from_struct(table_data, &as); /* Register Regio= n */ + build_append_int_noprefix(table_data, val, 4); /* Value */ + build_append_int_noprefix(table_data, mask, 4); /* Mask */ +} --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530014; cv=none; d=zohomail.com; s=zohoarc; b=Ocms6tE/LcG67E9P3bbT3xml2Nd78NVIpFxia/AFVoMwgclfQ8xGOzEHigJpIGs3RsMp8V+1IlDrfSsC2W6hOJvKI/EqtYoB7H0bNfB96535A6FS49tVZDv7bA+TYh34LJADfXyalX36yyVPVwDb70gDpePwAaSKCTXfAMrwajA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530014; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZdHNx4XbPANB2aNzpa5xx400fH2SDRE74EJc40dN18k=; b=HB67UxH4w7hNwa5KaKo58tbYABgWrdokU8udGe21EKvZBcGwpLU+K5H2FFDImBf4h8mGXfBVTGK2BNYI5VnxK9NytLB8rr29Ea0quntACAAQXOKKRZIJ8zP50ghAN0KC75VGxQkFgnaygx14C2IOcytE4ZhBePo4utkTZipV6/Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530014434925.1632208149908; Tue, 3 Mar 2026 01:26:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM19-00040U-Ci; Tue, 03 Mar 2026 04:26:17 -0500 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 1vxM0o-0003iC-IQ for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:25:56 -0500 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 1vxM0m-0004OM-7F for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:25:53 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-TTq2Ua4FPHyjV_05hxHypg-1; Tue, 03 Mar 2026 04:25:46 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 29D271800464; Tue, 3 Mar 2026 09:25:45 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 70E9A30001B9; Tue, 3 Mar 2026 09:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529949; 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=ZdHNx4XbPANB2aNzpa5xx400fH2SDRE74EJc40dN18k=; b=Il3EeuAo0kboa4Hl+4KwHRVVFi9vIgz4odrszAKDWZrl2+h8FCl8DIn8IRAmfKaHbRkAet dHswsIWzBdHTn9LH22zxe7GXNc0ztNj286ctJWmpB+qTlQz1A/72Gm+pOKYM/pE3lSka/g BTCcGNUPTYpRXsJwTkAqZC2JXryQaBM= X-MC-Unique: TTq2Ua4FPHyjV_05hxHypg-1 X-Mimecast-MFC-AGG-ID: TTq2Ua4FPHyjV_05hxHypg_1772529945 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 02/21] x86: q35: add 'wdat' property Date: Tue, 3 Mar 2026 10:25:13 +0100 Message-ID: <20260303092532.2410177-3-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530016438139100 Used for enabling WDAT based watchdog for builtin iTCO watchdog. Usage: -M q35,wdat=3D{on|off} By default it is disabled. Signed-off-by: Igor Mammedov --- include/hw/i386/pc.h | 1 + hw/i386/pc_q35.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 1cf88c1697..8e34e57be3 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -45,6 +45,7 @@ typedef struct PCMachineState { const char *south_bridge; =20 bool acpi_build_enabled; + bool wdat_enabled; bool smbus_enabled; bool sata_enabled; bool hpet_enabled; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 9158631f76..49f89544f3 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -330,6 +330,18 @@ static void pc_q35_init(MachineState *machine) } } =20 +static bool pc_q35_machine_get_wdat(Object *o, Error **errp) +{ + PCMachineState *pcms =3D PC_MACHINE(o); + return pcms->wdat_enabled; +} + +static void pc_q35_machine_set_wdat(Object *o, bool value, Error **errp) +{ + PCMachineState *pcms =3D PC_MACHINE(o); + pcms->wdat_enabled =3D value; +} + #define DEFINE_Q35_MACHINE(major, minor) \ DEFINE_PC_VER_MACHINE(pc_q35, "pc-q35", pc_q35_init, false, NULL, majo= r, minor); =20 @@ -342,6 +354,7 @@ static void pc_q35_init(MachineState *machine) static void pc_q35_machine_options(MachineClass *m) { PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); + ObjectClass *oc =3D OBJECT_CLASS(m); pcmc->pci_root_uid =3D 0; pcmc->default_cpu_version =3D 1; =20 @@ -360,6 +373,11 @@ static void pc_q35_machine_options(MachineClass *m) machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_UEFI_VARS_X64); + object_class_property_add_bool(oc, "wdat", + pc_q35_machine_get_wdat, pc_q35_machine_set_wdat); + object_class_property_set_description(oc, "wdat", + "Enable WDAT watchdog support. Default: off"); + compat_props_add(m->compat_props, pc_q35_compat_defaults, pc_q35_compat_defaults_len); } --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772529982; cv=none; d=zohomail.com; s=zohoarc; b=Mo7o7AqNg6mxEkAfp6gE4Ad8MdGWzv1tNmFmZNu3KhIKX1mr0GhTnpWVUHqWQsWVHnkcnGOOEaY4PHRdU6dNgHTyxOJEjX8QIQgbcT5j7T0o5x7OvqJtcVAavLuIKzwV+A68QJxWZ/Ub2saRoIuc8aIyOlxJzPWs0NeJ/ZY3Ujg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772529982; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rOTVBDryMvB/ifAjJXKEw1DxeeXGlfy8QOKzchYR8q0=; b=YCryvDeMXp2du/wLcMwE1kaXi04hTvTEvHVcRLzE958r6z9z/f1xKq+QaqjO1GeJ28u0vOc2O1t6PYW3+gvSAjuQ5coB1zJrJ1fI6nJ9xN4xaFdXRiIQVrws9K4zkgxKDqrkGOwNfzDFtlFGorjiBpzvxGu7oPImqzaqn7zQCqY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177252998199652.60792648381221; Tue, 3 Mar 2026 01:26:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM0z-0003qH-JC; Tue, 03 Mar 2026 04:26:07 -0500 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 1vxM0r-0003jX-DY for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:25:58 -0500 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 1vxM0o-0004Oy-6n for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:25:57 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-684-6m9vEX3NNECgBz04xwqFmw-1; Tue, 03 Mar 2026 04:25:49 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 76EB519560AD; Tue, 3 Mar 2026 09:25:48 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 820CF30001B9; Tue, 3 Mar 2026 09:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529953; 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=rOTVBDryMvB/ifAjJXKEw1DxeeXGlfy8QOKzchYR8q0=; b=WQcxN/TPhRK37/a8+h/jF9LrrdIT9MpHIk79VU5AxfDDnKm/R7XwdWjp9TIPr5qNqG1Qpp fi6WvbyT38wPh6aDUJPn5+9c2Jbum37n77L6p0nIKJSUvGKLaBK1IhEiHJz7Hov0k4eJcZ 3ylIUmAz36qJelotD0CjaPOs+709zZ4= X-MC-Unique: 6m9vEX3NNECgBz04xwqFmw-1 X-Mimecast-MFC-AGG-ID: 6m9vEX3NNECgBz04xwqFmw_1772529948 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 03/21] x86: q35: generate WDAT ACPI table Date: Tue, 3 Mar 2026 10:25:14 +0100 Message-ID: <20260303092532.2410177-4-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772529984331139100 It will generate WDAT table [1] customized for TCO watchdog. This allows Windows guests (Windows Server 2008/Vista+) to use TCO watchdog using built-in generic driver, which alleviates need to install vendor specific drivers. Given that enabling it might change guest behaviour (both Windows/Linux) the feature is disabled by default. Users that need it can enable the feature with following CLI option. -machine wdat=3Don 1) "Hardware Watchdog Timers Design=C2=A0Specification" https://uefi.org/acpi 'Watchdog Action Table (WDAT)' Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- include/hw/acpi/wdat-ich9.h | 15 +++++++ hw/acpi/meson.build | 3 +- hw/acpi/wdat-ich9-stub.c | 15 +++++++ hw/acpi/wdat-ich9.c | 90 +++++++++++++++++++++++++++++++++++++ hw/i386/acpi-build.c | 12 +++++ 5 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 include/hw/acpi/wdat-ich9.h create mode 100644 hw/acpi/wdat-ich9-stub.c create mode 100644 hw/acpi/wdat-ich9.c diff --git a/include/hw/acpi/wdat-ich9.h b/include/hw/acpi/wdat-ich9.h new file mode 100644 index 0000000000..60a2a6a112 --- /dev/null +++ b/include/hw/acpi/wdat-ich9.h @@ -0,0 +1,15 @@ +/* + * Copyright Red Hat, Inc. 2026 + * Author(s): Igor Mammedov + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef QEMU_HW_ACPI_WDAT_ICH9_H +#define QEMU_HW_ACPI_WDAT_ICH9_H + +#include "hw/acpi/aml-build.h" + +void build_ich9_wdat(GArray *table_data, BIOSLinker *linker, const char *o= em_id, + const char *oem_table_id, uint64_t tco_base); + +#endif /* QEMU_HW_ACPI_WDAT_ICH9_H */ diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build index 66c978aae8..22290ca835 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -24,7 +24,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_true: file= s('pci-bridge.c')) acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_true: files('pcihp.c')) acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false: files('acpi-pci-hotplug-s= tub.c')) acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c')) -acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('ich9.c', 'ich9_tco.c= ', 'ich9_timer.c')) +acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('ich9.c', 'ich9_tco.c= ', 'ich9_timer.c', 'wdat-ich9.c')) acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c')) acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files= ('ipmi-stub.c')) acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c')) @@ -33,6 +33,7 @@ if have_tpm endif system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-bui= ld-stub.c', 'ghes-stub.c', 'acpi_interface.c')) system_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-= stub.c')) +system_ss.add(when: 'CONFIG_ACPI_ICH9', if_false: files('wdat-ich9-stub.c'= )) system_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss) system_ss.add(when: 'CONFIG_GHES_CPER', if_true: files('ghes_cper.c')) system_ss.add(when: 'CONFIG_GHES_CPER', if_false: files('ghes_cper_stub.c'= )) diff --git a/hw/acpi/wdat-ich9-stub.c b/hw/acpi/wdat-ich9-stub.c new file mode 100644 index 0000000000..7c30ef3558 --- /dev/null +++ b/hw/acpi/wdat-ich9-stub.c @@ -0,0 +1,15 @@ +/* + * Copyright Red Hat, Inc. 2026 + * Author(s): Igor Mammedov + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/acpi/wdat-ich9.h" + +void build_ich9_wdat(GArray *table_data, BIOSLinker *linker, const char *o= em_id, + const char *oem_table_id, uint64_t tco_base) +{ + g_assert_not_reached(); +} diff --git a/hw/acpi/wdat-ich9.c b/hw/acpi/wdat-ich9.c new file mode 100644 index 0000000000..259c45c62d --- /dev/null +++ b/hw/acpi/wdat-ich9.c @@ -0,0 +1,90 @@ +/* + * TCO Watchdog Action Table (WDAT) + * + * Copyright Red Hat, Inc. 2026 + * Author(s): Igor Mammedov + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/acpi/wdat.h" +#include "hw/acpi/wdat-ich9.h" +#include "hw/southbridge/ich9.h" + +#define TCO_REG(base, reg_offset, reg_width) { .space_id =3D AML_AS_SYSTEM= _IO, \ + .address =3D base + reg_offset, .bit_width =3D reg_width, \ + .access_width =3D AML_WORD_ACC, }; + +/* + * "Hardware Watchdog Timers Design=C2=A0Specification" + * https://uefi.org/acpi 'Watchdog Action Table (WDAT)' + * + * ICH9 specific implementation. + */ +void build_ich9_wdat(GArray *table_data, BIOSLinker *linker, const char *o= em_id, + const char *oem_table_id, uint64_t tco_base) +{ + AcpiTable table =3D { .sig =3D "WDAT", .rev =3D 1, .oem_id =3D oem_id, + .oem_table_id =3D oem_table_id }; + struct AcpiGenericAddress tco_rld =3D TCO_REG(tco_base, 0x0, 16); + struct AcpiGenericAddress tco2_sts =3D TCO_REG(tco_base, 0x6, 16); + struct AcpiGenericAddress tco1_cnt =3D TCO_REG(tco_base, 0x8, 16); + struct AcpiGenericAddress tco_tmr =3D TCO_REG(tco_base, 0x12, 16); + + acpi_table_begin(&table, table_data); + build_append_int_noprefix(table_data, 0x20, 4); /* Watchdog Header Len= gth */ + build_append_int_noprefix(table_data, 0xff, 2); /* PCI Segment */ + build_append_int_noprefix(table_data, 0xff, 1); /* PCI Bus Number */ + build_append_int_noprefix(table_data, 0xff, 1); /* PCI Device Number */ + build_append_int_noprefix(table_data, 0xff, 1); /* PCI Function Number= */ + build_append_int_noprefix(table_data, 0, 3); /* Reserved */ + /* + * limits/resolution are defined by ICH9 TCO spec + */ + build_append_int_noprefix(table_data, 0x258, 4);/* Timer Period, ms */ + build_append_int_noprefix(table_data, 0x3ff, 4);/* Maximum Count */ + build_append_int_noprefix(table_data, 0x4, 4); /* Minimum Count */ + /* + * WATCHDOG_ENABLED & WATCHDOG_STOPPED_IN_SLEEP_STATE + */ + build_append_int_noprefix(table_data, 0x81, 1); /* Watchdog Flags */ + build_append_int_noprefix(table_data, 0, 3); /* Reserved */ + /* + * watchdog instruction entries + */ + build_append_int_noprefix(table_data, 10 /* # of actions below */, 4); + /* Action table */ + build_append_wdat_ins(table_data, WDAT_ACTION_RESET, + WDAT_INS_WRITE_VALUE, + tco_rld, 0x1, 0x1ff); + build_append_wdat_ins(table_data, WDAT_ACTION_QUERY_RUNNING_STATE, + WDAT_INS_READ_VALUE, + tco1_cnt, 0x0, 0x800); + build_append_wdat_ins(table_data, WDAT_ACTION_SET_RUNNING_STATE, + WDAT_INS_WRITE_VALUE | WDAT_INS_PRESERVE_REGISTER, + tco1_cnt, 0, 0x800); + build_append_wdat_ins(table_data, WDAT_ACTION_QUERY_STOPPED_STATE, + WDAT_INS_READ_VALUE, + tco1_cnt, 0x800, 0x800); + build_append_wdat_ins(table_data, WDAT_ACTION_SET_STOPPED_STATE, + WDAT_INS_WRITE_VALUE | WDAT_INS_PRESERVE_REGISTER, + tco1_cnt, 0x800, 0x800); + build_append_wdat_ins(table_data, WDAT_ACTION_SET_COUNTDOWN_PERIOD, + WDAT_INS_WRITE_COUNTDOWN, + tco_tmr, 0x0, 0x3FF); + build_append_wdat_ins(table_data, WDAT_ACTION_QUERY_COUNTDOWN_PERIOD, + WDAT_INS_READ_COUNTDOWN, + tco_tmr, 0x0, 0x3FF); + build_append_wdat_ins(table_data, WDAT_ACTION_QUERY_WATCHDOG_STATUS, + WDAT_INS_READ_VALUE, + tco2_sts, 0x2, 0x2); + build_append_wdat_ins(table_data, WDAT_ACTION_SET_WATCHDOG_STATUS, + WDAT_INS_WRITE_VALUE | WDAT_INS_PRESERVE_REGISTER, + tco2_sts, 0x2, 0x2); + build_append_wdat_ins(table_data, WDAT_ACTION_SET_WATCHDOG_STATUS, + WDAT_INS_WRITE_VALUE | WDAT_INS_PRESERVE_REGISTER, + tco2_sts, 0x4, 0x4); + + acpi_table_end(linker, &table); +} diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index f622b91b76..b623926de4 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -78,6 +78,7 @@ =20 #include "hw/acpi/hmat.h" #include "hw/acpi/viot.h" +#include "hw/acpi/wdat-ich9.h" =20 #include CONFIG_DEVICES =20 @@ -110,6 +111,7 @@ typedef struct AcpiPmInfo { uint16_t cpu_hp_io_base; uint16_t pcihp_io_base; uint16_t pcihp_io_len; + uint64_t tco_io_base; } AcpiPmInfo; =20 typedef struct AcpiMiscInfo { @@ -204,6 +206,7 @@ static void acpi_get_pm_info(MachineState *machine, Acp= iPmInfo *pm) pm->pcihp_io_len =3D 0; pm->smi_on_cpuhp =3D false; pm->smi_on_cpu_unplug =3D false; + pm->tco_io_base =3D 0; =20 assert(obj); init_common_fadt_data(machine, obj, &pm->fadt); @@ -225,6 +228,8 @@ static void acpi_get_pm_info(MachineState *machine, Acp= iPmInfo *pm) !!(smi_features & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT)); pm->smi_on_cpu_unplug =3D !!(smi_features & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT)); + pm->tco_io_base =3D object_property_get_uint(obj, ACPI_PM_PROP_PM_= IO_BASE, + NULL) + ICH9_PMIO_TCO_RLD; } pm->pcihp_io_base =3D object_property_get_uint(obj, ACPI_PCIHP_IO_BASE_PROP, NULL); @@ -2078,6 +2083,13 @@ void acpi_build(AcpiBuildTables *tables, MachineStat= e *machine) acpi_add_table(table_offsets, tables_blob); build_waet(tables_blob, tables->linker, x86ms->oem_id, x86ms->oem_tabl= e_id); =20 + if (pcms->wdat_enabled =3D=3D true) { + g_assert(pm.tco_io_base); + acpi_add_table(table_offsets, tables_blob); + build_ich9_wdat(tables_blob, tables->linker, x86ms->oem_id, + x86ms->oem_table_id, pm.tco_io_base); + } + /* Add tables supplied by user (if any) */ for (u =3D acpi_table_first(); u; u =3D acpi_table_next(u)) { unsigned len =3D acpi_table_len(u); --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530225; cv=none; d=zohomail.com; s=zohoarc; b=PZNv1T0Z6G7MbCp2Fw6rwvqEhb/0Ohe+0Fz0rFO7KbKRa0Rvx8aaYErIbykAQOakS+oAd//WSLZyqXaJ7rEXOf/Cmo2TAR5DeV7HNMTTJg9F7cQGmnZeZ1bpBXyBVN+bMMlRtUsW+plbk/UFk50triq9d2lEDqR+IPYm4EAJYpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530225; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xbha/IGaDlUjFoFljY+poWpmyiDFTty6W23jAkhC768=; b=MevK7cPGf9EPI/6dl30+LwNVuKQVm5kHoY0SnRFWR6pKwrKoXWVp1h/I2KRuMCi87XVQ9BviX3w6TjRDWDPsB36I4rsqrtft619edrPICuRpZUf4VNFw7kNlJ4MaiJPadvv5FnUm2Xb+WKPP4Q9qJ+Z64LCCSPOOOSKw0elC5zM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177253022525517.64538407374164; Tue, 3 Mar 2026 01:30:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1I-00049O-GW; Tue, 03 Mar 2026 04:26:24 -0500 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 1vxM0w-0003nI-7q for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:03 -0500 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 1vxM0t-0004Pi-M5 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:01 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-w7rau11SOlKaLMjJ87SqSg-1; Tue, 03 Mar 2026 04:25:55 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C6EF5195605F; Tue, 3 Mar 2026 09:25:53 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CD66630001BF; Tue, 3 Mar 2026 09:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529958; 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=xbha/IGaDlUjFoFljY+poWpmyiDFTty6W23jAkhC768=; b=Y+k++1mGpmn5Gl1TAneEDmJSlNW5/qEsDhTy+4afTxsirTG9v3PqAPiixHGWUE2sJwR2Rm nzny5hIrFU+gui3n+1bumug//1espl2PWSO16CbuqLxf1WRA5PPUSVeB1zH0PFe0T4CR1u U/xllw4+ZzDb6BKfOjRbOrpRwj2Pzqs= X-MC-Unique: w7rau11SOlKaLMjJ87SqSg-1 X-Mimecast-MFC-AGG-ID: w7rau11SOlKaLMjJ87SqSg_1772529953 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 04/21] tests: acpi: x86/q35: whitelist new WDAT table Date: Tue, 3 Mar 2026 10:25:15 +0100 Message-ID: <20260303092532.2410177-5-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530226862139100 Signed-off-by: Igor Mammedov Acked-by: Ani Sinha --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + tests/data/acpi/x86/q35/WDAT.wdat | 0 2 files changed, 1 insertion(+) create mode 100644 tests/data/acpi/x86/q35/WDAT.wdat diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..14b680debe 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/x86/q35/WDAT.wdat", diff --git a/tests/data/acpi/x86/q35/WDAT.wdat b/tests/data/acpi/x86/q35/WD= AT.wdat new file mode 100644 index 0000000000..e69de29bb2 --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530135; cv=none; d=zohomail.com; s=zohoarc; b=k3pwqrJ4Ce0tqfaiJAThJmEeLr9QI9UStxbdfCZzwIZT+oeeecTXNAza6f/u+zgQ6bvQbqMpc7ELJHHtRRdh68/mfHR1syNcKyUDpxC51UcLB+MGOcWvQDEctVHuSXUJ3VrksT3Sj9PdVvIra4ruCqMuKLQAYdjeSiXahkka5Hk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530135; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=05RW9V+9uWti5AzwJkqtF2mjeEYiDgxxMfFwdFavguw=; b=GZcpmLm4scMxaSWX1qPVMy7OJOmTOoxBB/SwrjxOpq/Pc05iDUNA/7LxUZB9w7yn/eKCT8n4tOsJ3Q2SFncCuqeYMeCBtMZetpMejNzb9IfB6zouxTju3ikQBRaBCrw1np2hl1Yg4UatKudrQAVljbRbPowNAD1n/zpoSsveBUw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530135063141.55121573803706; Tue, 3 Mar 2026 01:28:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1H-00044I-Di; Tue, 03 Mar 2026 04:26:23 -0500 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 1vxM0x-0003oo-Ti for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:05 -0500 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 1vxM0v-0004Q7-N1 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:02 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-108-xcmghZrxOAOUgaFi91dBgw-1; Tue, 03 Mar 2026 04:25:58 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1A8D8195608F; Tue, 3 Mar 2026 09:25:57 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2AE7630001B9; Tue, 3 Mar 2026 09:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529960; 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=05RW9V+9uWti5AzwJkqtF2mjeEYiDgxxMfFwdFavguw=; b=RM9vl8p6Ff8dDEtVU9Myei8N1ZVF/dPCjXX09ICZXOvkwenDmBp3T8E2XlhvIvs3eufYg5 hJcfz8+cwbuWF67YtV4dxPOSfMXBCtPesIi9rUuC0R0VMlsfLZiNUN0s1RCYTHMGDfhWYh hPIsLpuYwg+/RO3Owd4zLFh7qxCN5kE= X-MC-Unique: xcmghZrxOAOUgaFi91dBgw-1 X-Mimecast-MFC-AGG-ID: xcmghZrxOAOUgaFi91dBgw_1772529957 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 05/21] tests: acpi: x86/q35: add WDAT table test case Date: Tue, 3 Mar 2026 10:25:16 +0100 Message-ID: <20260303092532.2410177-6-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530137913139100 Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- tests/qtest/bios-tables-test.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index a5a5b8807b..5b01a657e5 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -2530,6 +2530,18 @@ static void test_acpi_isapc_smbios_legacy(void) free_test_data(&data); } =20 +static void test_acpi_q35_wdat(void) +{ + test_data data =3D { + .machine =3D MACHINE_Q35, + .arch =3D "x86", + .variant =3D ".wdat", + }; + + test_acpi_one("-machine wdat=3Don", &data); + free_test_data(&data); +} + static void test_oem_fields(test_data *data) { int i; @@ -2824,6 +2836,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/cxl", test_acpi_q35_cxl); #endif qtest_add_func("acpi/q35/slic", test_acpi_q35_slic); + qtest_add_func("acpi/q35/wdat", test_acpi_q35_wdat); } if (qtest_has_machine("microvm")) { qtest_add_func("acpi/microvm", test_acpi_microvm_tcg); --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530067; cv=none; d=zohomail.com; s=zohoarc; b=jZqfvdCfhOekerji+MtDfsZ8B2LIJNltA4p6xlB6qgHINHONKNVRZkAS0GgzklFge7rEEh75/Th9AxU6SfbaXlY5JXKpmDpE5aNG3qoSps1Qy7eKvb+s5+HUEY2f3IQWgpu1SlX/wwmmYgNVyaN9KAUL+IzZtXuS3Qdb1YQg0gM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530067; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vPOKsyEhVuAdf0HAqR1XDNX3SzJERHvpYLquVVrBIj8=; b=gO3Ivg4xgv+qnnAsUtQNq/Ds2zjn1OVReF7hBXYCaDpcjTBnXteyFMS2kNwIEpbFrTS+yI75rPnmLWQN0afNkz9Sg4yztOlukV04fhaxDRCU1SJ/4CCgWiZbuJmWg8iW0y909bEUYJnGF+zU5L9UK5sm4lQaAPXe/O5eEbwi+MU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530067016258.1913457755186; Tue, 3 Mar 2026 01:27:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1C-00041E-II; Tue, 03 Mar 2026 04:26:19 -0500 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 1vxM0z-0003r1-Km for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:07 -0500 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 1vxM0x-0004QT-MM for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:05 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-623-XuGhjup-OiKhNAsVeiLhsw-1; Tue, 03 Mar 2026 04:26:01 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7275D18003F6; Tue, 3 Mar 2026 09:26:00 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7240C30001B9; Tue, 3 Mar 2026 09:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529963; 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=vPOKsyEhVuAdf0HAqR1XDNX3SzJERHvpYLquVVrBIj8=; b=b25BZph5UbrcsbvWGP20dT700jiLrmsFMM4cHUOvTX+egHd1YDMh6gsW6Kw7XWV8QWj/h6 NOerHl76DYW2bO7pQ9+wjU6mQLWjOj0hnNV5gj29GfuqOuvgasQgXinK/Y+DmQs08pT2EH iBOmQnNq0gqCwlZww+SlfvXQEaJwqC4= X-MC-Unique: XuGhjup-OiKhNAsVeiLhsw-1 X-Mimecast-MFC-AGG-ID: XuGhjup-OiKhNAsVeiLhsw_1772529960 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 06/21] tests: acpi: x86/q35: update expected WDAT blob Date: Tue, 3 Mar 2026 10:25:17 +0100 Message-ID: <20260303092532.2410177-7-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530069096139100 replace blank table with a new one: +[000h 0000 4] Signature : "WDAT" [Watchdog Actio= n Table] +[004h 0004 4] Table Length : 00000134 +[008h 0008 1] Revision : 01 +[009h 0009 1] Checksum : 31 +[00Ah 0010 6] Oem ID : "BOCHS " +[010h 0016 8] Oem Table ID : "BXPC " +[018h 0024 4] Oem Revision : 00000001 +[01Ch 0028 4] Asl Compiler ID : "BXPC" +[020h 0032 4] Asl Compiler Revision : 00000001 + +[024h 0036 4] Header Length : 00000020 +[028h 0040 2] PCI Segment : 00FF +[02Ah 0042 1] PCI Bus : FF +[02Bh 0043 1] PCI Device : FF +[02Ch 0044 1] PCI Function : FF +[02Dh 0045 3] Reserved : 000000 +[030h 0048 4] Timer Period : 00000258 +[034h 0052 4] Max Count : 000003FF +[038h 0056 4] Min Count : 00000004 +[03Ch 0060 1] Flags (decoded below) : 81 + Enabled : 1 + Stopped When Asleep : 1 +[03Dh 0061 3] Reserved : 000000 +[040h 0064 4] Watchdog Entry Count : 0000000A + +[044h 0068 1] Watchdog Action : 01 +[045h 0069 1] Instruction : 02 +[046h 0070 2] Reserved : 0000 + +[048h 0072 12] Register Region : [Generic Address Structur= e] +[048h 0072 1] Space ID : 01 [SystemIO] +[049h 0073 1] Bit Width : 10 +[04Ah 0074 1] Bit Offset : 00 +[04Bh 0075 1] Encoded Access Width : 02 [Word Access:16] +[04Ch 0076 8] Address : 0000000000000660 + +[054h 0084 4] Value : 00000001 +[058h 0088 4] Register Mask : 000001FF + +[05Ch 0092 1] Watchdog Action : 08 +[05Dh 0093 1] Instruction : 00 +[05Eh 0094 2] Reserved : 0000 + +[060h 0096 12] Register Region : [Generic Address Structur= e] +[060h 0096 1] Space ID : 01 [SystemIO] +[061h 0097 1] Bit Width : 10 +[062h 0098 1] Bit Offset : 00 +[063h 0099 1] Encoded Access Width : 02 [Word Access:16] +[064h 0100 8] Address : 0000000000000668 + +[06Ch 0108 4] Value : 00000000 +[070h 0112 4] Register Mask : 00000800 + +[074h 0116 1] Watchdog Action : 09 +[075h 0117 1] Instruction : 82 +[076h 0118 2] Reserved : 0000 + +[078h 0120 12] Register Region : [Generic Address Structur= e] +[078h 0120 1] Space ID : 01 [SystemIO] +[079h 0121 1] Bit Width : 10 +[07Ah 0122 1] Bit Offset : 00 +[07Bh 0123 1] Encoded Access Width : 02 [Word Access:16] +[07Ch 0124 8] Address : 0000000000000668 + +[084h 0132 4] Value : 00000000 +[088h 0136 4] Register Mask : 00000800 + +[08Ch 0140 1] Watchdog Action : 0A +[08Dh 0141 1] Instruction : 00 +[08Eh 0142 2] Reserved : 0000 + +[090h 0144 12] Register Region : [Generic Address Structur= e] +[090h 0144 1] Space ID : 01 [SystemIO] +[091h 0145 1] Bit Width : 10 +[092h 0146 1] Bit Offset : 00 +[093h 0147 1] Encoded Access Width : 02 [Word Access:16] +[094h 0148 8] Address : 0000000000000668 + +[09Ch 0156 4] Value : 00000800 +[0A0h 0160 4] Register Mask : 00000800 + +[0A4h 0164 1] Watchdog Action : 0B +[0A5h 0165 1] Instruction : 82 +[0A6h 0166 2] Reserved : 0000 + +[0A8h 0168 12] Register Region : [Generic Address Structur= e] +[0A8h 0168 1] Space ID : 01 [SystemIO] +[0A9h 0169 1] Bit Width : 10 +[0AAh 0170 1] Bit Offset : 00 +[0ABh 0171 1] Encoded Access Width : 02 [Word Access:16] +[0ACh 0172 8] Address : 0000000000000668 + +[0B4h 0180 4] Value : 00000800 +[0B8h 0184 4] Register Mask : 00000800 + +[0BCh 0188 1] Watchdog Action : 06 +[0BDh 0189 1] Instruction : 03 +[0BEh 0190 2] Reserved : 0000 + +[0C0h 0192 12] Register Region : [Generic Address Structur= e] +[0C0h 0192 1] Space ID : 01 [SystemIO] +[0C1h 0193 1] Bit Width : 10 +[0C2h 0194 1] Bit Offset : 00 +[0C3h 0195 1] Encoded Access Width : 02 [Word Access:16] +[0C4h 0196 8] Address : 0000000000000672 + +[0CCh 0204 4] Value : 00000000 +[0D0h 0208 4] Register Mask : 000003FF + +[0D4h 0212 1] Watchdog Action : 05 +[0D5h 0213 1] Instruction : 01 +[0D6h 0214 2] Reserved : 0000 + +[0D8h 0216 12] Register Region : [Generic Address Structur= e] +[0D8h 0216 1] Space ID : 01 [SystemIO] +[0D9h 0217 1] Bit Width : 10 +[0DAh 0218 1] Bit Offset : 00 +[0DBh 0219 1] Encoded Access Width : 02 [Word Access:16] +[0DCh 0220 8] Address : 0000000000000672 + +[0E4h 0228 4] Value : 00000000 +[0E8h 0232 4] Register Mask : 000003FF + +[0ECh 0236 1] Watchdog Action : 20 +[0EDh 0237 1] Instruction : 00 +[0EEh 0238 2] Reserved : 0000 + +[0F0h 0240 12] Register Region : [Generic Address Structur= e] +[0F0h 0240 1] Space ID : 01 [SystemIO] +[0F1h 0241 1] Bit Width : 10 +[0F2h 0242 1] Bit Offset : 00 +[0F3h 0243 1] Encoded Access Width : 02 [Word Access:16] +[0F4h 0244 8] Address : 0000000000000666 + +[0FCh 0252 4] Value : 00000002 +[100h 0256 4] Register Mask : 00000002 + +[104h 0260 1] Watchdog Action : 21 +[105h 0261 1] Instruction : 82 +[106h 0262 2] Reserved : 0000 + +[108h 0264 12] Register Region : [Generic Address Structur= e] +[108h 0264 1] Space ID : 01 [SystemIO] +[109h 0265 1] Bit Width : 10 +[10Ah 0266 1] Bit Offset : 00 +[10Bh 0267 1] Encoded Access Width : 02 [Word Access:16] +[10Ch 0268 8] Address : 0000000000000666 + +[114h 0276 4] Value : 00000002 +[118h 0280 4] Register Mask : 00000002 + +[11Ch 0284 1] Watchdog Action : 21 +[11Dh 0285 1] Instruction : 82 +[11Eh 0286 2] Reserved : 0000 + +[120h 0288 12] Register Region : [Generic Address Structur= e] +[120h 0288 1] Space ID : 01 [SystemIO] +[121h 0289 1] Bit Width : 10 +[122h 0290 1] Bit Offset : 00 +[123h 0291 1] Encoded Access Width : 02 [Word Access:16] +[124h 0292 8] Address : 0000000000000666 + +[12Ch 0300 4] Value : 00000004 +[130h 0304 4] Register Mask : 00000004 Signed-off-by: Igor Mammedov Acked-by: Ani Sinha --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/x86/q35/WDAT.wdat | Bin 0 -> 308 bytes 2 files changed, 1 deletion(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 14b680debe..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/x86/q35/WDAT.wdat", diff --git a/tests/data/acpi/x86/q35/WDAT.wdat b/tests/data/acpi/x86/q35/WD= AT.wdat index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e1e056b390e51c49f11f7b0d35e= 4e7c55d8067b1 100644 GIT binary patch literal 308 zcmaivF$w}f3`JkEx{TV)5#kX9FW|0)oq~c}T8Xtc(2GYhPO+$9AY^#?`OH6WH>b6L zth#-_J6bm!dNVTt;vLff$K8QJ!5f$W4`2?6f@Jj4QYvm-AjK}Dx5`T;m_2{<;x*QX lL4w7nzVfzt``kzV@waK@$$at15&T;93Z<9T{~wRc(JwJ97XbhO literal 0 HcmV?d00001 --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530199; cv=none; d=zohomail.com; s=zohoarc; b=IWpHcPuTwhx2rFq910Z6pK2Z4//LKgWdsxb3Yi5L7Yw7cPPhDuAjx2k6B6mhE3HD+g9ti9qMnE8hYo+7UyGJfdoEpm6QW8Zw91+d2qv+Cv3ayYP3635XBG6qQ5B/Rco9vPeJbPcMiJbH996v9y0uOOKfJVhH97mMZ/pv8+D8eCc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530199; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=G32y2quqZLg9DONPZVRP+NrQ2bhQ1+jLO7DGgyJ6eyw=; b=jWVhKGhstVPbSnjj3jR+AZyYuJJNZdIU4FBDApEZzJEhJqg05nzdtoPf5M/49Lm7puP05dTJkhK/PTi43X8AwYeEqZLLkGUVJnGlzvC2bu0/r2yqgorcQ82gWecq1QF4jQcKj/d3HwAC+wVSdsgwS4FhnqwaKsjwzNGMgs4jn58= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530199828941.8998647988738; Tue, 3 Mar 2026 01:29:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1I-00047o-4T; Tue, 03 Mar 2026 04:26:24 -0500 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 1vxM13-0003sG-TJ for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:11 -0500 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 1vxM12-0004RQ-K7 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:09 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-136-ftiPRHPUOtGA2YR9BJd3aQ-1; Tue, 03 Mar 2026 04:26:05 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9064E1956089; Tue, 3 Mar 2026 09:26:03 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CAA0A30001B9; Tue, 3 Mar 2026 09:26:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529968; 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=G32y2quqZLg9DONPZVRP+NrQ2bhQ1+jLO7DGgyJ6eyw=; b=gsrb7PWbt3+eZ5MVe5guWd+6GdiK8GoH0FaWZ5m3Ldq2Ux33GGAA5TBpUjogJ9RTNkJkQo U3eqwMRMTlsxMtl+ebPsj3z4GiVZ1edUITKK9RBGr2tEWUuYI72J1ySsQ57yLskbplPWfq HmZRk437zEUR2eVcyY5Kk/ir2MUZtog= X-MC-Unique: ftiPRHPUOtGA2YR9BJd3aQ-1 X-Mimecast-MFC-AGG-ID: ftiPRHPUOtGA2YR9BJd3aQ_1772529963 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 07/21] arm: sbsa_gwdt: fixup default "clock-frequency" Date: Tue, 3 Mar 2026 10:25:18 +0100 Message-ID: <20260303092532.2410177-8-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530202075158500 Comment about keeping legacy freq, is wrong to begin with (should be 62.5MHz), but that value also doesn't make sense anymore as the watchdog is used only by un-versioned SBSA board and the later has hard-coded it to 1GHz. Other potential user (arm/virt) also has system clock at 1GHz. Drop misleading comment about legacy and set default to 1GHz to match both boards. Signed-off-by: Igor Mammedov --- hw/watchdog/sbsa_gwdt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index 7ade5c6f18..b739a3ce3c 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -264,11 +264,10 @@ static void wdt_sbsa_gwdt_realize(DeviceState *dev, E= rror **errp) static const Property wdt_sbsa_gwdt_props[] =3D { /* * Timer frequency in Hz. This must match the frequency used by - * the CPU's generic timer. Default 62.5Hz matches QEMU's legacy - * CPU timer frequency default. + * the CPU's generic timer. */ DEFINE_PROP_UINT64("clock-frequency", struct SBSA_GWDTState, freq, - 62500000), + 1000000000), }; =20 static void wdt_sbsa_gwdt_class_init(ObjectClass *klass, const void *data) --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530235; cv=none; d=zohomail.com; s=zohoarc; b=GPv7Wa6MzFwC5vZonZYJvyqevooA8FWuxRUln5GFDv/76e2bJxDBcUpZu9Nq8PnOXqly2lFkQc/p8ph1o3NC/5OAQGcrH4lRK5k4JDiMGnJmNcrQZEHpX18mOfWftgKJJIF4I65ISTm1pDBjLejvueLx+qwfCXBQB3LTQsedX3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530235; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xD8Gm7sAoDZ6g3mqCtbrJgkIGAF1w0BbF15sQMZ+QNs=; b=Q1A72MDZt48aKzNFAVBSZnMb6B6zK1xkHsaN3Cy2ip5CJRUeJP0eeGYfPe/Nf0VTplxO+ffrnlA1y1asJzue+bcZInOp33OFiAwks3lJiocJLXgLl+cHSvyla5ERrM9NWRc2RPlDwpnKAZel4cjUph99DXar3ZBBiWQHBLONPbE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530235210122.69782363391789; Tue, 3 Mar 2026 01:30:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1K-0004Ak-4A; Tue, 03 Mar 2026 04:26:26 -0500 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 1vxM17-0003yK-5Q for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:14 -0500 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 1vxM15-0004Rq-MD for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:12 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-151-YwTlZsCUP3y2J5SoB6kF_Q-1; Tue, 03 Mar 2026 04:26:07 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 89B911956046; Tue, 3 Mar 2026 09:26:06 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E947F30001B9; Tue, 3 Mar 2026 09:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529971; 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=xD8Gm7sAoDZ6g3mqCtbrJgkIGAF1w0BbF15sQMZ+QNs=; b=A59UGyqXfex5PmA4MI8EJPNIyfRiFsslc2aG5C16cyR2CHDAaH7nC0qqH+e9zEgv1mcDrW rpVMZD17vhTVi4PndaRcyBeVYMEWpZk7L8/oMhrpiSwzuQG0MbFVsjZZr4atNAlqGDOTTW 66xFqIvr0oB7F+t4zgewRW53T0ZGh0w= X-MC-Unique: YwTlZsCUP3y2J5SoB6kF_Q-1 X-Mimecast-MFC-AGG-ID: YwTlZsCUP3y2J5SoB6kF_Q_1772529966 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 08/21] arm: add tracing events to sbsa_gwdt Date: Tue, 3 Mar 2026 10:25:19 +0100 Message-ID: <20260303092532.2410177-9-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530236890139100 Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha --- hw/watchdog/sbsa_gwdt.c | 8 ++++++++ hw/watchdog/trace-events | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index b739a3ce3c..acb970e8b3 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -24,6 +24,7 @@ #include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" +#include "trace.h" =20 static const VMStateDescription vmstate_sbsa_gwdt =3D { .name =3D "sbsa-gwdt", @@ -62,6 +63,7 @@ static uint64_t sbsa_gwdt_rread(void *opaque, hwaddr addr= , unsigned int size) qemu_log_mask(LOG_GUEST_ERROR, "bad address in refresh frame read = :" " 0x%x\n", (int)addr); } + trace_sbsa_gwdt_refresh_read(addr, ret); return ret; } =20 @@ -93,6 +95,7 @@ static uint64_t sbsa_gwdt_read(void *opaque, hwaddr addr,= unsigned int size) qemu_log_mask(LOG_GUEST_ERROR, "bad address in control frame read = :" " 0x%x\n", (int)addr); } + trace_sbsa_gwdt_control_read(addr, ret); return ret; } =20 @@ -127,6 +130,7 @@ static void sbsa_gwdt_rwrite(void *opaque, hwaddr offse= t, uint64_t data, unsigned size) { SBSA_GWDTState *s =3D SBSA_GWDT(opaque); =20 + trace_sbsa_gwdt_refresh_write(offset, data); if (offset =3D=3D SBSA_GWDT_WRR) { s->wcs &=3D ~(SBSA_GWDT_WCS_WS0 | SBSA_GWDT_WCS_WS1); =20 @@ -141,6 +145,7 @@ static void sbsa_gwdt_write(void *opaque, hwaddr offset= , uint64_t data, unsigned size) { SBSA_GWDTState *s =3D SBSA_GWDT(opaque); =20 + trace_sbsa_gwdt_control_write(offset, data); switch (offset) { case SBSA_GWDT_WCS: s->wcs =3D data & SBSA_GWDT_WCS_EN; @@ -180,6 +185,7 @@ static void wdt_sbsa_gwdt_reset(DeviceState *dev) { SBSA_GWDTState *s =3D SBSA_GWDT(dev); =20 + trace_sbsa_gwdt_reset(); timer_del(s->timer); =20 s->wcs =3D 0; @@ -196,10 +202,12 @@ static void sbsa_gwdt_timer_sysinterrupt(void *opaque) =20 if (!(s->wcs & SBSA_GWDT_WCS_WS0)) { s->wcs |=3D SBSA_GWDT_WCS_WS0; + trace_sbsa_gwdt_ws0_asserted(); sbsa_gwdt_update_timer(s, TIMEOUT_REFRESH); qemu_set_irq(s->irq, 1); } else { s->wcs |=3D SBSA_GWDT_WCS_WS1; + trace_sbsa_gwdt_ws1_asserted(); qemu_log_mask(CPU_LOG_RESET, "Watchdog timer expired.\n"); /* * Reset the watchdog only if the guest gets notified about diff --git a/hw/watchdog/trace-events b/hw/watchdog/trace-events index ad3be1e9bd..a5c10882f4 100644 --- a/hw/watchdog/trace-events +++ b/hw/watchdog/trace-events @@ -33,3 +33,12 @@ spapr_watchdog_expired(uint64_t num, unsigned action) "n= um=3D%" PRIu64 " action=3D%u # watchdog.c watchdog_perform_action(unsigned int action) "action=3D%u" watchdog_set_action(unsigned int action) "action=3D%u" + +#sbsa_gwdt.c +sbsa_gwdt_refresh_read(uint64_t addr, uint32_t value) "[0x%" PRIx64 "] -> = 0x%" PRIx32 +sbsa_gwdt_refresh_write(uint64_t addr, uint64_t value) "[0x%" PRIx64 "] <-= 0x%" PRIx64 +sbsa_gwdt_control_read(uint64_t addr, uint32_t value) "[0x%" PRIx64 "] -> = 0x%" PRIx32 +sbsa_gwdt_control_write(uint64_t addr, uint64_t value) "[0x%" PRIx64 "] <-= 0x%" PRIx64 +sbsa_gwdt_ws0_asserted(void) "WS0 signal is asserted" +sbsa_gwdt_ws1_asserted(void) "WS1 signal is asserted" +sbsa_gwdt_reset(void) "reset watchdog to default state" --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530254; cv=none; d=zohomail.com; s=zohoarc; b=ntjfpIq01DTNKFkaCRb5myYb0PvQGem3LjnuMgFJN3ZVFDiPb2U5CL1ZfTLg8QRNkt9h6ip/4lmzCWogxkpk+t4FH7M96hCRK7sIh6nV5C9ejbldavUu3Z+EUrZrb/8AoaH3MsNNnDuUEti1udn/ww9ZlZrGkv9F1cD0Ac+fhHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530254; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Mg3ThAafWCTqWSQBaZM61tCDkORhEPiGIip8dnlp6kk=; b=Wf4QEMgTmHRd6Ia3VD6CnGRYIUxQCqSz2lIOkkyyaYLcT5ehgCkrCNSvvABWvpjxqTUwVmXMZFIp6XoM9uOxrZbjkCyHmGN8BNhJLZTVbIMgodnsZaBD3WDE0NIvws4enIiPVWCgCaEOI0BgPbKRcnUdtMRSGOvdkMLkf3RmEKM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530254938826.988802287323; Tue, 3 Mar 2026 01:30:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1K-0004BS-KE; Tue, 03 Mar 2026 04:26:26 -0500 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 1vxM1B-00041q-CP for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:19 -0500 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 1vxM19-0004SH-Io for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:17 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-410-eW7UQOz5PKywGtSaCtaheQ-1; Tue, 03 Mar 2026 04:26:10 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6F9AC1956096; Tue, 3 Mar 2026 09:26:09 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E1E8330001B9; Tue, 3 Mar 2026 09:26:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529975; 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=Mg3ThAafWCTqWSQBaZM61tCDkORhEPiGIip8dnlp6kk=; b=P1L5qZA5Uz8eXtDOnOQ+shEZxVJn4FLHG1B/Af732Evyh/o0xGgwzT746HGu/lfO3xOBZg qG5QNHQS1Man8SaplKoG8zp2SuQL/fQw0bBvTy2KswfS3+R7QgY9zrFOhFlagOexw+ljgQ XRC5EpfS2PLtkLp1pu3yIR+tystk5Ow= X-MC-Unique: eW7UQOz5PKywGtSaCtaheQ-1 X-Mimecast-MFC-AGG-ID: eW7UQOz5PKywGtSaCtaheQ_1772529969 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 09/21] arm: virt: create sbsa_gwdt watchdog Date: Tue, 3 Mar 2026 10:25:20 +0100 Message-ID: <20260303092532.2410177-10-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530281515158500 Allow to use SBSA generic watchdog with virt machine type. (includes conditional generation of corresponding FDT and ACPI GTDT descriptors) Use '-device sbsa_gwdt' to command line to enable it. Tested with Fedora 43: FDT: -M virt,acpi=3Doff -device sbsa_gwdt ACPI: -M virt -device sbsa_gwdt Signed-off-by: Igor Mammedov --- hw/arm/Kconfig | 1 + hw/arm/virt-acpi-build.c | 33 +++++++++++++++++++++++++++++++-- hw/arm/virt.c | 2 ++ hw/core/sysbus-fdt.c | 32 ++++++++++++++++++++++++++++++++ hw/watchdog/sbsa_gwdt.c | 1 + 5 files changed, 67 insertions(+), 2 deletions(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index c66c452737..1222efadd1 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -36,6 +36,7 @@ config ARM_VIRT select VIRTIO_MEM_SUPPORTED select ACPI_CXL select ACPI_HMAT + select WDT_SBSA =20 config CUBIEBOARD bool diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 719d2f994e..9c14b1d4d5 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -64,6 +64,7 @@ #include "hw/virtio/virtio-acpi.h" #include "target/arm/cpu.h" #include "target/arm/multiprocessing.h" +#include "hw/watchdog/sbsa_gwdt.h" =20 #define ARM_SPI_BASE 32 =20 @@ -863,6 +864,8 @@ build_gtdt(GArray *table_data, BIOSLinker *linker, Virt= MachineState *vms) const uint32_t irqflags =3D 0; /* Interrupt is Level triggered */ AcpiTable table =3D { .sig =3D "GTDT", .rev =3D 3, .oem_id =3D vms->oe= m_id, .oem_table_id =3D vms->oem_table_id }; + uint32_t gtdt_start =3D table_data->len; + Object *wdt =3D object_resolve_type_unambiguous(TYPE_WDT_SBSA, NULL); =20 acpi_table_begin(&table, table_data); =20 @@ -893,10 +896,15 @@ build_gtdt(GArray *table_data, BIOSLinker *linker, Vi= rtMachineState *vms) build_append_int_noprefix(table_data, irqflags, 4); /* CntReadBase Physical address */ build_append_int_noprefix(table_data, 0xFFFFFFFFFFFFFFFF, 8); + /* Platform Timer Count */ - build_append_int_noprefix(table_data, 0, 4); + build_append_int_noprefix(table_data, wdt ? 1 : 0, 4); /* Platform Timer Offset */ - build_append_int_noprefix(table_data, 0, 4); + build_append_int_noprefix(table_data, + wdt ? (table_data->len - gtdt_start) + + 4 + 4 + 4 /* len of this & following 2 fields to skip */ + : 0, 4); + if (vms->ns_el2_virt_timer_irq) { /* Virtual EL2 Timer GSIV */ build_append_int_noprefix(table_data, ARCH_TIMER_NS_EL2_VIRT_IRQ, = 4); @@ -906,6 +914,27 @@ build_gtdt(GArray *table_data, BIOSLinker *linker, Vir= tMachineState *vms) build_append_int_noprefix(table_data, 0, 4); build_append_int_noprefix(table_data, 0, 4); } + + /* ACPI 6.5 spec: 5.2.25.2 ARM Generic Watchdog Structure (Table 5-124= ) */ + if (wdt) { + PlatformBusDevice *pbus =3D PLATFORM_BUS_DEVICE(vms->platform_bus_= dev); + SysBusDevice *sd =3D SYS_BUS_DEVICE(wdt); + hwaddr mmio_base =3D vms->memmap[VIRT_PLATFORM_BUS].base; + hwaddr rbase =3D mmio_base + platform_bus_get_mmio_addr(pbus, sd, = 0); + hwaddr cbase =3D mmio_base + platform_bus_get_mmio_addr(pbus, sd, = 1); + int irq =3D ARM_SPI_BASE + vms->irqmap[VIRT_PLATFORM_BUS] + + platform_bus_get_irqn(pbus, sd, 0); + + build_append_int_noprefix(table_data, 1 /* Type: Watchdog GT */, 1= ); + build_append_int_noprefix(table_data, 28 /* Length */, 2); + build_append_int_noprefix(table_data, 0, 1); /* Reserved */ + /* RefreshFrame Physical Address */ + build_append_int_noprefix(table_data, rbase, 8); + /* WatchdogControlFrame Physical Address */ + build_append_int_noprefix(table_data, cbase, 8); + build_append_int_noprefix(table_data, irq, 4); /* Watchdog Timer G= SIV */ + build_append_int_noprefix(table_data, 0, 4); /* Watchdog Timer Fla= gs */ + } acpi_table_end(linker, &table); } =20 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index cab2e21e8a..a87991b591 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -95,6 +95,7 @@ #include "hw/cxl/cxl.h" #include "hw/cxl/cxl_host.h" #include "qemu/guest-random.h" +#include "hw/watchdog/sbsa_gwdt.h" =20 static GlobalProperty arm_virt_compat_defaults[] =3D { { TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "48" }, @@ -3474,6 +3475,7 @@ static void virt_machine_class_init(ObjectClass *oc, = const void *data) machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE); machine_class_allow_dynamic_sysbus_dev(mc, TYPE_UEFI_VARS_SYSBUS); machine_class_allow_dynamic_sysbus_dev(mc, TYPE_ARM_SMMUV3); + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_WDT_SBSA); #ifdef CONFIG_TPM machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS); #endif diff --git a/hw/core/sysbus-fdt.c b/hw/core/sysbus-fdt.c index 89d0c46445..76aa1bc579 100644 --- a/hw/core/sysbus-fdt.c +++ b/hw/core/sysbus-fdt.c @@ -36,6 +36,7 @@ #include "hw/display/ramfb.h" #include "hw/uefi/var-service-api.h" #include "hw/arm/fdt.h" +#include "hw/watchdog/sbsa_gwdt.h" =20 /* * internal struct that contains the information to create dynamic @@ -118,6 +119,36 @@ static int add_uefi_vars_node(SysBusDevice *sbdev, voi= d *opaque) return 0; } =20 +static int add_sbsa_gwdt_node(SysBusDevice *sbdev, void *opaque) +{ + PlatformBusFDTData *data =3D opaque; + PlatformBusDevice *pbus =3D data->pbus; + const char *parent_node =3D data->pbus_node_name; + void *fdt =3D data->fdt; + uint64_t cbase, rbase; + char *nodename; + int irq; + + cbase =3D platform_bus_get_mmio_addr(pbus, sbdev, 1); /* control fram= e */ + rbase =3D platform_bus_get_mmio_addr(pbus, sbdev, 0); /* refresh fram= e */ + irq =3D platform_bus_get_irqn(pbus, sbdev, 0); + + nodename =3D g_strdup_printf("%s/watchdog@%" PRIx64, parent_node, cbas= e); + qemu_fdt_add_subnode(fdt, nodename); + + qemu_fdt_setprop_string(fdt, nodename, "compatible", "arm,sbsa-gwdt"); + qemu_fdt_setprop_cells(fdt, nodename, "reg", + cbase, SBSA_GWDT_CMMIO_SIZE, + rbase, SBSA_GWDT_RMMIO_SIZE); + qemu_fdt_setprop_cells(fdt, nodename, "interrupts", + GIC_FDT_IRQ_TYPE_SPI, data->irq_start + irq, + GIC_FDT_IRQ_FLAGS_LEVEL_HI); + qemu_fdt_setprop_cell(fdt, nodename, "timeout-sec", 30); + + g_free(nodename); + return 0; +} + static int no_fdt_node(SysBusDevice *sbdev, void *opaque) { return 0; @@ -140,6 +171,7 @@ static const BindingEntry bindings[] =3D { TYPE_BINDING(TYPE_ARM_SMMUV3, no_fdt_node), TYPE_BINDING(TYPE_RAMFB_DEVICE, no_fdt_node), TYPE_BINDING(TYPE_UEFI_VARS_SYSBUS, add_uefi_vars_node), + TYPE_BINDING(TYPE_WDT_SBSA, add_sbsa_gwdt_node), TYPE_BINDING("", NULL), /* last element */ }; =20 diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index acb970e8b3..c4dd8005b7 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -285,6 +285,7 @@ static void wdt_sbsa_gwdt_class_init(ObjectClass *klass= , const void *data) dc->realize =3D wdt_sbsa_gwdt_realize; device_class_set_legacy_reset(dc, wdt_sbsa_gwdt_reset); dc->hotpluggable =3D false; + dc->user_creatable =3D true; set_bit(DEVICE_CATEGORY_WATCHDOG, dc->categories); dc->vmsd =3D &vmstate_sbsa_gwdt; dc->desc =3D "SBSA-compliant generic watchdog device"; --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772529994; cv=none; d=zohomail.com; s=zohoarc; b=nnF2CmPsN35UjvqxGmqxcM5vg3T2P2YjVSFXMz0IVjc3FkujlbPqGqUz2MvhqMmOF9shnJMRGQG8+3sFXX6uPEDqUco5lFItfhED3ydhhdmSBVxr7YrXRWZpFdyCFklRsmKEDpA4RAQb/I27ZTY3w8y3Ainxes1pA1rwqp8zmyA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772529994; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=I89jagiyUTSdR4ox4hiKhJe39qI0yX7MnHEPNLVHs48=; b=ADEjFpEwZtgY0WnTA+X7r2Vc7R02wqLXldmfDWWbSK/8c26DnFQ7TGTDTF1urMSHtUgXstbF4mnBjXyLqBAvRQm0Gz5dqrLFo4QrbwvJSKD0jQ0ZOJvmYjLA9Ul2E1AL51zAoKt8WFNNFZP64vpZZrvZFYk6W1G+6pH2QJZYF18= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177252999436684.5612787325349; Tue, 3 Mar 2026 01:26:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1L-0004C9-5y; Tue, 03 Mar 2026 04:26:27 -0500 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 1vxM1E-00042d-M2 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:21 -0500 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 1vxM1D-0004SV-0x for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:20 -0500 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-256-0am4qaREMBqulAtSmUoQiQ-1; Tue, 03 Mar 2026 04:26:14 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8B6DF1800473; Tue, 3 Mar 2026 09:26:12 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C6E9230001B9; Tue, 3 Mar 2026 09:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529977; 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=I89jagiyUTSdR4ox4hiKhJe39qI0yX7MnHEPNLVHs48=; b=cllwJdmAUnfsoibUPvIeY0OqlITpCUTP+9xqdgoEOsvbZtu3y+UeyO9MB2B2mh8lGCy/66 NeRmZdiQfoD6TPR7XDbhLYBAGCVShvHMHOxIPRb+/AXAiu0bHg/3pnVLtxkJ0ujedJ3nd/ KhZr6WbtoFqfEg9U/GEENHm1jWKfF3Y= X-MC-Unique: 0am4qaREMBqulAtSmUoQiQ-1 X-Mimecast-MFC-AGG-ID: 0am4qaREMBqulAtSmUoQiQ_1772529972 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 10/21] arm: sbsa_gwdt: add 'wdat' option Date: Tue, 3 Mar 2026 10:25:21 +0100 Message-ID: <20260303092532.2410177-11-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772529995503158500 it will be used by arm/virt board, to pick WDAT compatible watchdog impl. and act as switch over to WDAT ACPI table vesus default GTDT ACPI table. Signed-off-by: Igor Mammedov --- include/hw/watchdog/sbsa_gwdt.h | 1 + hw/watchdog/sbsa_gwdt.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/include/hw/watchdog/sbsa_gwdt.h b/include/hw/watchdog/sbsa_gwd= t.h index 307a4f291a..dc77e6be60 100644 --- a/include/hw/watchdog/sbsa_gwdt.h +++ b/include/hw/watchdog/sbsa_gwdt.h @@ -73,6 +73,7 @@ typedef struct SBSA_GWDTState { uint32_t woru; uint32_t wcvl; uint32_t wcvu; + bool wdat; } SBSA_GWDTState; =20 #endif /* WDT_SBSA_GWDT_H */ diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index c4dd8005b7..40d80f7f2b 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -265,6 +265,13 @@ static void wdt_sbsa_gwdt_realize(DeviceState *dev, Er= ror **errp) =20 sysbus_init_irq(sbd, &s->irq); =20 + /* + * WDAT supports only upto 1KHz resolution, + */ + if (s->wdat) { + s->freq =3D 1000; + } + s->timer =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, sbsa_gwdt_timer_sysinter= rupt, dev); } @@ -276,6 +283,7 @@ static const Property wdt_sbsa_gwdt_props[] =3D { */ DEFINE_PROP_UINT64("clock-frequency", struct SBSA_GWDTState, freq, 1000000000), + DEFINE_PROP_BOOL("wdat", struct SBSA_GWDTState, wdat, false), }; =20 static void wdt_sbsa_gwdt_class_init(ObjectClass *klass, const void *data) --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530245; cv=none; d=zohomail.com; s=zohoarc; b=dMQlRDLx+54ICPxCkzP4Ju/28ECajjUdIpXM3re3xvaTp6sS3S1GU8NKvNOtwXXZwXkcuieLTh5YAqw+y4KBJjFliceLskVgNx5yF1boYd4tyGdNmKQQXOkNKj70xFNRErczD9/uS84y9uHLerwcQP8B+oAmZYptXYuYSGF/qhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530245; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7PUVBe2IQNgjcOKWQH4SscP1oEuYAw2PvocIwATZt44=; b=GeQpWmiYlvDPYbwmvLSSe7Zrj0iHZNLlB6fDqgsGRsUK+C6EdEwoymCneavxMvpumZtcshs061flR9J5ZPvE3uiB07gY/c3dgCdyyVxeWDBbc9A5kZa2sye1rkQFNT8P81ikuzWaTHZC0OayDuAzr+5oqUq9V1R7qO7KxWvF860= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530245487140.5031006648876; Tue, 3 Mar 2026 01:30:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1N-0004DR-AB; Tue, 03 Mar 2026 04:26:29 -0500 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 1vxM1I-00049s-V6 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:24 -0500 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 1vxM1G-0004St-Md for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:24 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-35-Jb34bZShPJ2JuXfl59YZJQ-1; Tue, 03 Mar 2026 04:26:17 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8C54D1956095; Tue, 3 Mar 2026 09:26:15 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E41A830001B9; Tue, 3 Mar 2026 09:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529980; 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=7PUVBe2IQNgjcOKWQH4SscP1oEuYAw2PvocIwATZt44=; b=d/0Kl1Z6LPlBntwJXRQQFvyQaQp/C8mUSz8ppWueDwHa+8uBwBhmHUYkh4MnSNL8wV2wPL iCAuwbqurAkpuo9XD65zbj2POeCbTlHCPpX6VHv2gU2j2Jg6GJ/AKbnZ/rTwMGpHg79tn6 uD4RlYNRopuJdOMNLOeIvJTJjfbswDk= X-MC-Unique: Jb34bZShPJ2JuXfl59YZJQ-1 X-Mimecast-MFC-AGG-ID: Jb34bZShPJ2JuXfl59YZJQ_1772529975 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 11/21] arm: virt: add support for WDAT based watchdog Date: Tue, 3 Mar 2026 10:25:22 +0100 Message-ID: <20260303092532.2410177-12-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530247184139100 And generate WDAT table tailored for sbsa_gwdt and disable watchdog entry in GTDT ACPI table if WDAT is enabled, since they are mutualy exclusive due to different timer resolution of sbsa_gwdt. To enable use "-device sbsa-gwdt,wdat=3Don" option Signed-off-by: Igor Mammedov --- include/hw/acpi/wdat-gwdt.h | 19 ++++++++ hw/acpi/meson.build | 2 + hw/acpi/wdat-gwdt-stub.c | 16 +++++++ hw/acpi/wdat-gwdt.c | 92 +++++++++++++++++++++++++++++++++++++ hw/arm/virt-acpi-build.c | 58 +++++++++++++++++------ 5 files changed, 172 insertions(+), 15 deletions(-) create mode 100644 include/hw/acpi/wdat-gwdt.h create mode 100644 hw/acpi/wdat-gwdt-stub.c create mode 100644 hw/acpi/wdat-gwdt.c diff --git a/include/hw/acpi/wdat-gwdt.h b/include/hw/acpi/wdat-gwdt.h new file mode 100644 index 0000000000..42339e031e --- /dev/null +++ b/include/hw/acpi/wdat-gwdt.h @@ -0,0 +1,19 @@ +/* + * GWDT Watchdog Action Table (WDAT) definition + * + * Copyright Red Hat, Inc. 2026 + * Author(s): Igor Mammedov + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef QEMU_HW_ACPI_WDAT_GWDT_H +#define QEMU_HW_ACPI_WDAT_GWDT_H + +#include "hw/acpi/aml-build.h" +#include "hw/watchdog/sbsa_gwdt.h" + +void build_gwdt_wdat(GArray *table_data, BIOSLinker *linker, const char *o= em_id, + const char *oem_table_id, uint64_t rbase, uint64_t cb= ase, + uint64_t freq); + +#endif /* QEMU_HW_ACPI_WDAT_GWDT_H */ diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build index 22290ca835..189bbb0257 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -28,12 +28,14 @@ acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('i= ch9.c', 'ich9_tco.c', 'ic acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c')) acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files= ('ipmi-stub.c')) acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c')) +acpi_ss.add(when: 'CONFIG_WDT_SBSA', if_true: files('wdat-gwdt.c')) if have_tpm acpi_ss.add(files('tpm.c')) endif system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-bui= ld-stub.c', 'ghes-stub.c', 'acpi_interface.c')) system_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-= stub.c')) system_ss.add(when: 'CONFIG_ACPI_ICH9', if_false: files('wdat-ich9-stub.c'= )) +system_ss.add(when: 'CONFIG_WDT_SBSA', if_false: files('wdat-gwdt-stub.c')) system_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss) system_ss.add(when: 'CONFIG_GHES_CPER', if_true: files('ghes_cper.c')) system_ss.add(when: 'CONFIG_GHES_CPER', if_false: files('ghes_cper_stub.c'= )) diff --git a/hw/acpi/wdat-gwdt-stub.c b/hw/acpi/wdat-gwdt-stub.c new file mode 100644 index 0000000000..4d43783f70 --- /dev/null +++ b/hw/acpi/wdat-gwdt-stub.c @@ -0,0 +1,16 @@ +/* + * Copyright Red Hat, Inc. 2026 + * Author(s): Igor Mammedov + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/acpi/wdat-gwdt.h" + +void build_gwdt_wdat(GArray *table_data, BIOSLinker *linker, const char *o= em_id, + const char *oem_table_id, uint64_t rbase, uint64_t cb= ase, + uint64_t freq) +{ + g_assert_not_reached(); +} diff --git a/hw/acpi/wdat-gwdt.c b/hw/acpi/wdat-gwdt.c new file mode 100644 index 0000000000..226ba3f01e --- /dev/null +++ b/hw/acpi/wdat-gwdt.c @@ -0,0 +1,92 @@ +/* + * SBSA GWDT Watchdog Action Table (WDAT) + * + * Copyright Red Hat, Inc. 2026 + * Author(s): Igor Mammedov + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/acpi/aml-build.h" +#include "hw/acpi/wdat-gwdt.h" +#include "hw/acpi/wdat.h" +#include "hw/watchdog/sbsa_gwdt.h" + +#define GWDT_REG(base, reg_offset, reg_width) { \ + .space_id =3D AML_AS_SYSTEM_MEMORY, \ + .address =3D base + reg_offset, .bit_width =3D reg_width,= \ + .access_width =3D AML_DWORD_ACC }; + +/* + * "Hardware Watchdog Timers Design=C2=A0Specification" + * https://uefi.org/acpi 'Watchdog Action Table (WDAT)' + */ +void build_gwdt_wdat(GArray *table_data, BIOSLinker *linker, const char *o= em_id, + const char *oem_table_id, uint64_t rbase, uint64_t cb= ase, + uint64_t freq) +{ + AcpiTable table =3D { .sig =3D "WDAT", .rev =3D 1, .oem_id =3D oem_id, + .oem_table_id =3D oem_table_id }; + + struct AcpiGenericAddress wrr =3D GWDT_REG(rbase, 0x0, 32); + struct AcpiGenericAddress wor_l =3D GWDT_REG(cbase, SBSA_GWDT_WOR, 32= ); + struct AcpiGenericAddress wcs =3D GWDT_REG(cbase, SBSA_GWDT_WCS, 32); + + acpi_table_begin(&table, table_data); + build_append_int_noprefix(table_data, 0x20, 4); /* Watchdog Header Len= gth */ + build_append_int_noprefix(table_data, 0xff, 2); /* PCI Segment */ + build_append_int_noprefix(table_data, 0xff, 1); /* PCI Bus Number */ + build_append_int_noprefix(table_data, 0xff, 1); /* PCI Device Number */ + build_append_int_noprefix(table_data, 0xff, 1); /* PCI Function Number= */ + build_append_int_noprefix(table_data, 0, 3); /* Reserved */ + /* + * WDAT spec suports only 1KHz or more coarse watchdog timer, + * Set resolution to minimum supported 1ms. + * Before starting watchdog Windows set countdown value to 5min. + */ + g_assert(freq <=3D 1000); + build_append_int_noprefix(table_data, 1, 4);/* Timer Period, ms */ + /* + * Needs to be more than 4min, otherwise Windows 11 won't start watchd= og. + * Set max to limits to arbitrary max 10min and min to 5sec. + */ + build_append_int_noprefix(table_data, 600 * freq, 4);/* Maximum Count = */ + build_append_int_noprefix(table_data, 5 * freq, 4); /* Minimum Count = */ + /* + * WATCHDOG_ENABLED + */ + build_append_int_noprefix(table_data, 0x81, 1); /* Watchdog Flags */ + build_append_int_noprefix(table_data, 0, 3); /* Reserved */ + /* + * watchdog instruction entries + */ + build_append_int_noprefix(table_data, 8, 4); + /* Action table */ + build_append_wdat_ins(table_data, WDAT_ACTION_QUERY_RUNNING_STATE, + WDAT_INS_READ_VALUE, + wcs, 0x1, 0x1); + build_append_wdat_ins(table_data, WDAT_ACTION_RESET, + WDAT_INS_WRITE_VALUE, + wrr, 0x1, 0x7); + build_append_wdat_ins(table_data, WDAT_ACTION_SET_COUNTDOWN_PERIOD, + WDAT_INS_WRITE_COUNTDOWN, + wor_l, 0, 0xffffffff); + build_append_wdat_ins(table_data, WDAT_ACTION_SET_RUNNING_STATE, + WDAT_INS_WRITE_VALUE | WDAT_INS_PRESERVE_REGISTER, + wcs, 1, 0x00000001); + build_append_wdat_ins(table_data, WDAT_ACTION_QUERY_STOPPED_STATE, + WDAT_INS_READ_VALUE, + wcs, 0x0, 0x00000001); + build_append_wdat_ins(table_data, WDAT_ACTION_SET_STOPPED_STATE, + WDAT_INS_WRITE_VALUE | WDAT_INS_PRESERVE_REGISTER, + wcs, 0x0, 0x00000001); + build_append_wdat_ins(table_data, WDAT_ACTION_QUERY_WATCHDOG_STATUS, + WDAT_INS_READ_VALUE, + wcs, 0x4, 0x00000004); + build_append_wdat_ins(table_data, WDAT_ACTION_SET_WATCHDOG_STATUS, + WDAT_INS_WRITE_VALUE | WDAT_INS_PRESERVE_REGISTER, + wrr, 0x4, 0x4); + + acpi_table_end(linker, &table); +} diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 9c14b1d4d5..e9670b1a2b 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -65,6 +65,7 @@ #include "target/arm/cpu.h" #include "target/arm/multiprocessing.h" #include "hw/watchdog/sbsa_gwdt.h" +#include "hw/acpi/wdat-gwdt.h" =20 #define ARM_SPI_BASE 32 =20 @@ -849,12 +850,25 @@ build_srat(GArray *table_data, BIOSLinker *linker, Vi= rtMachineState *vms) acpi_table_end(linker, &table); } =20 +static void virt_get_wdt_options(VirtMachineState *vms, Object *wdt, + hwaddr *rbase, hwaddr *cbase, int *irq) +{ + PlatformBusDevice *pbus =3D PLATFORM_BUS_DEVICE(vms->platform_bus_dev); + SysBusDevice *sd =3D SYS_BUS_DEVICE(wdt); + hwaddr mmio_base =3D vms->memmap[VIRT_PLATFORM_BUS].base; + *rbase =3D mmio_base + platform_bus_get_mmio_addr(pbus, sd, 0); + *cbase =3D mmio_base + platform_bus_get_mmio_addr(pbus, sd, 1); + *irq =3D ARM_SPI_BASE + vms->irqmap[VIRT_PLATFORM_BUS] + + platform_bus_get_irqn(pbus, sd, 0); +} + /* * ACPI spec, Revision 6.5 * 5.2.25 Generic Timer Description Table (GTDT) */ static void -build_gtdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) +build_gtdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms, + Object *wdt, bool add_watchdog) { /* * Table 5-117 Flag Definitions @@ -865,7 +879,6 @@ build_gtdt(GArray *table_data, BIOSLinker *linker, Virt= MachineState *vms) AcpiTable table =3D { .sig =3D "GTDT", .rev =3D 3, .oem_id =3D vms->oe= m_id, .oem_table_id =3D vms->oem_table_id }; uint32_t gtdt_start =3D table_data->len; - Object *wdt =3D object_resolve_type_unambiguous(TYPE_WDT_SBSA, NULL); =20 acpi_table_begin(&table, table_data); =20 @@ -898,12 +911,12 @@ build_gtdt(GArray *table_data, BIOSLinker *linker, Vi= rtMachineState *vms) build_append_int_noprefix(table_data, 0xFFFFFFFFFFFFFFFF, 8); =20 /* Platform Timer Count */ - build_append_int_noprefix(table_data, wdt ? 1 : 0, 4); + build_append_int_noprefix(table_data, add_watchdog ? 1 : 0, 4); /* Platform Timer Offset */ build_append_int_noprefix(table_data, - wdt ? (table_data->len - gtdt_start) + - 4 + 4 + 4 /* len of this & following 2 fields to skip */ - : 0, 4); + add_watchdog ? (table_data->len - gtdt_start) + + 4 + 4 + 4 /* len of this & following 2 fields to sk= ip */ + : 0, 4); =20 if (vms->ns_el2_virt_timer_irq) { /* Virtual EL2 Timer GSIV */ @@ -916,14 +929,10 @@ build_gtdt(GArray *table_data, BIOSLinker *linker, Vi= rtMachineState *vms) } =20 /* ACPI 6.5 spec: 5.2.25.2 ARM Generic Watchdog Structure (Table 5-124= ) */ - if (wdt) { - PlatformBusDevice *pbus =3D PLATFORM_BUS_DEVICE(vms->platform_bus_= dev); - SysBusDevice *sd =3D SYS_BUS_DEVICE(wdt); - hwaddr mmio_base =3D vms->memmap[VIRT_PLATFORM_BUS].base; - hwaddr rbase =3D mmio_base + platform_bus_get_mmio_addr(pbus, sd, = 0); - hwaddr cbase =3D mmio_base + platform_bus_get_mmio_addr(pbus, sd, = 1); - int irq =3D ARM_SPI_BASE + vms->irqmap[VIRT_PLATFORM_BUS] + - platform_bus_get_irqn(pbus, sd, 0); + if (add_watchdog) { + int irq; + hwaddr rbase, cbase; + virt_get_wdt_options(vms, wdt, &rbase, &cbase, &irq); =20 build_append_int_noprefix(table_data, 1 /* Type: Watchdog GT */, 1= ); build_append_int_noprefix(table_data, 28 /* Length */, 2); @@ -1282,8 +1291,14 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuil= dTables *tables) VirtMachineClass *vmc =3D VIRT_MACHINE_GET_CLASS(vms); GArray *table_offsets; unsigned dsdt, xsdt; + bool has_wdat =3D false; GArray *tables_blob =3D tables->table_data; MachineState *ms =3D MACHINE(vms); + Object *wdt =3D object_resolve_type_unambiguous(TYPE_WDT_SBSA, NULL); + + if (wdt) { + has_wdat =3D object_property_get_bool(wdt, "wdat", &error_abort); + } =20 table_offsets =3D g_array_new(false, true /* clear */, sizeof(uint32_t)); @@ -1303,6 +1318,19 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuil= dTables *tables) acpi_add_table(table_offsets, tables_blob); build_madt(tables_blob, tables->linker, vms); =20 + acpi_add_table(table_offsets, tables_blob); + if (wdt && has_wdat) { + int irq; + hwaddr rbase, cbase; + uint64_t freq =3D object_property_get_uint(wdt, "clock-frequency", + &error_abort); + virt_get_wdt_options(vms, wdt, &rbase, &cbase, &irq); + + build_gwdt_wdat(tables_blob, tables->linker, + vms->oem_id, vms->oem_table_id, + rbase, cbase, freq); + } + if (!vmc->no_cpu_topology) { acpi_add_table(table_offsets, tables_blob); build_pptt(tables_blob, tables->linker, ms, @@ -1310,7 +1338,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuild= Tables *tables) } =20 acpi_add_table(table_offsets, tables_blob); - build_gtdt(tables_blob, tables->linker, vms); + build_gtdt(tables_blob, tables->linker, vms, wdt, wdt && !has_wdat); =20 acpi_add_table(table_offsets, tables_blob); { --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530136; cv=none; d=zohomail.com; s=zohoarc; b=dG7ELOEsVErWBQzpduPgXiFeJcawf9Ker7imhb7/1rOsGqBJvZrXQdo4eG5MZahXCdrPWsE69qJOoudlJaLJi4EwrFdZi+8acD0Vwk6aydECuoRkj0pdFQxhqMqLI6mUMKDP7M3V4j7zihC+OySLUuTtNqUVARuvqEYOZbVvTPA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530136; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tBe3Z1p6RUc5jMy7PSA5mqWIquYF/BeqKY1D+XMQbIg=; b=JtrGxd2PuvQbr1wSmz4Tl3poQ0IM2xooXcDihpD6/POQ46KKXBEowIZrlyfzBFKMrIVmlueoWw8OIuU0psIWLBwSzyewpsUd+RIdh84I7SVOTxIFHNfoG4JboJuTxTCPSwgI9ZN6KVpHE6csjmpzs6+7vqDABvhBJYsDYjl4K6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530136783436.74094498057957; Tue, 3 Mar 2026 01:28:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1L-0004Cr-Li; Tue, 03 Mar 2026 04:26:27 -0500 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 1vxM1J-0004Ax-Uu for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:26 -0500 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 1vxM1I-0004Ta-0s for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:25 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-130-18tMvffUNCGXpTcqatCEnA-1; Tue, 03 Mar 2026 04:26:19 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5FE10195608F; Tue, 3 Mar 2026 09:26:18 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C9C3F30001B9; Tue, 3 Mar 2026 09:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529983; 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=tBe3Z1p6RUc5jMy7PSA5mqWIquYF/BeqKY1D+XMQbIg=; b=DSycru09qjPAxDSEFA26qZwaoSJEjwp67Ix7X6MU7fx8MXWKNeAJuEMxUCMi6IUNatmOAi sxsbnN8T4iars+zYGBH8zufBUoherijJLLcch05LoTAlEsAPaC7u752pru1E6ruFV0o1f0 Ejq50vMHu89hCyMmHTdl3lxDTYstCfg= X-MC-Unique: 18tMvffUNCGXpTcqatCEnA-1 X-Mimecast-MFC-AGG-ID: 18tMvffUNCGXpTcqatCEnA_1772529978 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 12/21] tests: acpi: arm/virt: whitelist new WDAT table Date: Tue, 3 Mar 2026 10:25:23 +0100 Message-ID: <20260303092532.2410177-13-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530137802158500 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + tests/data/acpi/aarch64/virt/WDAT.wdat | 0 2 files changed, 1 insertion(+) create mode 100644 tests/data/acpi/aarch64/virt/WDAT.wdat diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..135186b40b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/WDAT.wdat", diff --git a/tests/data/acpi/aarch64/virt/WDAT.wdat b/tests/data/acpi/aarch= 64/virt/WDAT.wdat new file mode 100644 index 0000000000..e69de29bb2 --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530086; cv=none; d=zohomail.com; s=zohoarc; b=QGc6IGIV2OXcX6x7ngEgCkpVoS7DwVB+PlrpPY3+jTDKxqpfEyg2wV/CFx0eTqWqMC60cdcoEPv+q44Squ3nl02WJXlahkfcMd5mQxbAb2N1slitFMBN57/HRXuHhcj4SYK1wrULkMFyEuAH49SeYVnLTJZSzKHnIPAqNeEZuE8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530086; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tmO6yW5qHc3RJmhk0uJMi2AqGREZ+/06OMioTcNQ2+Y=; b=DidgDX3cPIIMnHCDcJ+NUjyajjorFMaqoi/IenFhgpID7gbR/WKf1NJsC9mxsG6cMOCd0g1ytp6wKVMwha1P+R/S+/hsumvmbcBuww6NWkm0BrNzmEk7rBp+KV1ovB8sKXuH2QSGyHIpq4qLeFE+auZJWBZDuEoFFfWQR0CH7j4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530086333201.37286324266324; Tue, 3 Mar 2026 01:28:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1N-0004EA-RK; Tue, 03 Mar 2026 04:26:29 -0500 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 1vxM1L-0004Cw-Nn for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:27 -0500 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 1vxM1K-0004UD-Ao for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:27 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-311-YBdFuhm2PTauA688Yan_pg-1; Tue, 03 Mar 2026 04:26:22 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 45EB3180057E; Tue, 3 Mar 2026 09:26:21 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B8BD630001B9; Tue, 3 Mar 2026 09:26:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529985; 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=tmO6yW5qHc3RJmhk0uJMi2AqGREZ+/06OMioTcNQ2+Y=; b=haj/oR6Be250vaC6gZNT8pzfjwbC1lOlLsbmfcS0xiIlDZoyoxWODedBxFLNEwkEKCUB7B 0KLNUnJZGdD2K9IKK7lQByervj6gVhlgyT8xvngBxMg37q4Dp1emR+hEQ4gFZON7sJSQ6H ciGwmuBNfX2M2p7dfEsDAGDXRRQS7wc= X-MC-Unique: YBdFuhm2PTauA688Yan_pg-1 X-Mimecast-MFC-AGG-ID: YBdFuhm2PTauA688Yan_pg_1772529981 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 13/21] tests: acpi: arm/virt: add WDAT table test case Date: Tue, 3 Mar 2026 10:25:24 +0100 Message-ID: <20260303092532.2410177-14-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530087636158500 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 5b01a657e5..5082866184 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -2271,6 +2271,25 @@ static void test_acpi_aarch64_virt_tcg_msi_gicv2m(vo= id) free_test_data(&data); } =20 +static void test_acpi_aarch64_virt_tcg_wdat(void) +{ + test_data data =3D { + .machine =3D "virt", + .arch =3D "aarch64", + .variant =3D ".wdat", + .tcg_only =3D true, + .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", + .uefi_fl2 =3D "pc-bios/edk2-arm-vars.fd", + .cd =3D "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.= qcow2", + .ram_start =3D 0x40000000ULL, + .scan_len =3D 128ULL * MiB, + }; + + test_acpi_one("-cpu cortex-a57 " + "-device sbsa_gwdt,wdat=3Don", &data); + free_test_data(&data); +} + static void test_acpi_q35_viot(void) { test_data data =3D { @@ -2889,6 +2908,8 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/virt/smmuv3-dev", test_acpi_aarch64_virt_smmuv3_dev); } + qtest_add_func("acpi/virt/acpi-watchdog", + test_acpi_aarch64_virt_tcg_wdat); } } else if (strcmp(arch, "riscv64") =3D=3D 0) { if (has_tcg && qtest_has_device("virtio-blk-pci")) { --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530086; cv=none; d=zohomail.com; s=zohoarc; b=KviH86dFNn3tETJZnWChraHIUL7Vmy3T8dOhwEoyDCVwIp3vi2LOjFlUWV2v3dDKSHvJOGiYgPwPpS281Hizow3YZsYxuzWsMC8IScY0YLmAeuQRqQx6xpThnoUGK5SnaohGKdxgFztRwt7cbPSTZAmMDCNylYCRTKkNwDFd428= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530086; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+GitxHWRLytSVJY2v2Z6PVnhpyZ229SBYvbXelkiKi0=; b=A1uJa8NquVKqsQKVw9vWoUpe48zvksDaJu1E2prPxAZBHdhSzOnZqVNQuQHZW75cTjnbo7PnMYu49dUitWOD5TuOm7dBig9lXsVm+RJqhYda3aAt0tsJg94ML4qQtN9NtARAZWowGWl2yg2NdXOShlwgA6mP0eQtQsEF5eLbHt8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530086145936.1806122324438; Tue, 3 Mar 2026 01:28:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1R-0004GI-9K; Tue, 03 Mar 2026 04:26:33 -0500 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 1vxM1O-0004FF-UD for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:31 -0500 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 1vxM1N-0004Uo-98 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:30 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-L5gULacoNkCr00TvxGE39A-1; Tue, 03 Mar 2026 04:26:25 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2997219560B7; Tue, 3 Mar 2026 09:26:24 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9E31130001B9; Tue, 3 Mar 2026 09:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529988; 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=+GitxHWRLytSVJY2v2Z6PVnhpyZ229SBYvbXelkiKi0=; b=CtjrM9EYHMHzDtbWWEl2FpVcbIT3MNpCO9gzuvSfi1kfQLlpc3WgD8703/NOOehfOq15M9 bM0cI5UJVF0vNB9VX5UOiQQ0XYln3zNYZUfqUB+BRRCskq6Ln7z/zd5XZ4svWdymVHPydN 6auOf7+D75GV+m6IyOkWzJkumL0Qb58= X-MC-Unique: L5gULacoNkCr00TvxGE39A-1 X-Mimecast-MFC-AGG-ID: L5gULacoNkCr00TvxGE39A_1772529984 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 14/21] tests: acpi: arm/virt: update expected WDAT blob Date: Tue, 3 Mar 2026 10:25:25 +0100 Message-ID: <20260303092532.2410177-15-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530087715158500 replace blank table with a new one: [000h 0000 004h] Signature : "WDAT" [Watchdog Action= Table] [004h 0004 004h] Table Length : 00000104 [008h 0008 001h] Revision : 01 [009h 0009 001h] Checksum : 3B [00Ah 0010 006h] Oem ID : "BOCHS " [010h 0016 008h] Oem Table ID : "BXPC " [018h 0024 004h] Oem Revision : 00000001 [01Ch 0028 004h] Asl Compiler ID : "BXPC" [020h 0032 004h] Asl Compiler Revision : 00000001 [024h 0036 004h] Header Length : 00000020 [028h 0040 002h] PCI Segment : 00FF [02Ah 0042 001h] PCI Bus : FF [02Bh 0043 001h] PCI Device : FF [02Ch 0044 001h] PCI Function : FF [02Dh 0045 003h] Reserved : 000000 [030h 0048 004h] Timer Period : 00000001 [034h 0052 004h] Max Count : 000927C0 [038h 0056 004h] Min Count : 00001388 [03Ch 0060 001h] Flags (decoded below) : 81 Enabled : 1 Stopped When Asleep : 1 [03Dh 0061 003h] Reserved : 000000 [040h 0064 004h] Watchdog Entry Count : 00000008 [044h 0068 001h] Watchdog Action : 08 [045h 0069 001h] Instruction : 00 [046h 0070 002h] Reserved : 0000 [048h 0072 00Ch] Register Region : [Generic Address Structure] [048h 0072 001h] Space ID : 00 [SystemMemory] [049h 0073 001h] Bit Width : 20 [04Ah 0074 001h] Bit Offset : 00 [04Bh 0075 001h] Encoded Access Width : 03 [DWord Access:32] [04Ch 0076 008h] Address : 000000000C001000 [054h 0084 004h] Value : 00000001 [058h 0088 004h] Register Mask : 00000001 [05Ch 0092 001h] Watchdog Action : 01 [05Dh 0093 001h] Instruction : 02 [05Eh 0094 002h] Reserved : 0000 [060h 0096 00Ch] Register Region : [Generic Address Structure] [060h 0096 001h] Space ID : 00 [SystemMemory] [061h 0097 001h] Bit Width : 20 [062h 0098 001h] Bit Offset : 00 [063h 0099 001h] Encoded Access Width : 03 [DWord Access:32] [064h 0100 008h] Address : 000000000C000000 [06Ch 0108 004h] Value : 00000001 [070h 0112 004h] Register Mask : 00000007 [074h 0116 001h] Watchdog Action : 06 [075h 0117 001h] Instruction : 03 [076h 0118 002h] Reserved : 0000 [078h 0120 00Ch] Register Region : [Generic Address Structure] [078h 0120 001h] Space ID : 00 [SystemMemory] [079h 0121 001h] Bit Width : 20 [07Ah 0122 001h] Bit Offset : 00 [07Bh 0123 001h] Encoded Access Width : 03 [DWord Access:32] [07Ch 0124 008h] Address : 000000000C001008 [084h 0132 004h] Value : 00000000 [088h 0136 004h] Register Mask : FFFFFFFF [08Ch 0140 001h] Watchdog Action : 09 [08Dh 0141 001h] Instruction : 82 [08Eh 0142 002h] Reserved : 0000 [090h 0144 00Ch] Register Region : [Generic Address Structure] [090h 0144 001h] Space ID : 00 [SystemMemory] [091h 0145 001h] Bit Width : 20 [092h 0146 001h] Bit Offset : 00 [093h 0147 001h] Encoded Access Width : 03 [DWord Access:32] [094h 0148 008h] Address : 000000000C001000 [09Ch 0156 004h] Value : 00000001 [0A0h 0160 004h] Register Mask : 00000001 [0A4h 0164 001h] Watchdog Action : 0A [0A5h 0165 001h] Instruction : 00 [0A6h 0166 002h] Reserved : 0000 [0A8h 0168 00Ch] Register Region : [Generic Address Structure] [0A8h 0168 001h] Space ID : 00 [SystemMemory] [0A9h 0169 001h] Bit Width : 20 [0AAh 0170 001h] Bit Offset : 00 [0ABh 0171 001h] Encoded Access Width : 03 [DWord Access:32] [0ACh 0172 008h] Address : 000000000C001000 [0B4h 0180 004h] Value : 00000000 [0B8h 0184 004h] Register Mask : 00000001 [0BCh 0188 001h] Watchdog Action : 0B [0BDh 0189 001h] Instruction : 82 [0BEh 0190 002h] Reserved : 0000 [0C0h 0192 00Ch] Register Region : [Generic Address Structure] [0C0h 0192 001h] Space ID : 00 [SystemMemory] [0C1h 0193 001h] Bit Width : 20 [0C2h 0194 001h] Bit Offset : 00 [0C3h 0195 001h] Encoded Access Width : 03 [DWord Access:32] [0C4h 0196 008h] Address : 000000000C001000 [0CCh 0204 004h] Value : 00000000 [0D0h 0208 004h] Register Mask : 00000001 [0D4h 0212 001h] Watchdog Action : 20 [0D5h 0213 001h] Instruction : 00 [0D6h 0214 002h] Reserved : 0000 [0D8h 0216 00Ch] Register Region : [Generic Address Structure] [0D8h 0216 001h] Space ID : 00 [SystemMemory] [0D9h 0217 001h] Bit Width : 20 [0DAh 0218 001h] Bit Offset : 00 [0DBh 0219 001h] Encoded Access Width : 03 [DWord Access:32] [0DCh 0220 008h] Address : 000000000C001000 [0E4h 0228 004h] Value : 00000004 [0E8h 0232 004h] Register Mask : 00000004 [0ECh 0236 001h] Watchdog Action : 21 [0EDh 0237 001h] Instruction : 82 [0EEh 0238 002h] Reserved : 0000 [0F0h 0240 00Ch] Register Region : [Generic Address Structure] [0F0h 0240 001h] Space ID : 00 [SystemMemory] [0F1h 0241 001h] Bit Width : 20 [0F2h 0242 001h] Bit Offset : 00 [0F3h 0243 001h] Encoded Access Width : 03 [DWord Access:32] [0F4h 0244 008h] Address : 000000000C000000 [0FCh 0252 004h] Value : 00000004 [100h 0256 004h] Register Mask : 00000004 Raw Table Data: Length 260 (0x104) Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/aarch64/virt/WDAT.wdat | Bin 0 -> 260 bytes 2 files changed, 1 deletion(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 135186b40b..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/aarch64/virt/WDAT.wdat", diff --git a/tests/data/acpi/aarch64/virt/WDAT.wdat b/tests/data/acpi/aarch= 64/virt/WDAT.wdat index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..81786ab0968a5c2004fcf3eee5e= c443525c98c3e 100644 GIT binary patch literal 260 zcmZ9GK?=3Df93`F1e7j4yr;05B!L%3?|!kvPGUPo6wmN$z`$;Z+_NHV+(^E|hYDnUAR z*Zy+1?se (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530054838802.7812310132474; Tue, 3 Mar 2026 01:27:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1T-0004Pr-Mk; Tue, 03 Mar 2026 04:26:35 -0500 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 1vxM1R-0004Iw-Qn for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:34 -0500 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 1vxM1Q-0004VL-E9 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:33 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-349-HvmYUqwcPoyA57BjwJuQUQ-1; Tue, 03 Mar 2026 04:26:28 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1A2E119560A5; Tue, 3 Mar 2026 09:26:27 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8285230001B9; Tue, 3 Mar 2026 09:26:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529991; 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=dTXxd75Vb4tuRfGl0ssr0ZVyvGOct06D38HHDpDitnk=; b=CZqmKtGYKj/1kZf6r+DkbyryquFY6fEpuQYbUjWKJjeaslBtwYUjULa4RIjeVoiCW+jleB Vl1VJoy7VR3NV22sPzjXjTRUN+xfCVAqLgKovr5mPn3xEq22YVuT/iKBbYMMjDmz1DCCEP HMhIXUs1beodKhrErDq/rqO8xIZ2SOk= X-MC-Unique: HvmYUqwcPoyA57BjwJuQUQ-1 X-Mimecast-MFC-AGG-ID: HvmYUqwcPoyA57BjwJuQUQ_1772529987 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 15/21] tests: acpi: arm/virt: whitelist GTDT table Date: Tue, 3 Mar 2026 10:25:26 +0100 Message-ID: <20260303092532.2410177-16-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530056822139100 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..3e9be28cc4 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/GTDT", --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530073; cv=none; d=zohomail.com; s=zohoarc; b=giB1W8590htR0m+lGnA3stzgG9p5ebyxA0UrFV2Hh2CshP6BaKb7py7ieoKF177CzEeltxHjrUT9UA7YKI5kRXsjpIuYHJq3LBzn+9OiKjPpC1lKU848PtEKofjtu+ioRNS1ecLxlOB6FqICpxCD4hDBy3Mj55JRVbZDq+4fNDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530073; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xX+Ce8faP4H6bZXal0EHFBt7uYRGVZmS8qFGR4H+x4c=; b=ZCrvKdmMcvvsGyYVv6BmQqqHaWZrNvCXFbJ4QW1NCJNJCcVV4vQRAskAFoETTpgngFNrkDoxfEV7g04+ulF/th4aECuuijXuPZgiqJS3mjQrJVppgIg2rQ2kjIjKeDmmnoW3bD7XxXpDEVkL1Zx5mA9k2ncbFW7JHt5wnCp2lkg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530073280141.76593097630087; Tue, 3 Mar 2026 01:27:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1W-0004bN-Jv; Tue, 03 Mar 2026 04:26:38 -0500 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 1vxM1V-0004Wb-0M for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:37 -0500 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 1vxM1T-0004Va-Dy for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:36 -0500 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-41-rLN_f7OkPd-5PCx2-58nNA-1; Tue, 03 Mar 2026 04:26:31 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2DB711800465; Tue, 3 Mar 2026 09:26:30 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 71F7630001B9; Tue, 3 Mar 2026 09:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529993; 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=xX+Ce8faP4H6bZXal0EHFBt7uYRGVZmS8qFGR4H+x4c=; b=SHELP3OM/a6LJBsQ7wqVclqNWyXPJdSMcpeZJf+jgy/n8ZRAQ59UAysSO2jhzKwVRt4rmY 2B/nMGoXWPZe+dmIfyyCjWBTTFDDhMLpXd1TsYZ6jd/NYxFGdQjonCQPn0AYyYYHFRyOWn uyENBGGsCc+ODiT88NeWo4xARmDUubI= X-MC-Unique: rLN_f7OkPd-5PCx2-58nNA-1 X-Mimecast-MFC-AGG-ID: rLN_f7OkPd-5PCx2-58nNA_1772529990 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 16/21] tests: acpi: arm/virt: add GTDT watchdog table test case Date: Tue, 3 Mar 2026 10:25:27 +0100 Message-ID: <20260303092532.2410177-17-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530073612158500 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 5082866184..11c6854af8 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -2290,6 +2290,24 @@ static void test_acpi_aarch64_virt_tcg_wdat(void) free_test_data(&data); } =20 +static void test_acpi_aarch64_virt_tcg_gtdt_wd(void) +{ + test_data data =3D { + .machine =3D "virt", + .arch =3D "aarch64", + .variant =3D ".gwdt", + .tcg_only =3D true, + .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", + .uefi_fl2 =3D "pc-bios/edk2-arm-vars.fd", + .cd =3D "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.= qcow2", + .ram_start =3D 0x40000000ULL, + .scan_len =3D 128ULL * MiB, + }; + + test_acpi_one("-cpu cortex-a57 " "-device sbsa_gwdt", &data); + free_test_data(&data); +} + static void test_acpi_q35_viot(void) { test_data data =3D { @@ -2910,6 +2928,8 @@ int main(int argc, char *argv[]) } qtest_add_func("acpi/virt/acpi-watchdog", test_acpi_aarch64_virt_tcg_wdat); + qtest_add_func("acpi/virt/gwdt-watchdog", + test_acpi_aarch64_virt_tcg_gtdt_wd); } } else if (strcmp(arch, "riscv64") =3D=3D 0) { if (has_tcg && qtest_has_device("virtio-blk-pci")) { --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530112; cv=none; d=zohomail.com; s=zohoarc; b=m58Vs/cVYPceozQLTDTtDgizcv8U6m9SbQUVKEE05LyIHiUdmIX5GYm3c8WOxKjhmTTWlXPuyxLfxTpwNu1Hlhu3UJ82F2hyjbQ1Swx0CQ7uOKHKfVTHqjOI0B3WVUFTEDB7qhCDOd4CIEbd4gV9CYSt9iBNxEkS3TOTPvCNzTc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530112; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vmh3DBm76W4KCElh6gdEXbenxmD8vrjSG0p0OjH+Y2E=; b=fzGtR+zHfUeNX3968qo2Y4YurgFbIO/JN7zXuNizw3aOiUHyVbTX9YrtGkgBiKVADE0LXn5ZmCMFO/+NQpbIG3nuo0Q1zGbZDbtCoNkMOj6ZnacaJBX3PzyGMnK91oNC5GJhpdgbUWtsK3E+9LC1fdn9SKdlwUYR/mmslB6himo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530112866529.8445122475391; Tue, 3 Mar 2026 01:28:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1b-0004p7-HM; Tue, 03 Mar 2026 04:26:43 -0500 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 1vxM1Z-0004ht-Av for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:41 -0500 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 1vxM1W-0004Wv-7T for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:39 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-518-TlrU8ywMMWipOWALZhNhxg-1; Tue, 03 Mar 2026 04:26:34 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2B49D19560B5; Tue, 3 Mar 2026 09:26:33 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 86D7E30001B9; Tue, 3 Mar 2026 09:26:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772529997; 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=vmh3DBm76W4KCElh6gdEXbenxmD8vrjSG0p0OjH+Y2E=; b=S8DfjgIsjYsNqxGm15oCGpdG3dbeS/Hyd/Rv11bCFy4RV3tEdpjN/4qfCzOWdBIpyWSN53 +nkvJSSTTuDb5sq95FgAYqPOhxII2PVGy8pR49EOq5Lt5s9YSxalNXhEj7spr0tv3n+TY7 IK6v5dyhCcdRT7tjLbU8TrshPgF+WY8= X-MC-Unique: TlrU8ywMMWipOWALZhNhxg-1 X-Mimecast-MFC-AGG-ID: TlrU8ywMMWipOWALZhNhxg_1772529993 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 17/21] tests: acpi: arm/virt: update expected GTDT blob Date: Tue, 3 Mar 2026 10:25:28 +0100 Message-ID: <20260303092532.2410177-18-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530113802158500 Expected diff from base GTDT is an addition of watchdog timer block: [000h 0000 004h] Signature : "GTDT" [Generic Timer = Description Table] -[004h 0004 004h] Table Length : 00000068 +[004h 0004 004h] Table Length : 00000084 [008h 0008 001h] Revision : 03 -[009h 0009 001h] Checksum : 93 +[009h 0009 001h] Checksum : 39 [00Ah 0010 006h] Oem ID : "BOCHS " [010h 0016 008h] Oem Table ID : "BXPC " [018h 0024 004h] Oem Revision : 00000001 @@ -48,17 +48,30 @@ Always On : 0 [050h 0080 008h] Counter Read Block Address : FFFFFFFFFFFFFFFF -[058h 0088 004h] Platform Timer Count : 00000000 -[05Ch 0092 004h] Platform Timer Offset : 00000000 +[058h 0088 004h] Platform Timer Count : 00000001 +[05Ch 0092 004h] Platform Timer Offset : 00000068 [060h 0096 004h] Virtual EL2 Timer GSIV : 00000000 [064h 0100 004h] Virtual EL2 Timer Flags : 00000000 -Raw Table Data: Length 104 (0x68) +[068h 0104 001h] Subtable Type : 01 [Generic Watchdog Time= r] +[069h 0105 002h] Length : 001C +[06Bh 0107 001h] Reserved : 00 +[06Ch 0108 008h] Refresh Frame Address : 000000000C000000 +[074h 0116 008h] Control Frame Address : 000000000C001000 +[07Ch 0124 004h] Timer Interrupt : 00000090 +[080h 0128 004h] Timer Flags (decoded below) : 00000000 + Trigger Mode : 0 + Polarity : 0 + Security : 0 + +Raw Table Data: Length 132 (0x84) Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/aarch64/virt/GTDT.gwdt | Bin 0 -> 132 bytes 2 files changed, 1 deletion(-) create mode 100644 tests/data/acpi/aarch64/virt/GTDT.gwdt diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 3e9be28cc4..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/aarch64/virt/GTDT", diff --git a/tests/data/acpi/aarch64/virt/GTDT.gwdt b/tests/data/acpi/aarch= 64/virt/GTDT.gwdt new file mode 100644 index 0000000000000000000000000000000000000000..e0c2151fa7d3432740bb997d7d3= 3669e30f133aa GIT binary patch literal 132 zcmZ<{aS3T*U|?Xjbnlgt5 literal 0 HcmV?d00001 --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530093; cv=none; d=zohomail.com; s=zohoarc; b=PLH3vwx2+InXDWFdN5da3CJXEIKmJMwvlprPx1hGql7PqiwV5SxyhASHly3SXyUXUPaZ+GYUhEz61u43IEn78YkBBNZm/GDcCfJuEl3Cs0W9GvztEEwAEbbYePvgYRlDw2VTp3NgzxgqY6Y+NLmLOiagVgAbUPE1uUMZQjNq6rk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530093; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qa8iKOFVTu1KN2GB8ZAQ4RUxo84O6wQ2x9G6m3nAIkk=; b=Z8lwULqPExmdpNQT6LoeWRsqU1JRJFZL1oOOojfjeGdNYRe/cO6alxW3VHmCgsoWSSiNPQ7oHejY3u6dto0HRVXSNLolaIp0z9C0Oi42X8pnvM4xjIT2CP9V+qx6cA1blz0OFO3wWCm9kORVZQ1hV05OMWobGb0j7462TxFbYP4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530093026425.7780107373567; Tue, 3 Mar 2026 01:28:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1c-0004rS-Ca; Tue, 03 Mar 2026 04:26:44 -0500 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 1vxM1b-0004n2-19 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:43 -0500 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 1vxM1Z-0004XS-Eo for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:42 -0500 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-189-nM9arlKdMJqQA503506Akw-1; Tue, 03 Mar 2026 04:26:37 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EBA4B1800367; Tue, 3 Mar 2026 09:26:35 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6B68030001B9; Tue, 3 Mar 2026 09:26:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772530000; 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=qa8iKOFVTu1KN2GB8ZAQ4RUxo84O6wQ2x9G6m3nAIkk=; b=JrFAfjbKd/uW3ysSvTXgfwWOYtZnzSfj6x5G/yWe4CWtKb7Ykbp8mHrrJGEjbyKW4ooLsR XlSfgsIAw+b1U+ZoqPZ1K+69HF9XHIyug3BjHhjdr8Sk9sWXGP8wASJDgFk17NDUg55d1B /DQ9Afv/shLmGtZPKZdesTCCP4n7MY8= X-MC-Unique: nM9arlKdMJqQA503506Akw-1 X-Mimecast-MFC-AGG-ID: nM9arlKdMJqQA503506Akw_1772529996 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 18/21] sbsa_gwdt: reduce code ident Date: Tue, 3 Mar 2026 10:25:29 +0100 Message-ID: <20260303092532.2410177-19-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530095275139100 Signed-off-by: Igor Mammedov --- hw/watchdog/sbsa_gwdt.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index 40d80f7f2b..91f9a4202c 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -105,25 +105,27 @@ static void sbsa_gwdt_update_timer(SBSA_GWDTState *s,= WdtRefreshType rtype) =20 timer_del(s->timer); =20 - if (s->wcs & SBSA_GWDT_WCS_EN) { - /* - * Extract the upper 16 bits from woru & 32 bits from worl - * registers to construct the 48 bit offset value - */ - timeout =3D s->woru; - timeout <<=3D 32; - timeout |=3D s->worl; - timeout =3D muldiv64(timeout, NANOSECONDS_PER_SECOND, s->freq); - timeout +=3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); - - if ((rtype =3D=3D EXPLICIT_REFRESH) || ((rtype =3D=3D TIMEOUT_REFR= ESH) && - (!(s->wcs & SBSA_GWDT_WCS_WS0)))) { - /* store the current timeout value into compare registers */ - s->wcvu =3D timeout >> 32; - s->wcvl =3D timeout; - } - timer_mod(s->timer, timeout); + if (!(s->wcs & SBSA_GWDT_WCS_EN)) { + return; + } + + /* + * Extract the upper 16 bits from woru & 32 bits from worl + * registers to construct the 48 bit offset value + */ + timeout =3D s->woru; + timeout <<=3D 32; + timeout |=3D s->worl; + timeout =3D muldiv64(timeout, NANOSECONDS_PER_SECOND, s->freq); + timeout +=3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); + + if ((rtype =3D=3D EXPLICIT_REFRESH) || ((rtype =3D=3D TIMEOUT_REFRESH)= && + (!(s->wcs & SBSA_GWDT_WCS_WS0)))) { + /* store the current timeout value into compare registers */ + s->wcvu =3D timeout >> 32; + s->wcvl =3D timeout; } + timer_mod(s->timer, timeout); } =20 static void sbsa_gwdt_rwrite(void *opaque, hwaddr offset, uint64_t data, --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530097; cv=none; d=zohomail.com; s=zohoarc; b=mdSJeXU60Mkvf2uJHwfBYdB9N4/h5dI1V+1PSu5JuFsxCkhvQXhDECSjnMCWlW4BzyV6fj4QIAoxzMf1vmfWWva9WjlAuvALPeTwNc1S/iIV2HrYvxlVJ9c4cSfhlFMFL3d+QfkZbxwMhyFtrPaOnt//QX/M7pWZd16Au+1J/Jc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530097; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=he/XKQVhHHZiAjZueN+uimRzEwb7exyo+Go1JwWJzNI=; b=Grgl3Rc9uxgYV5hwTjGA1BiXe2VxygssGvY37GBIwGnBXaSjpr/YGubZ4Sl5CauNgHxDU4FZgPEQBOVWuvtaPEKEbWUxmf1IgxizdGZeMr4Do9Icu6aGc0dpyn5m6wSnFuUacBqz12IkOOt7mpGlPm9G8LZqyd2fQlwuL83wwHw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530097851853.4484928795847; Tue, 3 Mar 2026 01:28:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1h-0004un-0Z; Tue, 03 Mar 2026 04:26:49 -0500 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 1vxM1f-0004u4-HC for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:47 -0500 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 1vxM1d-0004YS-5Z for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:47 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-355-OSD0qgpfNLewyIxuUPGRmg-1; Tue, 03 Mar 2026 04:26:41 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B2F481956071; Tue, 3 Mar 2026 09:26:39 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5016F30001B9; Tue, 3 Mar 2026 09:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772530004; 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=he/XKQVhHHZiAjZueN+uimRzEwb7exyo+Go1JwWJzNI=; b=M/ZHbykoal+8I6JF+ddSveNfjhrpSjFSmdV4jUoXKNn36i0suvCmjNdzNkljddcjGuMCOr XyEAEPWmyiOXK8IXJMxuCvE1vfUiStPLGB2/DB+uFDsvN02SS50PwweC7SxdbiSwmuKpCz rTvnedhThKPx2qZ3RB7LDeH+pP7wXk8= X-MC-Unique: OSD0qgpfNLewyIxuUPGRmg-1 X-Mimecast-MFC-AGG-ID: OSD0qgpfNLewyIxuUPGRmg_1772529999 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 19/21] sbsa_gwdt: move all foo_REFRESH logic under REFRESH condition Date: Tue, 3 Mar 2026 10:25:30 +0100 Message-ID: <20260303092532.2410177-20-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530099384139100 and while at it, simplify timeout calculations Signed-off-by: Igor Mammedov --- hw/watchdog/sbsa_gwdt.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index 91f9a4202c..c2d6f672f9 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -109,22 +109,20 @@ static void sbsa_gwdt_update_timer(SBSA_GWDTState *s,= WdtRefreshType rtype) return; } =20 - /* - * Extract the upper 16 bits from woru & 32 bits from worl - * registers to construct the 48 bit offset value - */ - timeout =3D s->woru; - timeout <<=3D 32; - timeout |=3D s->worl; - timeout =3D muldiv64(timeout, NANOSECONDS_PER_SECOND, s->freq); - timeout +=3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); - if ((rtype =3D=3D EXPLICIT_REFRESH) || ((rtype =3D=3D TIMEOUT_REFRESH)= && (!(s->wcs & SBSA_GWDT_WCS_WS0)))) { - /* store the current timeout value into compare registers */ + uint64_t offset =3D (uint64_t)s->woru << 32 | s->worl; + timeout =3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + + muldiv64(offset, NANOSECONDS_PER_SECOND, s->freq); + + /* store (now + offset)ns in WCV */ s->wcvu =3D timeout >> 32; s->wcvl =3D timeout; + } else { + g_assert_not_reached(); } + + timeout =3D (uint64_t)s->wcvu << 32 | s->wcvl; timer_mod(s->timer, timeout); } =20 --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530024; cv=none; d=zohomail.com; s=zohoarc; b=QhJwxwHjicCIXBIqtGaLas7pGLKKTvbHdRWdLGmVjGKcvY+5bQULbNbuZfnHqSj20ISBTnbzAmb5xIO97MIZ1SwW6/syCVKwUI3PXefoU4ZZgwJsrFe0IYMYbrZmf/AKSws6XTXOFgVtbZnBRFggmrV/rAUZouGC6R5ey9OOShw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530024; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NqYVdsmBxHw6Xm69IJ/3yY2NBlMNzsfIenqE5vc56as=; b=N2PQ7upqdZu4mC0S00Qi6v6aLcjdQscPP5mBUunEx723tk7PQEg3HUgdVWpqzVzj9F+BGPaM3WwpAP4VxjpVxcZjmnDXmMQ9hn3CbUWhuFFLV3Qxi1vA0uhl03PRyRO24Bgn0ru+G8hquZ0+DppNvPGj4G3tPIQ23gq9ttQYMwg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772530024404476.9554868790095; Tue, 3 Mar 2026 01:27:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1k-0004wN-4t; Tue, 03 Mar 2026 04:26:52 -0500 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 1vxM1i-0004vB-BB for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:50 -0500 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 1vxM1g-0004ZQ-PV for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:49 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-441-G6PYbvq7Phy9G6Qs-WQNsA-1; Tue, 03 Mar 2026 04:26:44 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 96F2A19560A3; Tue, 3 Mar 2026 09:26:42 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 15EB530001B9; Tue, 3 Mar 2026 09:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772530008; 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=NqYVdsmBxHw6Xm69IJ/3yY2NBlMNzsfIenqE5vc56as=; b=P5eBijjKNNY+KRT7orevBo4r9Ya6K79grgw4jmsZvgm69FRwk+f2JuMek6chnQwbMK19Dm YOTRR03o+sTb2fQ4rHA9zJxxlgLKUvXjuBkQRrCgzUVC59xXf2WLjE14MYE/eiI/f6tI2q JBuCnon9piEGWq2JQk1MJC0qnWGe6/M= X-MC-Unique: G6PYbvq7Phy9G6Qs-WQNsA-1 X-Mimecast-MFC-AGG-ID: G6PYbvq7Phy9G6Qs-WQNsA_1772530002 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 20/21] sbsa_gwdt: reschedule timer on direct WCV load Date: Tue, 3 Mar 2026 10:25:31 +0100 Message-ID: <20260303092532.2410177-21-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530025485158500 According to spec[1] "The compare value can either be loaded directly or indirectly on an explicit refresh or timeout refresh" while QEMU does allow to write WCV, it doesn't act on new value, which it should do according to pseudo code in spec: "TimeoutRefresh =3D ( SystemCounter [63:0] > CompareValue [63:0])" fix it by updating timer on WCV write. Fixes Windows watchdog reboots, since it sets WOR to ~4sec && never triggers WRR refresh it however writes insane lage value into WCV right after WOR & WCS enable, which effectively cancels too small WOR value and missing WRR. 1) Arm=C2=AE Server Base System Architecture 6.0 Platform Design Document DEN0029D 6.0 "A.2 Watchdog Operation" Signed-off-by: Igor Mammedov --- hw/watchdog/sbsa_gwdt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index c2d6f672f9..7fec61b7b0 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -44,6 +44,7 @@ static const VMStateDescription vmstate_sbsa_gwdt =3D { typedef enum WdtRefreshType { EXPLICIT_REFRESH =3D 0, TIMEOUT_REFRESH =3D 1, + WCV_LOAD =3D 2, } WdtRefreshType; =20 static uint64_t sbsa_gwdt_rread(void *opaque, hwaddr addr, unsigned int si= ze) @@ -118,8 +119,6 @@ static void sbsa_gwdt_update_timer(SBSA_GWDTState *s, W= dtRefreshType rtype) /* store (now + offset)ns in WCV */ s->wcvu =3D timeout >> 32; s->wcvl =3D timeout; - } else { - g_assert_not_reached(); } =20 timeout =3D (uint64_t)s->wcvu << 32 | s->wcvl; @@ -169,10 +168,16 @@ static void sbsa_gwdt_write(void *opaque, hwaddr offs= et, uint64_t data, =20 case SBSA_GWDT_WCV: s->wcvl =3D data; + if (s->wcs & SBSA_GWDT_WCS_EN) { + sbsa_gwdt_update_timer(s, WCV_LOAD); + } break; =20 case SBSA_GWDT_WCVU: s->wcvu =3D data; + if (s->wcs & SBSA_GWDT_WCS_EN) { + sbsa_gwdt_update_timer(s, WCV_LOAD); + } break; =20 default: --=20 2.47.3 From nobody Sat Apr 11 23:02:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772530033; cv=none; d=zohomail.com; s=zohoarc; b=l5r6j2g19PSNw1aiVjKJtcn5K90r0CJGTGPbcVoVe8k6Uim+0W1TCbT4n+rcmOWiZ01PEp9OC/no39y2PZYmtoStNG6f/qVl/Abmf3v7t0RuDK7SRMCitDaf3DgWOpLVAAthMUQ57SXXYXEwzwKgKjSYHs+AVKKxo+GFtJiQsbY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772530033; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2FbkwBaBchwCc7nB+/T0ZJRIDXeC+Ip+qqcXaU/gL3A=; b=Nqtetw+uRO8QUBUc6xvjgucBsYR2BaXyOZD1lbjO6DD+lTGKn6uiWVBqZLxDthqflOHK5NGmDIXU46eXoS4fbOgCS1P4tzgzI3m8UB6yvt79MIZYpWA+k3QjjWsxGuPNfFhlch2S/NqHAVKQJj6maaZsZ4w4ceKgwXfJREYS5og= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177253003343645.510118688328475; Tue, 3 Mar 2026 01:27:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxM1m-00051l-St; Tue, 03 Mar 2026 04:26:54 -0500 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 1vxM1l-0004wd-Gf for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:53 -0500 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 1vxM1k-0004aF-0y for qemu-devel@nongnu.org; Tue, 03 Mar 2026 04:26:53 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-75-AFFqanjVPlK5jGx4WJNhvg-1; Tue, 03 Mar 2026 04:26:47 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id ACCE819560B5; Tue, 3 Mar 2026 09:26:45 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EE82230001BF; Tue, 3 Mar 2026 09:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772530011; 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=2FbkwBaBchwCc7nB+/T0ZJRIDXeC+Ip+qqcXaU/gL3A=; b=INRkuPTltX63RXWs/QJssxpvLIeqIrPPFkaW97daK8H5LeehZR9JmR2YHtBvcudbRGGCMC dGISkKWum5ISzUfY/5e6Ft1bjGQHLQTm+wrkx0k9DWrJk8hLGnIM4ck8B3JbEHyBWn+9E/ asZoU6iaTYWAt3P1rvqYD3QQSXp8mp4= X-MC-Unique: AFFqanjVPlK5jGx4WJNhvg-1 X-Mimecast-MFC-AGG-ID: AFFqanjVPlK5jGx4WJNhvg_1772530005 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com, rad@semihalf.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v2 21/21] sbsa_gwdt: limit compare_value to INT64_MAX Date: Tue, 3 Mar 2026 10:25:32 +0100 Message-ID: <20260303092532.2410177-22-imammedo@redhat.com> In-Reply-To: <20260303092532.2410177-1-imammedo@redhat.com> References: <20260303092532.2410177-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1772530034662139100 QEMU timer subsytem supports timeouts only upto INT64_MAX. However WCV value geater than that will cause integer overflow and timer will fire/expire immediately. It looks like Windows tries to use SBSA watchdog when it's exposed in GTDT ACPI table. But instead of using WRR to refresh WCV with configured WOR, it does direct load into WCV (probably as a means to reschedule timer). While it's not against spec, Windows does write following values: sbsa_gwdt_control_write [0x8] <- 0xffffffff sbsa_gwdt_control_write [0x0] <- 0x1 sbsa_gwdt_control_write [0x14] <- 0xffffffff sbsa_gwdt_control_write [0x10] <- 0xa906ca28 sbsa_gwdt_control_write [0x14] <- 0xecb1 1st intermediate write into 0x14 (WCVU), puts WCV into timer overflow range, triggering TimeoutRefresh and WS0 and WS1 asseritons. Clamp WCV to INT64_MAX to avoid timer API overflow. It prevents unexpected Windows reboots by watchdog. PS: Arguably Windows SBSA GWDT driver is broken, as it: * sets WCV too far in the future so watchdog would never trigger in practice, * and typical watchdog flow for explict referesh also broken due to: 1. small WOR value for explicit refresh (~4sec) 2. never triggering explicit refresh (WRR or other) Signed-off-by: Igor Mammedov --- hw/watchdog/sbsa_gwdt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index 7fec61b7b0..b1bce5008d 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -122,6 +122,8 @@ static void sbsa_gwdt_update_timer(SBSA_GWDTState *s, W= dtRefreshType rtype) } =20 timeout =3D (uint64_t)s->wcvu << 32 | s->wcvl; + /* clamp timeout to INT64_MAX to avoid timer overflow */ + timeout &=3D INT64_MAX; timer_mod(s->timer, timeout); } =20 --=20 2.47.3