From: Harsh Prateek Bora <harshpb@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: Caleb Schlossin <calebs@linux.ibm.com>,
Michael Kowal <kowal@linux.ibm.com>,
Aditya Gupta <adityag@linux.ibm.com>,
Chalapathi V <chalapathi.v@linux.ibm.com>
Subject: [PULL 03/10] hw/ppc: Add pnv_spi vmstate support
Date: Mon, 12 Jan 2026 16:04:26 +0530 [thread overview]
Message-ID: <20260112103433.8451-4-harshpb@linux.ibm.com> (raw)
In-Reply-To: <20260112103433.8451-1-harshpb@linux.ibm.com>
From: Caleb Schlossin <calebs@linux.ibm.com>
- Add support for needed PnvSpi structure variables
Reviewed-by: Michael Kowal <kowal@linux.ibm.com>
Reviewed-by: Aditya Gupta <adityag@linux.ibm.com>
Reviewed-by: Chalapathi V <chalapathi.v@linux.ibm.com>
Signed-off-by: Caleb Schlossin <calebs@linux.ibm.com>
Link: https://lore.kernel.org/qemu-devel/20260105160138.3242709-3-calebs@linux.ibm.com
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
---
hw/ssi/pnv_spi.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c
index 1cf3a4416d..76304d26fc 100644
--- a/hw/ssi/pnv_spi.c
+++ b/hw/ssi/pnv_spi.c
@@ -13,6 +13,7 @@
#include "hw/ssi/pnv_spi.h"
#include "hw/ssi/pnv_spi_regs.h"
#include "hw/ssi/ssi.h"
+#include "migration/vmstate.h"
#include <libfdt.h>
#include "hw/core/irq.h"
#include "trace.h"
@@ -1199,6 +1200,31 @@ static int pnv_spi_dt_xscom(PnvXScomInterface *dev, void *fdt,
return 0;
}
+static const VMStateDescription pnv_spi_vmstate = {
+ .name = TYPE_PNV_SPI,
+ .version_id = 1,
+ .fields = (const VMStateField[]) {
+ VMSTATE_UINT8(fail_count, PnvSpi),
+ VMSTATE_UINT8(transfer_len, PnvSpi),
+ VMSTATE_UINT8(responder_select, PnvSpi),
+ VMSTATE_BOOL(shift_n1_done, PnvSpi),
+ VMSTATE_UINT8(loop_counter_1, PnvSpi),
+ VMSTATE_UINT8(loop_counter_2, PnvSpi),
+ VMSTATE_UINT8(N1_bits, PnvSpi),
+ VMSTATE_UINT8(N2_bits, PnvSpi),
+ VMSTATE_UINT8(N1_bytes, PnvSpi),
+ VMSTATE_UINT8(N2_bytes, PnvSpi),
+ VMSTATE_UINT8(N1_tx, PnvSpi),
+ VMSTATE_UINT8(N2_tx, PnvSpi),
+ VMSTATE_UINT8(N1_rx, PnvSpi),
+ VMSTATE_UINT8(N2_rx, PnvSpi),
+ VMSTATE_UINT64_ARRAY(regs, PnvSpi, PNV_SPI_REGS),
+ VMSTATE_UINT8_ARRAY(seq_op, PnvSpi, PNV_SPI_REG_SIZE),
+ VMSTATE_UINT64(status, PnvSpi),
+ VMSTATE_END_OF_LIST(),
+ },
+};
+
static void pnv_spi_class_init(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -1209,6 +1235,7 @@ static void pnv_spi_class_init(ObjectClass *klass, const void *data)
dc->desc = "PowerNV SPI";
dc->realize = pnv_spi_realize;
device_class_set_legacy_reset(dc, do_reset);
+ dc->vmsd = &pnv_spi_vmstate;
device_class_set_props(dc, pnv_spi_properties);
}
--
2.52.0
next prev parent reply other threads:[~2026-01-12 10:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 10:34 [PULL 00/10] ppc-for-11.0 queue Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 01/10] target/ppc/kvm : Use macro names instead of hardcoded constants as return values Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 02/10] hw/ppc: Add VMSTATE information for LPC model Harsh Prateek Bora
2026-01-12 10:34 ` Harsh Prateek Bora [this message]
2026-01-12 10:34 ` [PULL 04/10] hw/ppc: Add pnv_i2c vmstate support Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 05/10] hw/ppc: pnv_adu.c added " Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 06/10] hw/ppc: pnv_core.c add " Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 07/10] hw/ppc: pnv_chiptod.c " Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 08/10] hw/ppc: Add VMSTATE information to PnvPsi Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 09/10] target/ppc: Fix env->quiesced migration Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 10/10] tests/functional: Add a OS level migration test for pseries Harsh Prateek Bora
2026-01-13 0:50 ` [PULL 00/10] ppc-for-11.0 queue Richard Henderson
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=20260112103433.8451-4-harshpb@linux.ibm.com \
--to=harshpb@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=calebs@linux.ibm.com \
--cc=chalapathi.v@linux.ibm.com \
--cc=kowal@linux.ibm.com \
--cc=qemu-devel@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.