From nobody Mon Feb 9 23:40:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) client-ip=209.85.128.49; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f49.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615654511; cv=none; d=zohomail.com; s=zohoarc; b=bhDSXSYCglputvIo1PffJkYMwbgWLBLpHYweLpdZN56jZPW4EwmgZXho+jLGObDwctotAfriNGbiVfXgzLl9JnT4llsKkjpbliYAd84/brh4dYbj6kIlNxLudhzEZZHCiphL5ntPbBup9EYWEGTmG90/loGqcOC2y9SMgaXAi/s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615654511; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yMi75r77hsETGOpZp4xh6/wHBuM4NFZi2eOjnyYTg6Y=; b=oFfHZ8INjWYg7Me6UuHdmvL9Rb8ukXwnL16Ingc5kW4MZJ2q3NiF1EiQoB7o0lRsmYJ2Io1sCau6Zivfc7eQSJMlk5GAVY+CQx9oWz8NXQhMiThoklrczYorseIM+kROA3Vb34HGOxD5oyEBQu5NRB6rOgvzBnHvnS1HoWy62xo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.zohomail.com with SMTPS id 161565451121018.385406843283363; Sat, 13 Mar 2021 08:55:11 -0800 (PST) Received: by mail-wm1-f49.google.com with SMTP id l19so5574049wmh.1 for ; Sat, 13 Mar 2021 08:55:10 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (17.red-88-21-201.staticip.rima-tde.net. [88.21.201.17]) by smtp.gmail.com with ESMTPSA id p14sm6851050wmc.30.2021.03.13.08.55.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 08:55:08 -0800 (PST) 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=yMi75r77hsETGOpZp4xh6/wHBuM4NFZi2eOjnyYTg6Y=; b=p86tI19NmHw9Y2osJ+Q4a1DQ3nsyKA5KgY3oVpvlSICt/+ISm1HNDJrnMekcUx48Ya cF53E31UiyllplDSrPwwduDJ1tS0OTQwC6Ikw/jX0EoQ/RiaTFmIH+XrqANVDkfew8/H eJZTNLAquhafpg3cqRHhwHzIM47EgS2WT+vmNdpkBNvc/GhSivywy2/EQOKg7wptShhf rvS8irnYGHFCK21o+CwiYISPswRlHLBaIyh9kw61AFUEbPMuP1wTMzs3GLrn76fqyKWZ bBjNTnXi2euzFZRVXBZJ2mz56k20BfvZopk1WvgWiQPESkEKY53Fa6F2EXXKdsLhRhrO ftPw== 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=yMi75r77hsETGOpZp4xh6/wHBuM4NFZi2eOjnyYTg6Y=; b=WEH9oeeoL2HnO6GuvgKECXOYeDSvHD0euPQ1ayEwA4AgxmRLOwgPi3LhajqPeRrrSJ ikIDQG2zJHLc+clASHeautdDwKbJ07pzeFDkwpyqYI1KTOptqNWkCihZl9ZuPD9waO1N QiEaYSAo4JFqqaPQAkyrohNbb2AQcH9edyIWdmSg6Qh+WJEXNRUkzTwjHR7ExnsvOlUa ahTz5woeTzVzffu5cwnfrz5xxh+wkduX2gHFO/VPzSSIXgFsy9+UoWpzjvqk10FMsaEa yH0Zcj/Vy9nk4lw/+ijBC4sGrq3K5Dhrz7ozsyHgrE+L6I9x+/Xztz7qSTZVUWWqydV4 1eig== X-Gm-Message-State: AOAM530MVlGq++4SU0Z7KmG+IBhTU+k3Gnq2epa4GpiVCA+2v45jM12c GUOF7edmhvUYttOktXW1d0w= X-Google-Smtp-Source: ABdhPJzNjUk7kO5TwZJsNI84t2zGXFGg6fHgkS2fC5bc4eD5rQhAsedw6hEG6vrtc/4xTrPil/h5ag== X-Received: by 2002:a1c:4b0a:: with SMTP id y10mr18094749wma.141.1615654509406; Sat, 13 Mar 2021 08:55:09 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Rolnik , Thomas Huth , Sarah Harris Subject: [PATCH 04/11] hw/gpio/avr_gpio: Add migration VMstate Date: Sat, 13 Mar 2021 17:54:38 +0100 Message-Id: <20210313165445.2113938-5-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210313165445.2113938-1-f4bug@amsat.org> References: <20210313165445.2113938-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/gpio/avr_gpio.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/gpio/avr_gpio.c b/hw/gpio/avr_gpio.c index cdb574ef0d8..da34009daea 100644 --- a/hw/gpio/avr_gpio.c +++ b/hw/gpio/avr_gpio.c @@ -25,6 +25,7 @@ #include "hw/irq.h" #include "hw/gpio/avr_gpio.h" #include "hw/qdev-properties.h" +#include "migration/vmstate.h" =20 static void avr_gpio_reset(DeviceState *dev) { @@ -100,6 +101,18 @@ static const MemoryRegionOps avr_gpio_ops =3D { .endianness =3D DEVICE_NATIVE_ENDIAN, }; =20 +static const VMStateDescription avr_gpio_vmstate =3D { + .name =3D "avr-gpio", + .version_id =3D 0, + .minimum_version_id =3D 0, + .fields =3D (VMStateField[]) { + VMSTATE_UINT8(reg.pin, AVRGPIOState), + VMSTATE_UINT8(reg.ddr, AVRGPIOState), + VMSTATE_UINT8(reg.port, AVRGPIOState), + VMSTATE_END_OF_LIST(), + }, +}; + static void avr_gpio_init(Object *obj) { AVRGPIOState *s =3D AVR_GPIO(obj); @@ -120,6 +133,7 @@ static void avr_gpio_class_init(ObjectClass *klass, voi= d *data) =20 dc->reset =3D avr_gpio_reset; dc->realize =3D avr_gpio_realize; + dc->vmsd =3D &avr_gpio_vmstate; } =20 static const TypeInfo avr_gpio_info =3D { --=20 2.26.2