From nobody Sun Nov 16 09:03:07 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.68 as permitted sender) client-ip=209.85.128.68; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f68.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1599443746; cv=none; d=zohomail.com; s=zohoarc; b=mk7ABu6n+vqwajrR2Zx57ogzzOYnBZ3gA8YQLoIxrkTpCoP24RWn3z5sNDIAjIbSbLZJuCVFOa4BdS4ZfdusJGGHaMjAiGh4ffU4AO2JM6R8v/K59MteYPSD1hB4u4kYfuVVuC62rAu9MNL4KRH0kxko0KhR8OT8lpLOnWx05Ik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599443746; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0L6FMvGCY7Yqd00xQ/ZxKfuTHVYGmeZNYt98i5HNRDQ=; b=dAXEALrV0lv+Zbjul7vwPj2SYklNjau2e1/69x3qCTl86BjIhGRYSCVtdOA3WBtgsJkaChgCRzSYHu9y5tDpRUaZKwtJ4R5BhgBd3P6GOk2IKhC9EmeQq5WHmQOT0SJKYnL5hOyQrCRvcMEngbCezcMceujZhpjnIhDVtqus6mw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.zohomail.com with SMTPS id 1599443746192362.9865670981985; Sun, 6 Sep 2020 18:55:46 -0700 (PDT) Received: by mail-wm1-f68.google.com with SMTP id y15so51240wmi.0 for ; Sun, 06 Sep 2020 18:55:45 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id b84sm29377773wmd.0.2020.09.06.18.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 18:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0L6FMvGCY7Yqd00xQ/ZxKfuTHVYGmeZNYt98i5HNRDQ=; b=Nu9yn4I572XTs2h/pxBeMKSFLjGP9QBvQ5EEsO3R1rF7zesE2dh8nvd0nrdIqqMaLp ic9oKnFgq6cR/TRt4Hdn/iHYWZaHLT+GrhyXe5nBxvuY1f1Ctu7yIeXfzB62LAbRyqDa I6HIuDYOGDPDIspKcvyQPki2OmqbC2O7KZ2rlz0AIIR05wwcMLuorORaY4ZGvhOmcBQp HTO2MfRSVVimUnQy9hVrbfclPgmuCcH7NPvhWk/5v6y0kdBgTycUkoVhKsy+2t0bNn9C E13N8BLsQt9pKPblQe4CL3U8yGPc5QuvYPP/MNg6ZQR/V4iHcCZH4Co5hAjbUmIl/5Cu 92vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=0L6FMvGCY7Yqd00xQ/ZxKfuTHVYGmeZNYt98i5HNRDQ=; b=nVYLSyUYfxsTmwfIDH/JUF+yu4qbJILEXWXVIOi2lIy8AVC/PvRVRl/v+HhvU92D/i q3KXl0haSWHYK+oPRS53jN8dAmlvcAdrmKwEkM9YObkpdz6Gc2osmcGsWZdJtg1KaZUD BVQ5/WAOjvoLSeFDxyAiHZrcSoOt27swLuYishvXKV40XlHo3SkvFa0TMuZctipWJ23l 8R7OyJksDk9PxTil3Ja+Z7Pfk9PBf1zXWPZ7JOc9F6TpKF6/gP5G8jqgplCse7NA43+v STAwvhjSFcxNFgFKX9V5ygzfJG7il8i0e+jFhiC7VAmpsYmaZUgMCYDXvlguMycHLFFX CzRQ== X-Gm-Message-State: AOAM531Bl9f2CJYvRAVAYyczuv9pG12tgmhcef7fT1SUlFwQRRJwZfzE O09+b0w/2dq21PpDYjXpips= X-Google-Smtp-Source: ABdhPJz0+Wx8FlePRpciApvzJoZqsUGQeqDUyIJzpgtF9yr1rUki+orEphbcJKcqE9s5fB3m0cYnDg== X-Received: by 2002:a1c:7c13:: with SMTP id x19mr18864165wmc.45.1599443744300; Sun, 06 Sep 2020 18:55:44 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 5/7] hw/char/serial: Make 'wakeup' property boolean Date: Mon, 7 Sep 2020 03:55:33 +0200 Message-Id: <20200907015535.827885-6-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200907015535.827885-1-f4bug@amsat.org> References: <20200907015535.827885-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Make the "wakeup" property introduced in commit 9826fd597df ("suspend: make serial ports wakeup the guest") a boolean. As we want to reuse the generic serial properties in the ISA model (next commit), expose this property. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/hw/char/serial.h | 2 +- hw/char/serial-isa.c | 2 +- hw/char/serial.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h index 535fa23a2b8..3d2a5b27e87 100644 --- a/include/hw/char/serial.h +++ b/include/hw/char/serial.h @@ -60,7 +60,7 @@ typedef struct SerialState { uint32_t baudbase; uint32_t tsr_retry; guint watch_tag; - uint32_t wakeup; + bool wakeup; =20 /* Time when the last byte was successfully sent out of the tsr */ uint64_t last_xmit_ts; diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c index b4c65949cd8..a0c338796d5 100644 --- a/hw/char/serial-isa.c +++ b/hw/char/serial-isa.c @@ -116,7 +116,7 @@ static Property serial_isa_properties[] =3D { DEFINE_PROP_UINT32("iobase", ISASerialState, iobase, -1), DEFINE_PROP_UINT32("irq", ISASerialState, isairq, -1), DEFINE_PROP_CHR("chardev", ISASerialState, state.chr), - DEFINE_PROP_UINT32("wakeup", ISASerialState, state.wakeup, 0), + DEFINE_PROP_BOOL("wakeup", ISASerialState, state.wakeup, false), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/hw/char/serial.c b/hw/char/serial.c index ade4adfd526..ade89fadb44 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -1015,6 +1015,7 @@ static const TypeInfo serial_io_info =3D { static Property serial_properties[] =3D { DEFINE_PROP_CHR("chardev", SerialState, chr), DEFINE_PROP_UINT32("baudbase", SerialState, baudbase, 115200), + DEFINE_PROP_BOOL("wakeup", SerialState, wakeup, false), DEFINE_PROP_END_OF_LIST(), }; =20 --=20 2.26.2