From: Caleb Schlossin <calebs@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, npiggin@gmail.com, adityag@linux.ibm.com,
milesg@linux.ibm.com, alistair@alistair23.me,
kowal@linux.ibm.com, chalapathi.v@linux.ibm.com,
calebs@linux.ibm.com, angeloj@linux.ibm.com
Subject: [PATCH v3 3/7] hw/ppc: Add pnv_i2c vmstate support
Date: Tue, 16 Dec 2025 09:13:55 -0600 [thread overview]
Message-ID: <20251216151359.418708-4-calebs@linux.ibm.com> (raw)
In-Reply-To: <20251216151359.418708-1-calebs@linux.ibm.com>
- Add vmstate support for i2c registers
Signed-off-by: Caleb Schlossin <calebs@linux.ibm.com>
---
hw/ppc/pnv_i2c.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/ppc/pnv_i2c.c b/hw/ppc/pnv_i2c.c
index 60de479491..1018078228 100644
--- a/hw/ppc/pnv_i2c.c
+++ b/hw/ppc/pnv_i2c.c
@@ -19,6 +19,7 @@
#include "hw/ppc/pnv_i2c.h"
#include "hw/ppc/pnv_xscom.h"
#include "hw/ppc/fdt.h"
+#include "migration/vmstate.h"
#include <libfdt.h>
@@ -549,6 +550,15 @@ static const Property pnv_i2c_properties[] = {
DEFINE_PROP_UINT32("num-busses", PnvI2C, num_busses, 1),
};
+static const VMStateDescription pnv_i2c_vmstate = {
+ .name = TYPE_PNV_I2C,
+ .version_id = 1,
+ .fields = (const VMStateField[]) {
+ VMSTATE_UINT64_ARRAY(regs, PnvI2C, PNV_I2C_REGS),
+ VMSTATE_END_OF_LIST(),
+ },
+};
+
static void pnv_i2c_class_init(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -561,6 +571,7 @@ static void pnv_i2c_class_init(ObjectClass *klass, const void *data)
dc->desc = "PowerNV I2C";
dc->realize = pnv_i2c_realize;
+ dc->vmsd = &pnv_i2c_vmstate;
device_class_set_props(dc, pnv_i2c_properties);
}
--
2.47.3
next prev parent reply other threads:[~2025-12-16 15:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 15:13 [PATCH v3 0/7] hw/ppc: Snapshot support for several ppc devices Caleb Schlossin
2025-12-16 15:13 ` [PATCH v3 1/7] hw/ppc: Add VMSTATE information for LPC model Caleb Schlossin
2025-12-16 16:50 ` Mike Kowal
2025-12-16 15:13 ` [PATCH v3 2/7] hw/ppc: Add pnv_spi vmstate support Caleb Schlossin
2025-12-16 16:51 ` Mike Kowal
2025-12-16 15:13 ` Caleb Schlossin [this message]
2025-12-16 16:52 ` [PATCH v3 3/7] hw/ppc: Add pnv_i2c " Mike Kowal
2025-12-16 15:13 ` [PATCH v3 4/7] hw/ppc: pnv_adu.c added " Caleb Schlossin
2025-12-16 16:53 ` Mike Kowal
2025-12-16 15:13 ` [PATCH v3 5/7] hw/ppc: pnv_core.c add " Caleb Schlossin
2025-12-16 16:20 ` Miles Glenn
2025-12-16 17:04 ` Mike Kowal
2025-12-16 15:13 ` [PATCH v3 6/7] hw/ppc: pnv_chiptod.c " Caleb Schlossin
2025-12-16 17:08 ` Mike Kowal
2025-12-16 15:13 ` [PATCH v3 7/7] hw/ppc: Add VMSTATE information to PnvPsi Caleb Schlossin
2025-12-16 16:24 ` Miles Glenn
2025-12-16 16:49 ` Mike Kowal
2025-12-16 17:08 ` [PATCH v3 0/7] hw/ppc: Snapshot support for several ppc devices Aditya Gupta
2025-12-22 11:01 ` Chalapathi V
2026-01-05 9:21 ` Harsh Prateek Bora
2026-01-05 15:54 ` Caleb Schlossin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251216151359.418708-4-calebs@linux.ibm.com \
--to=calebs@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=alistair@alistair23.me \
--cc=angeloj@linux.ibm.com \
--cc=chalapathi.v@linux.ibm.com \
--cc=kowal@linux.ibm.com \
--cc=milesg@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.