From nobody Sun Nov 24 12:47:05 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723568104; cv=none; d=zohomail.com; s=zohoarc; b=WbQeyw7D3VRDhUP4+jytUXnRiDYyy1jcwKwavxWUDTITLua598QxFHw6g7CW+STBA7loVTZVrsoArdNHwXMKLB5zAwDBR4HxFcRtO0OgJKP/6s8qVYB52spvzbO0phHENhXT1SH7jHY1DcbkUQcxjr2jOG6+8MCJ7eIWux9w+3M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723568104; 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=5khXz8nIOa0NpRClvdoX2r8/4f/59m4scjcy4bo663o=; b=I5odj7tpRZyspn6KHbMwV8IpLXwaG6HGnYiSkjKrUaSAyNg6dXmquqR4PBpIxkyBW952umvsH7SjTFSnATfcYR/5PHUKkeI06UXNDEuyfDkUDVbe2sYuUlpCa+xSvCwHQUelqmtm3bP2f9yIj+mnY7j1tvNZ0s16lHV4YwmBI48= 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 1723568104649260.7989338473734; Tue, 13 Aug 2024 09:55:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdulb-0004vZ-5D; Tue, 13 Aug 2024 12:53:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdulZ-0004p4-AO for qemu-devel@nongnu.org; Tue, 13 Aug 2024 12:53:01 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sdulW-0001Bu-4T for qemu-devel@nongnu.org; Tue, 13 Aug 2024 12:53:01 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-369c609d0c7so3997175f8f.3 for ; Tue, 13 Aug 2024 09:52:57 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429c77374a5sm147347015e9.30.2024.08.13.09.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 09:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723567977; x=1724172777; 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=5khXz8nIOa0NpRClvdoX2r8/4f/59m4scjcy4bo663o=; b=zShRKooIWhMzaOkvvkQWO9Ng9dbt6dfGQSy54R+86/wMTyAfODMbTX0vHiStjL/KXq ajwQYbaQ6eQJ15FxEjQtvG+p6fpyQyhNzrdIisyZ504ArAJf50V820J2ptdzKoN492SR Gyms0NvsnYoKh73wHlmCyRhgt8H3vb9wKZK8GHbUPhVOacPZic7NxiRA69j8Y+HOmCF5 24ugrHQhZF7lT9f0rMeqEII/hGONSb5TO/dPuI5xcW0OgQDtV5J22iNL9iNycwSTAcvf rryNIqqZF7IRW7u2GBV7fAJz3WGfJSWkQLJnNATVmhPEeMbA5sYxz1unJfgABdQ8JWpb bMPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723567977; x=1724172777; 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=5khXz8nIOa0NpRClvdoX2r8/4f/59m4scjcy4bo663o=; b=Rwi+hYnzRuMsRpuQbmnMbNPiXBI43LHrUPrSx33jubuW6clvgzt7iyZ8hb1yv53sHy ymS+77nLWWofmEyjAnWUsjfPAD1W7lOLJCgzbFluA8+iVfYVkpcYn7K36xssF6zZe7DY hZhVQzZKNL4UnwfswKgSo7A2gbGc8OD8fCTZoIS93JZyD6aQeIsVPYs6b0zsHJvJjDRX kKw6K7OV9+/SOVj0vPQ/GOZt8u9AQ/S2R2VViGhgfxuFUP7o4a5V7QlsUfzH+HMPrtTH ZPmteN5VTarOH4H3v5OlOpt5Kaq6uZngiFSKoHTMpnBsMJg+vegpDvFsBg0Jg96MITwd xm0Q== X-Gm-Message-State: AOJu0Yy3wP80iNvjuXpU0JGze0xy+i9CAT083MMoOtrDIdz+TydSHE/T pfiAydGgUZEfjQg79MsOMgwNaRmVON2+xoUCSs/REkeChNSCXGWjvKKmvnSNTuhlbbM5BvH+Wm/ r X-Google-Smtp-Source: AGHT+IHa4P2Rt/PwsLIXZVREVsrEgNR0O+p8fNKkO/2H6+JgcosPugYb6lHWbbYeCjAXw0HC22O0Ag== X-Received: by 2002:a05:6000:1971:b0:368:7282:51d6 with SMTP id ffacd0b85a97d-3717775dddamr210728f8f.21.1723567976601; Tue, 13 Aug 2024 09:52:56 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Thomas Huth , qemu-s390x@nongnu.org, Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Hildenbrand , Ilya Leoshkevich , Cornelia Huck , Halil Pasic , Eric Farman , Christian Borntraeger Subject: [PATCH for-9.2 06/10] hw/remote/message.c: Don't directly invoke DeviceClass:reset Date: Tue, 13 Aug 2024 17:52:46 +0100 Message-Id: <20240813165250.2717650-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813165250.2717650-1-peter.maydell@linaro.org> References: <20240813165250.2717650-1-peter.maydell@linaro.org> 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=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, 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 @linaro.org) X-ZM-MESSAGEID: 1723568106124116600 Content-Type: text/plain; charset="utf-8" Directly invoking the DeviceClass::reset method is a bad idea, because if the device is using three-phase reset then it relies on transitional reset machinery which is likely to disappear at some point. Reset the device in the standard way, by calling device_cold_reset(). Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/remote/message.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/remote/message.c b/hw/remote/message.c index 50f6bf2d495..38ae6c75b4e 100644 --- a/hw/remote/message.c +++ b/hw/remote/message.c @@ -215,13 +215,10 @@ fail: static void process_device_reset_msg(QIOChannel *ioc, PCIDevice *dev, Error **errp) { - DeviceClass *dc =3D DEVICE_GET_CLASS(dev); DeviceState *s =3D DEVICE(dev); MPQemuMsg ret =3D { 0 }; =20 - if (dc->reset) { - dc->reset(s); - } + device_cold_reset(s); =20 ret.cmd =3D MPQEMU_CMD_RET; =20 --=20 2.34.1