From nobody Fri Nov 1 07:30:43 2024 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=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1708091856; cv=none; d=zohomail.com; s=zohoarc; b=Kgex0l8gCAAC5vQ6OZmON65LZ2scCcKWGU1oyPZxW7Gu4O6oyBMK5mudG89mQFLYeHMRIr4IGx1Q1OViZPAmuHyuOsccQONGH5RSoC6o90Bx6eau1SmhSAHvCsabS+KTNjwT5oNcPSt1zjyfuCiwhuSM835S/DAvMGsJFNLLL7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708091856; h=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=4PElm9I154heYaeu6k8uGuG3u5y2sEE2oCYC2BoRDtc=; b=CFjsEULzGRBVM8XiUG6pCMBh78mfmPghdrpRXxpTVdtTD8UGiBeIMw9NDq5sFmrgB2iosEtGD2MnwK5WitHTNcysoF6qj5voxg4z9pceYsooH1A2MVNfwwfEMTF1xNK9QSw2IBsjPlmmL/zhY0j39GbrlH1Vxwrmd2fVfPBGFhg= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708091856065988.9076712781446; Fri, 16 Feb 2024 05:57:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rayhr-00055C-4x; Fri, 16 Feb 2024 08:56:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rayhp-00054h-8B for qemu-devel@nongnu.org; Fri, 16 Feb 2024 08:56:45 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rayhn-0003Zd-FR for qemu-devel@nongnu.org; Fri, 16 Feb 2024 08:56:44 -0500 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6e0f4e3bc59so450219b3a.0 for ; Fri, 16 Feb 2024 05:56:43 -0800 (PST) Received: from iuseotherswifi.notpua ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id gv8-20020a17090b11c800b00296e2434e7esm3382844pjb.53.2024.02.16.05.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 05:56:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708091801; x=1708696601; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4PElm9I154heYaeu6k8uGuG3u5y2sEE2oCYC2BoRDtc=; b=I27y+pgn8h+B9wXCq9TKWdSweYf3igCfbM9Fm+JBb3nCeoawbgKSrGcQKCK50BYl3q 0ve/qR/vVCtfY3lue4U3rkQr1HcwiGGnhE2dgfTk6nIdobFYsDF+Ebbx+FGBYGiAA9nb 7P8gJCwNZ6t1ANAw0LMyKkPZry91MLVFpCBPWSXzS5cQ/EERLA5P1G5M1wCxmVCD85/4 25/+I/qdX67lbThU9jKvkUKe+GiW/GV0t2vAi6gbBAG/kBIt9+LI6h8Wgx7nkV0Jpofy vUD+ZN6j9W4wmQEvdnyK0ioxEZQvaAAMfFQEkvx7gS6f5PaGAfcsvrg2pgXJRTHs2HSS 9Neg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708091801; x=1708696601; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4PElm9I154heYaeu6k8uGuG3u5y2sEE2oCYC2BoRDtc=; b=CnCVuVEuCb+UT6u5oMTz4V4d+cGTXHalaF9PNT4t1YXmzsSu1ZaVkt8Mwy7rbOrWMh 6cyGy2WaZaWbu6tWqf3gHJwqMUkmwnJZCPOfxoiImBtUmP7yxD+gL10j5U7nl4gvlZCs mewC2TnJ9KUaPqHP9sQCHaWP9ZgMSMwxM0+9fnO3T0yC3OjleAq65EYdRHeHGwANnsKb GH+NJRY5ab6vYuv3TkSXyHKbDgWkbm4suFVW77HgcdepdHWVzhc1EWyeCPVzG7KQ1JJi 9q4rrSZxaPoBh+tEzO++lf6G2ZAPxcGbeNfNS/SjwoUNnXtyzRpiBL39RYYNUTqbrSg9 I+8A== X-Gm-Message-State: AOJu0YxdN3kdkAyIQcbPp9yxIytrHr1ZZsHI2qbZ28C6Sh5V1UsbFA03 gP7a+T/xj1V2+b0H9k7Ke7iEw5bJFeQ68qlCRNZKlVFVoGWH3KXxkloUDWYroMo= X-Google-Smtp-Source: AGHT+IGO4c8orlI/qXB7F+HSitkKKs7sw5g/P6j5EemsKkbTtmAThWiEI1mXt6Rup6LTSYX3vvjPEw== X-Received: by 2002:a05:6a20:d38f:b0:1a0:6856:d1a9 with SMTP id iq15-20020a056a20d38f00b001a06856d1a9mr5820110pzb.10.1708091801032; Fri, 16 Feb 2024 05:56:41 -0800 (PST) From: Abhiram Tilak To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, clg@kaod.org, david@gibson.dropbear.id.au, harshpb@linux.ibm.com, Abhiram Tilak Subject: [PATCH 3/3] misc: ppc/spapr: replace qemu_system_reset_request() calls with watchdog_perform_action() Date: Fri, 16 Feb 2024 19:21:39 +0530 Message-ID: <20240216135137.8668-6-atp.exp@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240216135137.8668-3-atp.exp@gmail.com> References: <20240216135137.8668-3-atp.exp@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=atp.exp@gmail.com; helo=mail-pf1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1708091857573100003 Content-Type: text/plain; charset="utf-8" A few watchdog devices use qemu_system_reset_request(). This is not ideal s= ince behaviour of watchdog-expiry can't be changed by QMP using `watchdog_action= `. As stated in BiteSizedTasks wiki page, instead of using qemu_system_reset_r= equest() to reset when a watchdog timer expires, let watchdog_perform_action() decide what to do. I am unsure about the changes in `spapr_watchdog.c` in patch 3, it would be= great if any of the maintainers review it. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2124 Signed-off-by: Abhiram Tilak --- hw/watchdog/spapr_watchdog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/watchdog/spapr_watchdog.c b/hw/watchdog/spapr_watchdog.c index 2bb1d3c532..9751b19506 100644 --- a/hw/watchdog/spapr_watchdog.c +++ b/hw/watchdog/spapr_watchdog.c @@ -18,6 +18,7 @@ #include "target/ppc/cpu.h" #include "migration/vmstate.h" #include "trace.h" +#include "sysemu/watchdog.h" =20 #include "hw/ppc/spapr.h" =20 @@ -114,7 +115,7 @@ static void watchdog_expired(void *pw) qemu_system_vmstop_request(RUN_STATE_SHUTDOWN); break; case PSERIES_WDTF_ACTION_HARD_RESTART: - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + watchdog_perform_action(); break; case PSERIES_WDTF_ACTION_DUMP_RESTART: CPU_FOREACH(cs) { --=20 2.42.1