From nobody Sun Jul 26 11:03:38 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=1783004374; cv=none; d=zohomail.com; s=zohoarc; b=MT7VsVncvMGEIhRMW1iVgs1vLYB/nykzRVHqwiSO8ox4Vqf04ft5fwNNJiH450BPYxWryQYrICuzZmK2qXO4d/hpamlXJYhdLh5+APKQaFeuzgXoyELE0HHvQpu5TxdzIQXgLKFQ/EabN3R3zJ+q68MuMtNH7DyYwNA8MYosIFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004374; 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=YcreBT6yOPwaacOWLfu2u1EniV6qHpkGam79kBzQUp0=; b=Rn5+6GdEgw76ZQrCQPmI4VF4/sDOjbzsRFC/vz4/eV3lgFyHKwyPK728zbK8FsM9S887AE7O78MbWMYsq/99NBdAprvcUoGZ0Bn0eyIk+aqiSlB+d2B6Q05s62ZwL+moz6yvmJO2mEbJE9rn0tPh+AuZYx3COC/FYcmO6u5i9qU= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004374880637.6977250216906; Thu, 2 Jul 2026 07:59:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIsj-000520-Pl; Thu, 02 Jul 2026 10:59:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsg-00050u-WF for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsf-0004M3-I1 for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:10 -0400 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-35-i3ipPYGpOQCgYRM_4oqLTw-1; Thu, 02 Jul 2026 10:59:05 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 E0A1A18CC49C; Thu, 2 Jul 2026 14:59: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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 866F6180056E; Thu, 2 Jul 2026 14:59:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004348; 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=YcreBT6yOPwaacOWLfu2u1EniV6qHpkGam79kBzQUp0=; b=co83jpMAktMj+Fx2VLwMf681iSOZg3DlwdYcuVi/xt+5w9Hl8ZwMEYft6IairR/4gywfAg ljeUccBtJgjEQaTrhnskhk7dOowtLI4PI+W0T2knJ7GYBWunMn/c1PXwt6rXmewbPkl9+k RZEKfHFqWUgi7oGcMmSDvEo+YVXa7WQ= X-MC-Unique: i3ipPYGpOQCgYRM_4oqLTw-1 X-Mimecast-MFC-AGG-ID: i3ipPYGpOQCgYRM_4oqLTw_1783004344 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 01/13] arm: sbsa_gwdt: fixup default "clock-frequency" Date: Thu, 2 Jul 2026 16:58:44 +0200 Message-ID: <20260702145856.1539572-2-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1783004376686158501 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. (not that it does matter, since users are setting frequency to match CPU's one explicitly) Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- 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 Sun Jul 26 11:03:38 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=1783004466; cv=none; d=zohomail.com; s=zohoarc; b=GbD603utjOTtH7eYivcc/BMp7MPp3IORVYjBpa1RAi1CfNg6gSizLTL3FTwixjYbwWr4gCZuo0xF7M0rucUaM85nuId4sf1RblXNAIVgJePobJdLGz12/6Bnemm0XjGvqbfpcLlHgrF38F6m7ItLC3J3ACXmjeJf57ZJTM3rADI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004466; 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=wBQRWE3oHz4dQwe/0gi4IuXipiKYKp8N64q0brpREPc=; b=GUxeYUbBlc7kPGx4svlHqOxqDsWDn/OAXV3FWv4XYmOJZC7UON1tdrrMeUojzERPMOxCgYye3AWs4oEPs0aKXPobtUsQ+Kt1TsEXcmoqPkAbJUIBA8076bv9ILFtc/rJAI9xZROLxCqFFQJKrWcc2CoaAHM+1pv7k0Pcn2YaT6g= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004466594766.5543621116957; Thu, 2 Jul 2026 08:01:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIsl-000529-AV; Thu, 02 Jul 2026 10:59:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsj-00051f-CN for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsi-0004Mk-18 for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:13 -0400 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-58-_CSd_xcOORmlpz1-lWi4KQ-1; Thu, 02 Jul 2026 10:59:08 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 ABCBB1944F10; Thu, 2 Jul 2026 14:59: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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 63C29180056E; Thu, 2 Jul 2026 14:59:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004351; 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=wBQRWE3oHz4dQwe/0gi4IuXipiKYKp8N64q0brpREPc=; b=T4oVp4xiajnjZRe49Ld1rflRj41/bwCAA/X5J24V0Of7W7ZOxiGWUjEChEaE1xpCm9W/KZ bYkFJpkNbhT02EGffJK/8q7eODQ3iMTLDFcZvVvJTjoIjHBnxUXgd999ccGnvk6QMu8w8A 6Ds4xm7s/yW+UTaffMgX8NtI5w83DNU= X-MC-Unique: _CSd_xcOORmlpz1-lWi4KQ-1 X-Mimecast-MFC-AGG-ID: _CSd_xcOORmlpz1-lWi4KQ_1783004347 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Ani Sinha , Eric Auger Subject: [PATCH v4 02/13] arm: add tracing events to sbsa_gwdt Date: Thu, 2 Jul 2026 16:58:45 +0200 Message-ID: <20260702145856.1539572-3-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, 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: 1783004467321158500 Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Reviewed-by: Eric Auger --- 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 d85b3ca769..b388f7b250 100644 --- a/hw/watchdog/trace-events +++ b/hw/watchdog/trace-events @@ -42,3 +42,12 @@ k230_wdt_interrupt(void) "K230 WDT interrupt" k230_wdt_reset(void) "K230 WDT system reset" k230_wdt_restart(void) "K230 WDT restart" k230_wdt_reset_device(void) "K230 WDT device reset" + +#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 Sun Jul 26 11:03:38 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=1783004457; cv=none; d=zohomail.com; s=zohoarc; b=XTUhuTVsI3wkYogdPhob3RxbPAXobKnbfrlrBCqrJjR9lpAp++RNildfVI/6iCQ56HZjvNl+zV4Uz0FzAGzjmbYvkEEmqu9w/Sd6OBzPQyfQmxZXWsaENIJ9PhyMlexKEdiS3g4zlNe3Q7inv5S2qHoEHodw4OS61r6e/yaRIAc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004457; 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=qWygMFN24/XSkAf2LTPO8cDvu2baaqjdyvgL7VCKkRo=; b=N33/HLb6qYrSbxUxUhi7t7iPZ4gJoBleq3dtMt9joFBjH48XUqUvlUa0SUKy+H6X0ADVw5Ol9Qz9FsuTDXUV2nQfyCnWhRetOmT4iyB7dwBV6e7yBkNiqPVkyV6A7zGargJO9R9s+zAN23p8euSs4U5P9LiyCf9Ao5HlkRvZBlU= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004457670129.73173238706124; Thu, 2 Jul 2026 08:00:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIso-00053n-Rk; Thu, 02 Jul 2026 10:59:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsm-00053C-LR for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsl-0004NL-Cy for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:16 -0400 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-564-n3Smqkz4N1ev2qCBwSzkSg-1; Thu, 02 Jul 2026 10:59:11 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 06D0E1944AA7; Thu, 2 Jul 2026 14:59: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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0FD0E180056E; Thu, 2 Jul 2026 14:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004354; 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=qWygMFN24/XSkAf2LTPO8cDvu2baaqjdyvgL7VCKkRo=; b=M/2B4GDNuXx3kKoTem0u1yNED0pkzd9CrXWHN19elFQ15gBJ3nG7zYPk4EY743sVugbfvi gRLVFolwmpE3H1cI3h+BVCYimvmFBsEpHsLyAkOcJ5Wn0M+2LaWu6TytEB/ixsrXZXt8Pe pa5MB34pgCijIbU2uhUb44vICxgMvdY= X-MC-Unique: n3Smqkz4N1ev2qCBwSzkSg-1 X-Mimecast-MFC-AGG-ID: n3Smqkz4N1ev2qCBwSzkSg_1783004349 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 03/13] arm: sbsa_gwdt: rename device type to sbsa-gwdt Date: Thu, 2 Jul 2026 16:58:46 +0200 Message-ID: <20260702145856.1539572-4-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, 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: 1783004459233158500 Use hyphenated name to follow QEMU device naming convention. Migration compatibility is preserved since the vmstate name is already "sbsa-gwdt". Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- include/hw/watchdog/sbsa_gwdt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/watchdog/sbsa_gwdt.h b/include/hw/watchdog/sbsa_gwd= t.h index 307a4f291a..8941dcff9e 100644 --- a/include/hw/watchdog/sbsa_gwdt.h +++ b/include/hw/watchdog/sbsa_gwdt.h @@ -16,7 +16,7 @@ #include "hw/core/sysbus.h" #include "hw/core/irq.h" =20 -#define TYPE_WDT_SBSA "sbsa_gwdt" +#define TYPE_WDT_SBSA "sbsa-gwdt" #define SBSA_GWDT(obj) \ OBJECT_CHECK(SBSA_GWDTState, (obj), TYPE_WDT_SBSA) #define SBSA_GWDT_CLASS(klass) \ --=20 2.47.3 From nobody Sun Jul 26 11:03:38 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=1783004445; cv=none; d=zohomail.com; s=zohoarc; b=Ubsv/3elrWPGmbCfWqBdvFLziBHB1Yy3N5iljqQp7v+aAvUBQ9mv27ja9RlxUkvJQkUu4p35yueL031Bbync7kW0mJzyyhZZlt3TEpuD6GEKzKF3AADjQvRfLu0hHG6b/EJC4TzpXjegYGk9NJBZpQ+uzRiFu97dpwnsul7vAj0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004445; 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=mLZvHEa88a5t0elI9BFGLNw2Uvrffm/QEBaUYlxF7eo=; b=LBj1K4HfZTUcDM+wa7kicomkBPUjq4/SJVYHgkK1Rql6//OmEux4KesIoxOC+NYrVLuQB/l8Pd0Kiqja2LvBh8wWyPGXIqKpHgTdF51lXB0nzdaFRJqYjA+Yya2l5MkMksla6AAjQYOiQnqFrzgX297UmEHXhHlC5qTfHRINeGg= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004445108571.2378428778516; Thu, 2 Jul 2026 08:00:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIsr-00054h-W4; Thu, 02 Jul 2026 10:59:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsp-000540-7g for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsm-0004Nq-HN for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:18 -0400 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-433--vULYZ4CPYyRIggEL6oszw-1; Thu, 02 Jul 2026 10:59:12 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 371EC1944B10; Thu, 2 Jul 2026 14:59:11 +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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5F13C1800605; Thu, 2 Jul 2026 14:59:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004355; 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=mLZvHEa88a5t0elI9BFGLNw2Uvrffm/QEBaUYlxF7eo=; b=AGvRlzsedT2AZ/O2jU0qLeXnBvJpV8AsBPQnMpoNwDX6i+6iOwDZtuSiWEDTx5ehHF0XaF TRG9evXWPhsaRV37jXQsj8DUHj1nxBcup0dBiIFa8lT7YqUfylpv59y/t/geHdB6PWYcRO 8XWOaL23H1IdTeVg7DXj08bzWPOAQMI= X-MC-Unique: -vULYZ4CPYyRIggEL6oszw-1 X-Mimecast-MFC-AGG-ID: -vULYZ4CPYyRIggEL6oszw_1783004351 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org Subject: [PATCH v4 04/13] arm: virt: create sbsa-gwdt watchdog Date: Thu, 2 Jul 2026 16:58:47 +0200 Message-ID: <20260702145856.1539572-5-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, WEIRD_QUOTING=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: 1783004447278158500 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. Instead of using dynamic sysbus infra to wire up MMIO/IRQ/FDT, statically assign resources in machine's mem/irq maps and wire them up at device (pre_)plug handlers. It's similar to dynamic sysbus wiring, modulo resources are nailed down statically, and wiring is limited to virt machine only. (Benefit is that tests don't break anymore on rebase due to address being stable) Tested with Fedora 43: FDT: -M virt,acpi=3Doff -device sbsa-gwdt ACPI: -M virt -device sbsa-gwdt Note: Windows sees GTDT, initializes watchdog but instead pinging WRR it sets/advances WOR to way too large value, so it's never going to trigger watchdog reboot (it's Windows driver issue though). Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- v4: (Eric) - reorder [VIRT_GWDT_WS0] in irqmap after [VIRT_ACPI_GED] - add missing blank line in pre_plug handler - extract FDT node creation into create_gwdt_dt_bindings() helper - add watchdog documentation to docs/system/arm/virt.rst - add comment above dc->user_creatable about requiring machine-specific wiring v3: - (Eric) assign MMIO/IRQ statically and abandon most of dynamic sysbus machinery. - (Peter) set watchdog freq to system clock explicitly, machine version compat won't work in case host is not runing 1GHz clock. (Tested on Jetson machine) --- include/hw/arm/virt.h | 3 +++ docs/system/arm/virt.rst | 9 ++++++++ hw/arm/Kconfig | 1 + hw/arm/virt-acpi-build.c | 29 ++++++++++++++++++++++++-- hw/arm/virt.c | 44 ++++++++++++++++++++++++++++++++++++++++ hw/core/sysbus-fdt.c | 2 ++ hw/watchdog/sbsa_gwdt.c | 2 ++ 7 files changed, 88 insertions(+), 2 deletions(-) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 171d44c644..22e66d1a11 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -97,6 +97,9 @@ enum { VIRT_NVDIMM_ACPI, VIRT_PVTIME, VIRT_ACPI_PCIHP, + VIRT_GWDT_WS0, + VIRT_GWDT_REFRESH, + VIRT_GWDT_CONTROL, VIRT_LOWMEMMAP_LAST, }; =20 diff --git a/docs/system/arm/virt.rst b/docs/system/arm/virt.rst index ae0be35d57..bf5a9c8f6c 100644 --- a/docs/system/arm/virt.rst +++ b/docs/system/arm/virt.rst @@ -39,6 +39,7 @@ The virt board supports: - A PL061 GPIO controller - An optional machine-wide SMMUv3 IOMMU - User-creatable SMMUv3 devices (see below for example) +- An optional SBSA Generic Watchdog Timer (see below) - hotpluggable DIMMs - hotpluggable NVDIMMs - An MSI controller (GICv2m or ITS). @@ -314,6 +315,14 @@ User-creatable SMMUv3 devices bypassing QEMU and improving throughput for workloads that issue many invalidations. Without it, every invalidation command traps into QEMU. =20 +SBSA Generic Watchdog +""""""""""""""""""""" + +The SBSA Generic Watchdog Timer (GWDT) can be added to the virt machine +using ``-device sbsa-gwdt``. It is only supported on the virt machine, +which wires up statically assigned MMIO regions and IRQs via +machine-specific plug handlers. + Linux guest kernel configuration """""""""""""""""""""""""""""""" =20 diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 5f5c4899ad..f9a225c19b 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 99490aa7b1..f5b3b4ce48 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 #include "smmuv3-accel.h" #include "tegra241-cmdqv.h" @@ -868,6 +869,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 @@ -898,10 +901,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); @@ -911,6 +919,23 @@ 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) { + hwaddr rbase =3D vms->memmap[VIRT_GWDT_REFRESH].base; + hwaddr cbase =3D vms->memmap[VIRT_GWDT_CONTROL].base; + int irq =3D ARM_SPI_BASE + vms->irqmap[VIRT_GWDT_WS0]; + + 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 d8d27f2ef6..eabc5274d5 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" }, @@ -214,6 +215,8 @@ static const MemMapEntry base_memmap[] =3D { /* ...repeating for a total of NUM_VIRTIO_TRANSPORTS, each of that siz= e */ [VIRT_PLATFORM_BUS] =3D { 0x0c000000, 0x02000000 }, [VIRT_SECURE_MEM] =3D { 0x0e000000, 0x01000000 }, + [VIRT_GWDT_REFRESH] =3D { 0x0f000000, 0x00001000 }, + [VIRT_GWDT_CONTROL] =3D { 0x0f001000, 0x00001000 }, [VIRT_PCIE_MMIO] =3D { 0x10000000, 0x2eff0000 }, [VIRT_PCIE_PIO] =3D { 0x3eff0000, 0x00010000 }, [VIRT_PCIE_ECAM] =3D { 0x3f000000, 0x01000000 }, @@ -264,6 +267,7 @@ static const int a15irqmap[] =3D { [VIRT_GPIO] =3D 7, [VIRT_UART1] =3D 8, [VIRT_ACPI_GED] =3D 9, + [VIRT_GWDT_WS0] =3D 10, [VIRT_MMIO] =3D 16, /* ...to 16 + NUM_VIRTIO_TRANSPORTS - 1 */ [VIRT_GIC_V2M] =3D 48, /* ...to 48 + NUM_GICV2M_SPIS - 1 */ [VIRT_SMMU] =3D 74, /* ...to 74 + NUM_SMMU_IRQS - 1 */ @@ -2085,6 +2089,27 @@ static void create_smmu(const VirtMachineState *vms,= PCIBus *bus) create_smmuv3_dt_bindings(vms, base, size, irq); } =20 +static void create_gwdt_dt_bindings(VirtMachineState *vms) +{ + MachineState *ms =3D MACHINE(vms); + hwaddr rbase =3D vms->memmap[VIRT_GWDT_REFRESH].base; + hwaddr cbase =3D vms->memmap[VIRT_GWDT_CONTROL].base; + int irq =3D vms->irqmap[VIRT_GWDT_WS0]; + char *nodename =3D g_strdup_printf("/watchdog@%" PRIx64, cbase); + + qemu_fdt_add_subnode(ms->fdt, nodename); + qemu_fdt_setprop_string(ms->fdt, nodename, + "compatible", "arm,sbsa-gwdt"); + qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg", + 2, cbase, 2, SBSA_GWDT_CMMIO_SIZE, + 2, rbase, 2, SBSA_GWDT_RMMIO_SIZE); + qemu_fdt_setprop_cells(ms->fdt, nodename, "interrupts", + GIC_FDT_IRQ_TYPE_SPI, irq, + GIC_FDT_IRQ_FLAGS_LEVEL_HI); + qemu_fdt_setprop_cell(ms->fdt, nodename, "timeout-sec", 30); + g_free(nodename); +} + static void create_virtio_iommu_dt_bindings(VirtMachineState *vms) { const char compat[] =3D "virtio,pci-iommu\0pci1af4,1057"; @@ -3820,6 +3845,11 @@ static void virt_machine_device_pre_plug_cb(HotplugH= andler *hotplug_dev, qlist_append_str(reserved_regions, resv_prop_str); qdev_prop_set_array(dev, "reserved-regions", reserved_regions); g_free(resv_prop_str); + } else if (object_dynamic_cast(OBJECT(dev), TYPE_WDT_SBSA)) { + uint64_t cntfrq =3D object_property_get_int(OBJECT(qemu_get_cpu(0)= ), + "cntfrq", &error_abort); + + qdev_prop_set_uint64(dev, "clock-frequency", cntfrq); } else if (object_dynamic_cast(OBJECT(dev), TYPE_ARM_SMMUV3)) { if (vms->legacy_smmuv3_present || vms->iommu =3D=3D VIRT_IOMMU_VIR= TIO) { error_setg(errp, "virt machine already has %s set. " @@ -3871,6 +3901,19 @@ static void virt_machine_device_plug_cb(HotplugHandl= er *hotplug_dev, { VirtMachineState *vms =3D VIRT_MACHINE(hotplug_dev); =20 + if (object_dynamic_cast(OBJECT(dev), TYPE_WDT_SBSA)) { + SysBusDevice *s =3D SYS_BUS_DEVICE(dev); + hwaddr rbase =3D vms->memmap[VIRT_GWDT_REFRESH].base; + hwaddr cbase =3D vms->memmap[VIRT_GWDT_CONTROL].base; + int irq =3D vms->irqmap[VIRT_GWDT_WS0]; + + sysbus_mmio_map(s, 0, rbase); + sysbus_mmio_map(s, 1, cbase); + sysbus_connect_irq(s, 0, qdev_get_gpio_in(vms->gic, irq)); + + create_gwdt_dt_bindings(vms); + } + if (vms->platform_bus_dev) { MachineClass *mc =3D MACHINE_GET_CLASS(vms); =20 @@ -4123,6 +4166,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..12238570b5 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 @@ -140,6 +141,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, no_fdt_node), TYPE_BINDING("", NULL), /* last element */ }; =20 diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index acb970e8b3..49fdd723c2 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -285,6 +285,8 @@ 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; + /* requires machine-specific wiring (MMIO/IRQ/FDT) at plug time */ + 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 Sun Jul 26 11:03:38 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=1783004467; cv=none; d=zohomail.com; s=zohoarc; b=BS1ataG9MX+0zILes5YfWs6OGkzQPtiri8DCovCFkbq0O4KAhq6Os/zxBBA2EcKb+KRLyGpq5pZToiX0FZF+BEHLT21w8SwNru4fbQhC12EVIZiZTEStE52z4OF79303ak2EeYQlOyHaKEFTp6+pQlJexu9a2jGdzWjm1w/x6iM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004467; 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=wv8wx84TQJRzPJVFxwH/z7diWzMQXTDkr+aov8OgWc0=; b=ny4xMccBCti2xE+ZFMbd2vL2O4HtOSl7s6LrbX+7OhTe7a6B5L8h/HL4YbIKBl2GgmN3ghSmmxz43BXaMU/ou9rWXKg2OlvGAKJbgQ2bwoYXWVg5Wern1hkTIMV6cMZqCPieBFOR/F52SbDph6WruiGzLDkyK+t2LLWGQBKf1+Q= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004467639858.6264234261732; Thu, 2 Jul 2026 08:01:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIst-000550-UO; Thu, 02 Jul 2026 10:59:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsq-00054W-ER for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsp-0004OU-2w for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:20 -0400 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-522-XAGaz92ePWSpa2b8FAUzGA-1; Thu, 02 Jul 2026 10:59:14 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 787E81944AAE; Thu, 2 Jul 2026 14:59:13 +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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 77CCE180056E; Thu, 2 Jul 2026 14:59:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004357; 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=wv8wx84TQJRzPJVFxwH/z7diWzMQXTDkr+aov8OgWc0=; b=GiJujcBqwEuz2PK1cKm+pXz5tn5uDq3krrVncJjTcVK6Il8GQXd7o+pejeenR0KFJ9613l xiq+2pXGVZvvKFQA16FY1A2UOmVh0L5u4eQh3nzt4CJ0w2nJBoRpjNlF4vmdRUsC2xRX7v uuOBbNCXnVQykLxoX9Rl94ke3CmwIr8= X-MC-Unique: XAGaz92ePWSpa2b8FAUzGA-1 X-Mimecast-MFC-AGG-ID: XAGaz92ePWSpa2b8FAUzGA_1783004353 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 05/13] arm: sbsa-gwdt: add 'wdat' option Date: Thu, 2 Jul 2026 16:58:48 +0200 Message-ID: <20260702145856.1539572-6-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, 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: 1783004469390158500 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 Reviewed-by: Eric Auger --- include/hw/watchdog/sbsa_gwdt.h | 1 + hw/watchdog/sbsa_gwdt.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/include/hw/watchdog/sbsa_gwdt.h b/include/hw/watchdog/sbsa_gwd= t.h index 8941dcff9e..5ad7c7a798 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 49fdd723c2..330a74798a 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -265,6 +265,14 @@ static void wdt_sbsa_gwdt_realize(DeviceState *dev, Er= ror **errp) =20 sysbus_init_irq(sbd, &s->irq); =20 + /* + * WDAT spec: "The clock interval that the WDT uses must be + * greater than or equal to 1 millisecond." + */ + if (s->wdat) { + s->freq =3D 1000; + } + s->timer =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, sbsa_gwdt_timer_sysinter= rupt, dev); } @@ -276,6 +284,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 Sun Jul 26 11:03:38 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=1783004462; cv=none; d=zohomail.com; s=zohoarc; b=XlOy7smLjrMi3HPB7ClE0soi9j+j70osOV10CbWvruJlaUSUt6Awlxq9yxkk290bIhbQ7eQivM0mByDYG6f53ooGX9cdQzjjIaGjB7iCQ2hkY2ovX5CB/Vn+iQmwkOdPiTnW7huLmiXbgRaguL1/xv79hDxpp2cBHfYhoGdIdO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004462; 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=cbZHTIk5UbO/UyIb4eAjqwut2ghOA3IaUY+xIza4IpA=; b=DWF4jDvBh+rQdkm5wvdCISh8VevfRg3joneamRUiQ2zpsodiwDHfG+Hds+ySuk5drgWlzCC4m/Ac5Gx5TTGOwKpMH+BksjvXSPWFg1tyhHfi1tIzdYtamDT0kBLnaTBZE8WV0bWh1rJfL6S+n384OHzohP/VWGgTq/8dGLe/HVQ= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004462294175.3202388211496; Thu, 2 Jul 2026 08:01:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIsv-00058i-ER; Thu, 02 Jul 2026 10:59:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIss-00054y-Bn for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsq-0004P2-AX for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:22 -0400 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-682-GRmNmX4VNWONJSWG8N9jxQ-1; Thu, 02 Jul 2026 10:59:16 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 BFB0F1873128; Thu, 2 Jul 2026 14:59: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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D0B2F180056E; Thu, 2 Jul 2026 14:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004359; 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=cbZHTIk5UbO/UyIb4eAjqwut2ghOA3IaUY+xIza4IpA=; b=NUIhxXfhFFzhhnyeY9dqtpJwYjWGF8T7F/J49Q4/Yy5ZdLDwB3yRTS3egqg+SjLawwNEHZ u7aGJrY3zxlUaPkFZlt5KttxCfLsp2CO5JpzWZItu08jbZcIL9f7ZWfoyH7P4tuEPKaNNW +q3P0cvOYQ+hWYT5fkCbGMvhyTfRgTk= X-MC-Unique: GRmNmX4VNWONJSWG8N9jxQ-1 X-Mimecast-MFC-AGG-ID: GRmNmX4VNWONJSWG8N9jxQ_1783004355 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 06/13] acpi: introduce WDAT table for GWDT Date: Thu, 2 Jul 2026 16:58:49 +0200 Message-ID: <20260702145856.1539572-7-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1783004463770158500 Add build_gwdt_wdat() to generate a Watchdog Action Table designed for SBSA Generic Watchdog Timer. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- v4: (Eric) fix comment alignment v3: (Eric) - split '[PATCH v2 11/21] arm: virt: add support for WDAT based watchdo= g' on smaller chunks. - add/improve comments where requested - actualy use 'freq' argument passed down by caller - simplify magic val on WRR write and add comment - group table records by used register --- include/hw/acpi/wdat-gwdt.h | 19 +++++++ hw/acpi/meson.build | 2 + hw/acpi/wdat-gwdt-stub.c | 16 ++++++ hw/acpi/wdat-gwdt.c | 99 +++++++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+) 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 0c7bfb278a..09ad488a04 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -31,11 +31,13 @@ acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('e= rst.c')) acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c')) stub_ss.add(files('ipmi-stub.c')) stub_ss.add(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 stub_ss.add(files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c')) stub_ss.add(files('pci-bridge-stub.c')) +stub_ss.add(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')) stub_ss.add(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..b30566ef6a --- /dev/null +++ b/hw/acpi/wdat-gwdt.c @@ -0,0 +1,99 @@ +/* + * 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 */ + /* + * PCI location fields are set to 0xff to indicate + * that the watchdog is not a PCI device. + */ + 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: "The clock interval that the WDT uses must be + * greater than or equal to 1 millisecond." + */ + g_assert(freq <=3D 1000); + /* Timer Period, ms */ + build_append_int_noprefix(table_data, 1000 / freq, 4); + /* + * WDAT spec: "The time-out period before the WDT fires is recommended + * to be at least 5 minutes." + * Set max count to 10min and min count 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 | 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, 8, 4); + /* Action table: WCS (control/status) register actions */ + 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_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); + /* WOR (offset) and WRR (refresh) register actions */ + build_append_wdat_ins(table_data, WDAT_ACTION_SET_COUNTDOWN_PERIOD, + WDAT_INS_WRITE_COUNTDOWN, + wor_l, 0, 0xffffffff); + /* WRR: any write refreshes the watchdog, value is ignored */ + build_append_wdat_ins(table_data, WDAT_ACTION_RESET, + WDAT_INS_WRITE_VALUE, + wrr, 0x1, 0x1); + 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); +} --=20 2.47.3 From nobody Sun Jul 26 11:03:38 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=1783004474; cv=none; d=zohomail.com; s=zohoarc; b=K7akGXd/VwdQZlVe5k608Hzd3C9btdNg22CTR6bYDd62WGNL2IChc0wi++RJOjCx0Qob6/6WF0pU7eYFoM7vkGE6IyX/KMUwFpSeQkgTAtocDHEvCByR5K357VykgXEltWWiqA0+4gk2Ij5LQKLp3tgriyV9+ANEAaGMUCuAPsk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004474; 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=vPtLXtDs1quwQoKW3oUgsV/vU6Ks6Nz7WqQkGI+WJLA=; b=RIywXOLh7FhRtM5bPJJ1rlQevU+6dfEbmvZUGNM174Kt/TXpm0RgxWu7dA57zuMyYBAnQgHVIZnop87QTbu81+Vy83QBHqY8Agau+h0ZO8SViYXqp6Zn+Wib5o27W/onlv/FBY4DrexcLhaGW2Y0bmzyYOA/vwwJ6iLXU/qcCvg= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004474939204.99542100141616; Thu, 2 Jul 2026 08:01:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIsy-0005Au-Sz; Thu, 02 Jul 2026 10:59:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsw-0005A6-PA for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsv-0004QC-2a for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:26 -0400 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-426-8nwYI2MqNF21xdPQY120pA-1; Thu, 02 Jul 2026 10:59:19 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 3437F18333A6; Thu, 2 Jul 2026 14:59: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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 23281180058D; Thu, 2 Jul 2026 14:59:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004364; 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=vPtLXtDs1quwQoKW3oUgsV/vU6Ks6Nz7WqQkGI+WJLA=; b=BQW1cWgifCjB8vpDVkcR03990JIUlAEEOtzZcHhLretDFdhol0R1QvWyl4KLCGlMvtsW19 26LH4RjYdzk+SBpOMOzSNJFGCVzVhZH8s1hvDfUOEdXuNAVxnbhq5dY9b/snOQb3x44gEM 8KMiDJALt/kMCdNqbF2KWZa5yKmIpUU= X-MC-Unique: 8nwYI2MqNF21xdPQY120pA-1 X-Mimecast-MFC-AGG-ID: 8nwYI2MqNF21xdPQY120pA_1783004358 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 07/13] arm: virt: add support for WDAT based watchdog Date: Thu, 2 Jul 2026 16:58:50 +0200 Message-ID: <20260702145856.1539572-8-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, WEIRD_QUOTING=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1783004475605158500 Add WDAT handling for sbsa-gwdt on arm/virt machine. WDAT mode is enabled by 'wdat' option: ex: "-device sbsa-gwdt,wdat=3Don" When WDAT is enabled: - Build the WDAT ACPI table instead of the GTDT watchdog entry, since they are mutually exclusive due to different timer resolution (WDAT uses 1 kHz vs GTDT's system counter frequency). - Skip FDT watchdog node creation, as the DT-based Linux driver would use the system counter frequency which doesn't match the WDAT-mode 1 kHz clock. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- v4: (Eric) - remove unused 'wdt' parameter from build_gtdt() - add Native/WDAT modes documentation to docs/system/arm/virt.rst v3: - Skip FDT watchdog node creation in wdat mode (Eric) - wiring part of larger '[PATCH v2 11/21] arm: virt: add support for W= DAT based watchdog' --- docs/system/arm/virt.rst | 15 +++++++++++++++ hw/arm/virt-acpi-build.c | 34 ++++++++++++++++++++++++++-------- hw/arm/virt.c | 12 ++++++++---- 3 files changed, 49 insertions(+), 12 deletions(-) diff --git a/docs/system/arm/virt.rst b/docs/system/arm/virt.rst index bf5a9c8f6c..5f6dd17978 100644 --- a/docs/system/arm/virt.rst +++ b/docs/system/arm/virt.rst @@ -323,6 +323,21 @@ using ``-device sbsa-gwdt``. It is only supported on t= he virt machine, which wires up statically assigned MMIO regions and IRQs via machine-specific plug handlers. =20 +Two modes are available: + +Native mode (default) + The watchdog is described via the ACPI GTDT table and FDT, using + the system counter frequency. Example:: + + -device sbsa-gwdt + +WDAT mode + The watchdog is described via the ACPI WDAT table (no FDT node), + using a 1 kHz timer frequency. WDAT and GTDT watchdog entries are + mutually exclusive. Example:: + + -device sbsa-gwdt,wdat=3Don + Linux guest kernel configuration """""""""""""""""""""""""""""""" =20 diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index f5b3b4ce48..f6386088b6 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 #include "smmuv3-accel.h" #include "tegra241-cmdqv.h" @@ -859,7 +860,8 @@ build_srat(GArray *table_data, BIOSLinker *linker, Virt= MachineState *vms) * 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, + bool add_watchdog) { /* * Table 5-117 Flag Definitions @@ -870,7 +872,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 @@ -903,12 +904,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 */ @@ -921,7 +922,7 @@ build_gtdt(GArray *table_data, BIOSLinker *linker, Virt= MachineState *vms) } =20 /* ACPI 6.5 spec: 5.2.25.2 ARM Generic Watchdog Structure (Table 5-124= ) */ - if (wdt) { + if (add_watchdog) { hwaddr rbase =3D vms->memmap[VIRT_GWDT_REFRESH].base; hwaddr cbase =3D vms->memmap[VIRT_GWDT_CONTROL].base; int irq =3D ARM_SPI_BASE + vms->irqmap[VIRT_GWDT_WS0]; @@ -1332,13 +1333,19 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBui= ldTables *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); CPUCoreCaches caches[CPU_MAX_CACHES]; unsigned int num_caches; + Object *wdt =3D object_resolve_type_unambiguous(TYPE_WDT_SBSA, NULL); =20 num_caches =3D virt_get_caches(vms, caches); =20 + if (wdt) { + has_wdat =3D object_property_get_bool(wdt, "wdat", &error_abort); + } + table_offsets =3D g_array_new(false, true /* clear */, sizeof(uint32_t)); =20 @@ -1357,6 +1364,17 @@ 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) { + uint64_t freq =3D object_property_get_uint(wdt, "clock-frequency", + &error_abort); + build_gwdt_wdat(tables_blob, tables->linker, + vms->oem_id, vms->oem_table_id, + vms->memmap[VIRT_GWDT_REFRESH].base, + vms->memmap[VIRT_GWDT_CONTROL].base, + freq); + } + if (!vmc->no_cpu_topology) { acpi_add_table(table_offsets, tables_blob); build_pptt(tables_blob, tables->linker, ms, vms->oem_id, @@ -1364,7 +1382,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 && !has_wdat); =20 acpi_add_table(table_offsets, tables_blob); { diff --git a/hw/arm/virt.c b/hw/arm/virt.c index eabc5274d5..fb916c341b 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3846,10 +3846,12 @@ static void virt_machine_device_pre_plug_cb(Hotplug= Handler *hotplug_dev, qdev_prop_set_array(dev, "reserved-regions", reserved_regions); g_free(resv_prop_str); } else if (object_dynamic_cast(OBJECT(dev), TYPE_WDT_SBSA)) { - uint64_t cntfrq =3D object_property_get_int(OBJECT(qemu_get_cpu(0)= ), - "cntfrq", &error_abort); + if (!object_property_get_bool(OBJECT(dev), "wdat", &error_abort)) { + uint64_t cntfrq =3D object_property_get_int(OBJECT(qemu_get_cp= u(0)), + "cntfrq", &error_abo= rt); =20 - qdev_prop_set_uint64(dev, "clock-frequency", cntfrq); + qdev_prop_set_uint64(dev, "clock-frequency", cntfrq); + } } else if (object_dynamic_cast(OBJECT(dev), TYPE_ARM_SMMUV3)) { if (vms->legacy_smmuv3_present || vms->iommu =3D=3D VIRT_IOMMU_VIR= TIO) { error_setg(errp, "virt machine already has %s set. " @@ -3911,7 +3913,9 @@ static void virt_machine_device_plug_cb(HotplugHandle= r *hotplug_dev, sysbus_mmio_map(s, 1, cbase); sysbus_connect_irq(s, 0, qdev_get_gpio_in(vms->gic, irq)); =20 - create_gwdt_dt_bindings(vms); + if (!object_property_get_bool(OBJECT(dev), "wdat", &error_abort)) { + create_gwdt_dt_bindings(vms); + } } =20 if (vms->platform_bus_dev) { --=20 2.47.3 From nobody Sun Jul 26 11:03:38 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=1783004470; cv=none; d=zohomail.com; s=zohoarc; b=S2VPdEXzY5jgIJ9psGmkXWlqo12yPLyI2iMxIAkEKnJG1mlHEil2miOFy1Qk161Gox9N4js0+7Ps5F5emjLTgjk73GmH8TqcWz741/jJGs5oorOyWrpHHQE/Vx92k9iRLodxbVUQfHRqJz/F8B/MdSopyRWSnqclscYy7q5yMOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004470; 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=wujx3idx78Myx2EqeDpbTah++59X09/APupYTbYNwh8=; b=mI8HndSW7CgKV/D0zLgMhfzpf6TRomTKYukIBwr96wYC50C9LaiYQU6s8+N9JVA6VX9ePoK9Wh+FPMSX4bxaPOxx+7GXJ031efKOdjG74yIKfGf1LGegdjORJotycWp6ckLOhwe562nmFOkA0IvJRxZzZ1FMAk5TML78OgnNOLs= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004470304469.0185125826904; Thu, 2 Jul 2026 08:01:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIsx-0005AK-FQ; Thu, 02 Jul 2026 10:59:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsv-00058V-4K for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIst-0004Ph-Pw for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:24 -0400 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-261-bzbOdHBDNACuqnAK3US0fw-1; Thu, 02 Jul 2026 10:59:21 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 BDEEF19792E1; Thu, 2 Jul 2026 14:59:20 +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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A5594180056E; Thu, 2 Jul 2026 14:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004363; 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=wujx3idx78Myx2EqeDpbTah++59X09/APupYTbYNwh8=; b=SCM8+SGJipLXzpBNZcTyFqBViKVqnPT4BmNadHoca1PsC2fuP0++7+oJx+RVDUWz+Jg6kr SKc7IEQqJPROqlQAsfVbYxuTJoRRo6qkJSiBFQp48rgKzFOOQ37XrnefuFK60PLvF72KHA THnBeWCqdqD3Noh9tkGpHD0Evq2MNIk= X-MC-Unique: bzbOdHBDNACuqnAK3US0fw-1 X-Mimecast-MFC-AGG-ID: bzbOdHBDNACuqnAK3US0fw_1783004360 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 08/13] tests: acpi: arm/virt: whitelist new WDAT table Date: Thu, 2 Jul 2026 16:58:51 +0200 Message-ID: <20260702145856.1539572-9-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, 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: 1783004471411158500 Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- 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 Sun Jul 26 11:03:38 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=1783004419; cv=none; d=zohomail.com; s=zohoarc; b=IaM3oxTuElW6khoj8ioHjkosQyIIMbfEiUPYc6fjBH+yZEe3AW9Rez7iRILEMnJUgS4OcBH41eSuYpjdk+Dr1LxG3Yr2XpR4MGRKXqB5sufQe/Cj3SlYl+FdYO+N/WWt/e1VQAa41XXDJIFcnAhBy7qvY7wZeyTW7BKULiftupU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004419; 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=EVfv9bqr3sAYoY83sQ3/zd3RNroDmvSwnSBFyo/6YCA=; b=Gj9NZkHe7KE1Ceuu3KiyswRR2s9WTCy9NiOBmM0uIUvxvbn4TUPhl3rDpuZCALPn1Y6aRmrc8F5fUmNUQgazVwgt34XPSQSjXCkxHwcD7O/bMmSTvA6VV3pAL5Ept7Iaf1mky+hQb+6s/zM1D7iQWcFcTtYXeQoPu2wBlfp9N18= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004419456967.9513263912077; Thu, 2 Jul 2026 08:00:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIsz-0005B8-8e; Thu, 02 Jul 2026 10:59:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsx-0005AI-BH for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIsw-0004QM-00 for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:27 -0400 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-651-2cygtnMQMAqqHVmdzUVxqw-1; Thu, 02 Jul 2026 10:59:24 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 1CE7D1944B39; Thu, 2 Jul 2026 14:59:23 +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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 21E9A180056E; Thu, 2 Jul 2026 14:59:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004365; 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=EVfv9bqr3sAYoY83sQ3/zd3RNroDmvSwnSBFyo/6YCA=; b=JufdpxlcQAZsVWwe73ssTsp8QYLJvaNMmGL/ZYeeGoUB7jCk9MCp0+zAhIqhbgh+/gfFgz bPc3Mp5+WiLFub/+jtPr/FNgYvgiJiDvmmlT859N5zz5jEbI8p4jFZYI0C/o9MMNTCtTkL 1FSyAWc6KRmdAmvsECM7gvUEGPWj7eQ= X-MC-Unique: 2cygtnMQMAqqHVmdzUVxqw-1 X-Mimecast-MFC-AGG-ID: 2cygtnMQMAqqHVmdzUVxqw_1783004363 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 09/13] tests: acpi: arm/virt: add WDAT table test case Date: Thu, 2 Jul 2026 16:58:52 +0200 Message-ID: <20260702145856.1539572-10-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, 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: 1783004421005158500 Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- 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 af6d9b5136..5440aab2f8 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -2275,6 +2275,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 { @@ -2893,6 +2912,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 Sun Jul 26 11:03:38 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=1783004475; cv=none; d=zohomail.com; s=zohoarc; b=iSnnfTmJIEQcRJAisdaU9dAc4bS35ku6/wVTUuypKRcj1xWQrbYZNCz2r+barAmWflh4xaO/shtQjXFkEBKzlcIjdHDESsiO9ezVC7sgcqPOBPEwqU31li7xu1ywCFv+iddBscHlj/sZyzninbHo+79BHI8GUUojfNA0GaeJ2BQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004475; 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=wKlAMqzhb6j1xFK4DBP+i+CsiM5O/z/vnQTjLLV0L9E=; b=CBUh4hIfhgaFDUNbc4OqffqedqWb5NKIKCGxAGZyZLq5QLA8K7UpOD4WMzgDwBbacFBVmvnNcMJCG6wjPFk/eDXdrIa8ZSnhYHBgIIxw+lE7vvKLKOf4ocCX0vSRC5P24C0LVDT89c5PoyKP0DcMBFSbGTW/VcgtJghjdmvS0Wk= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004475850341.5404469937023; Thu, 2 Jul 2026 08:01:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIt5-0005HQ-Dd; Thu, 02 Jul 2026 10:59:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIt4-0005FH-3v for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIt2-0004Rd-CG for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:33 -0400 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-26-i8ZLn6q1OlaLHEu7biGACw-1; Thu, 02 Jul 2026 10:59:26 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 5B40C1944B2A; Thu, 2 Jul 2026 14:59:25 +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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6E7F0180056E; Thu, 2 Jul 2026 14:59:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004371; 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=wKlAMqzhb6j1xFK4DBP+i+CsiM5O/z/vnQTjLLV0L9E=; b=EQYxXhencB5fahwyZ8bSHEVfEyYIUsaK3SCpHTF1Lh0NeDJ0B0UxTTB53iJYJ1diXsS4vJ APPyVG/JPUUx6fgvZwSsckmWeBejL9IwX7ykkhPGrz5QccIWfzRx/26B101l3Keb3LuqoQ t9gFxWSodQs8NpDD8psvcXbW+9NfGuI= X-MC-Unique: i8ZLn6q1OlaLHEu7biGACw-1 X-Mimecast-MFC-AGG-ID: i8ZLn6q1OlaLHEu7biGACw_1783004365 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 10/13] tests: acpi: arm/virt: update expected WDAT blob Date: Thu, 2 Jul 2026 16:58:53 +0200 Message-ID: <20260702145856.1539572-11-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, 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: 1783004477550158500 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 Reviewed-by: Eric Auger --- 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..d5adacf9114637d8803d08906ff= 1e29ac61f5fe0 100644 GIT binary patch literal 260 zcmZXOK@NgI3`O4vF`x@byg*$Mjv=3D^kCkZBU9awQJZ&p(1B&bcAwm0T&h&0RR91 literal 0 HcmV?d00001 --=20 2.47.3 From nobody Sun Jul 26 11:03:38 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=1783004474; cv=none; d=zohomail.com; s=zohoarc; b=nQ/QwkQJhWVE+DS7sBAVCGI+XbifUdsa4P/1mJRax4y1q19PbudbrT/df9qjPIgCwaqL9Z7QnnFNPWNAaK74mfR+dyWiM3xwBlzkFZBOlmSpKH7xjsiUrEN1N6GzEP+k8Kas2CRMepHgyz/iXWCm54YoMGT9CKA0vYDSpxbWC6U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004474; 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=1q90WPkRUZ7wuR6JvKufex+5QOAiX2MNCSlX3ENKcGo=; b=TbclIb92nSBVjYOfpxS6LZ3ge/BXkO62NQNmokHwoH2VMtmJJW1CkjEZ49E6itcCp+b9XtuCf7iiHfgckRRhRpTgtUvcHO8PTqW+LBu4QJ5BbL1LueUQx325PfCJ3O1WBBNnk1CqOBppJtR04TNdb5E2LSD/Ssg+fmYS0SM5wHo= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004474809684.7508661909587; Thu, 2 Jul 2026 08:01:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIt5-0005Gz-3u; Thu, 02 Jul 2026 10:59:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIt3-0005Es-Ug for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIt2-0004Rk-LS for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:33 -0400 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-356-NJruGxRXPNethMwDBF2ynw-1; Thu, 02 Jul 2026 10:59:28 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 A97651944A8C; Thu, 2 Jul 2026 14:59: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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B3135180056E; Thu, 2 Jul 2026 14:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004372; 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=1q90WPkRUZ7wuR6JvKufex+5QOAiX2MNCSlX3ENKcGo=; b=MgXwjfZoTojqXybhdp9jeQOJvslopZLW0JiNnOl/ni/25nyYd3qsCJnPaxhhNFExau6IXZ pB/7OFVcX5189eLRJlOVt2HNDycDLna3+7KJDFiPyJmcEP+8jRl6Il9AI+we2aS3uKQKeN 5iPjr/XbDErV1P1b9hIe0GAewHoRvGg= X-MC-Unique: NJruGxRXPNethMwDBF2ynw-1 X-Mimecast-MFC-AGG-ID: NJruGxRXPNethMwDBF2ynw_1783004367 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 11/13] tests: acpi: arm/virt: whitelist GTDT table Date: Thu, 2 Jul 2026 16:58:54 +0200 Message-ID: <20260702145856.1539572-12-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, 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: 1783004475453158500 Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- 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 Sun Jul 26 11:03:38 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=1783004399; cv=none; d=zohomail.com; s=zohoarc; b=gAAY5Gx447w967v8TJKrGdATSLyWvjkJ7Dvyi80KWWyywjBAJZ5SU930XauTqQnIamaZVHeaXDpG+7qnOINmmNwRz0LwHxz91DKeqYgzI/VFhkJvFlHO5+yQ6kGJMFaIJuTUAC4XYLmZ3jl0fUNZRkiPVOlN3w29EYH7UksCj/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004399; 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=CBasb7EkPrdG0C+1L4IVe74kwpgLLK4+TSfKUTbxgSc=; b=lYeQ13zSEVh5zdNb7/VOU+qEmZNsWXfFPfmx85Or3kZZUR9591QyCgXSh9Fb/iagKuoAb8RBpQvVtw+iSBS9bC2HUKXcTVypG21krwqhPEvcwWxp6ml39mIi7boTW1cdhtDIm3umYLd00l4M+vmAXRKT7xG9BJVwlr2j7xzmf7w= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17830043991291008.2813643276505; Thu, 2 Jul 2026 07:59:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIt7-0005SG-R8; Thu, 02 Jul 2026 10:59:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIt6-0005JN-6v for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIt4-0004S2-Sc for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:35 -0400 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-396-Lnc1AmavNEWA8J0C8-4yvA-1; Thu, 02 Jul 2026 10:59:31 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 EEB0B1944CF9; Thu, 2 Jul 2026 14:59:29 +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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0D8EB1800605; Thu, 2 Jul 2026 14:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004374; 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=CBasb7EkPrdG0C+1L4IVe74kwpgLLK4+TSfKUTbxgSc=; b=FwDO2fNmyMBPvNtt8JgzoXaa1LMRJhy6gcjb203NCfX/afwibhSqP1p11uRoy1kX3w6V/J Kd3HNzrPHsskqZWBYrB1lJgEdxLURdltbkqJrskHxf4BrLF4FXkh2HwoHUk3kQfsZskGV2 vlWmTErqGL1ot+rXGRNpqsiBikGvbiE= X-MC-Unique: Lnc1AmavNEWA8J0C8-4yvA-1 X-Mimecast-MFC-AGG-ID: Lnc1AmavNEWA8J0C8-4yvA_1783004370 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 12/13] tests: acpi: arm/virt: add GTDT watchdog table test case Date: Thu, 2 Jul 2026 16:58:55 +0200 Message-ID: <20260702145856.1539572-13-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, 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: 1783004400507158500 Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- v4: (Eric) fix whitespace in test command string (moved from patch 17) --- 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 5440aab2f8..370b0fd2e6 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -2294,6 +2294,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 { @@ -2914,6 +2932,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 Sun Jul 26 11:03:38 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=1783004426; cv=none; d=zohomail.com; s=zohoarc; b=FvjeRYjHjt5ELuVV3hd8ufO+CacL3gPgs/PlVRRYCI9rAiXahT/ThKamRRQnGbLxlOrnSkudOekjLYWKkEp+HMLZkB3d02WEqDv1HPPJVTIZqFZYsys4ZMA0kJkD5H5Pz3WKhp4Lr9aQAISQdrsHGVP4b1EemKdxWdYhFkjwd/8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783004426; 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=k4iQ/5rn+WmQNXMNztjv9K91ycXFphWBg9nehTmrLyM=; b=eM4OsAN5uX0qttAZUoXr4BCCZ2WxA5Lo6j1We1zVEmHiLwQMnaQFWvMaXUHN6MbrslqTeIIecFvguAUVVlHt3Mkv5jc4tCZGG8pjCzDWJVMc/NJGXxcKSzXg2bL99XXNuMq5MIa29OrnG/fqcWh/2Z5UboUql6/wAFXmEsnedkw= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783004426516927.1985085539558; Thu, 2 Jul 2026 08:00:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfIt9-0005YV-9U; Thu, 02 Jul 2026 10:59:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIt8-0005WJ-LJ for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfIt7-0004Sf-57 for qemu-devel@nongnu.org; Thu, 02 Jul 2026 10:59:38 -0400 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-14-vwrwqU-5MDyVqTJAI8mDGw-1; Thu, 02 Jul 2026 10:59:33 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 3F7A31944A85; Thu, 2 Jul 2026 14:59:32 +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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 526D1180056E; Thu, 2 Jul 2026 14:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783004376; 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=k4iQ/5rn+WmQNXMNztjv9K91ycXFphWBg9nehTmrLyM=; b=YKvASojClEboYfHuwL2w1xNjRN5LeapfjKBy3oiKyqpyXTzs38XM2PJipsq5XItjZ5ACpf 27n/ZoQsHvjX8P8suMxURPoJyCnIkca2CJFQUbviRdgQbdG9uJu7rvkye8WdQRbP8TTr4/ p2VwdI5yr6HsxqL/YG0QL9HsxuMAWfM= X-MC-Unique: vwrwqU-5MDyVqTJAI8mDGw-1 X-Mimecast-MFC-AGG-ID: vwrwqU-5MDyVqTJAI8mDGw_1783004372 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: mst@redhat.com, eauger@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, leif.lindholm@oss.qualcomm.com, qemu-arm@nongnu.org, Eric Auger Subject: [PATCH v4 13/13] tests: acpi: arm/virt: update expected GTDT blob Date: Thu, 2 Jul 2026 16:58:56 +0200 Message-ID: <20260702145856.1539572-14-imammedo@redhat.com> In-Reply-To: <20260702145856.1539572-1-imammedo@redhat.com> References: <20260702145856.1539572-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.93 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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, 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: 1783004428910158500 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 Reviewed-by: Eric Auger --- 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..44e6f2b18d2848f595a8c69bdb5= 4a59e1becaffd GIT binary patch literal 132 zcmXwwyA6Oq3`5@udZ_s+HDlZ%K?f37Fam?H1k-{Nf(yUca^^hc3n=3Dcmre&9SY)M2U h0D3DQ7eKED3_uCAo*U=3DC)xXm_Rp<