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 4/6] hw/ppc: pnv_adu.c added vmstate support
Date: Thu, 11 Dec 2025 16:09:24 -0600 [thread overview]
Message-ID: <20251211220926.2865972-5-calebs@linux.ibm.com> (raw)
In-Reply-To: <20251211220926.2865972-1-calebs@linux.ibm.com>
- Added vmstate support for ADU model
Signed-off-by: Angelo Jaramillo <angeloj@linux.ibm.com>
Signed-off-by: Caleb Schlossin <calebs@linux.ibm.com>
---
hw/ppc/pnv_adu.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/hw/ppc/pnv_adu.c b/hw/ppc/pnv_adu.c
index 005fbda475..bd2a9e233a 100644
--- a/hw/ppc/pnv_adu.c
+++ b/hw/ppc/pnv_adu.c
@@ -23,6 +23,7 @@
#include "hw/ppc/pnv_chip.h"
#include "hw/ppc/pnv_lpc.h"
#include "hw/ppc/pnv_xscom.h"
+#include "migration/vmstate.h"
#include "trace.h"
#define ADU_LPC_BASE_REG 0x40
@@ -189,6 +190,16 @@ static const Property pnv_adu_properties[] = {
DEFINE_PROP_LINK("lpc", PnvADU, lpc, TYPE_PNV_LPC, PnvLpcController *),
};
+static const VMStateDescription pnv_adu_vmstate = {
+ .name = TYPE_PNV_ADU,
+ .version_id = 1,
+ .fields = (const VMStateField[]) {
+ VMSTATE_UINT64(lpc_cmd_reg, PnvADU),
+ VMSTATE_UINT64(lpc_data_reg, PnvADU),
+ VMSTATE_END_OF_LIST(),
+ },
+};
+
static void pnv_adu_class_init(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -197,6 +208,7 @@ static void pnv_adu_class_init(ObjectClass *klass, const void *data)
dc->desc = "PowerNV ADU";
device_class_set_props(dc, pnv_adu_properties);
dc->user_creatable = false;
+ dc->vmsd = &pnv_adu_vmstate;
}
static const TypeInfo pnv_adu_type_info = {
--
2.47.3
next prev parent reply other threads:[~2025-12-11 22:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 22:09 [PATCH 0/6] hw/ppc: Snapshot support for several ppc devices Caleb Schlossin
2025-12-11 22:09 ` [PATCH 1/6] hw/ppc: Add VMSTATE information for LPC model Caleb Schlossin
2025-12-12 17:12 ` Miles Glenn
2025-12-11 22:09 ` [PATCH 2/6] hw/ppc: Add pnv_spi vmstate support Caleb Schlossin
2025-12-12 17:29 ` Miles Glenn
2025-12-11 22:09 ` [PATCH 3/6] hw/ppc: Add pnv_i2c " Caleb Schlossin
2025-12-12 17:16 ` Miles Glenn
2025-12-11 22:09 ` Caleb Schlossin [this message]
2025-12-12 17:17 ` [PATCH 4/6] hw/ppc: pnv_adu.c added " Miles Glenn
2025-12-11 22:09 ` [PATCH 5/6] hw/ppc: pnv_core.c add " Caleb Schlossin
2025-12-12 17:23 ` Miles Glenn
2025-12-15 13:09 ` Caleb Schlossin
2025-12-11 22:09 ` [PATCH 6/6] hw/ppc: pnv_chiptod.c " Caleb Schlossin
2025-12-12 17:28 ` Miles Glenn
2025-12-15 6:08 ` [PATCH 0/6] hw/ppc: Snapshot support for several ppc devices Aditya Gupta
2025-12-15 13:19 ` 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=20251211220926.2865972-5-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.