All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: [PULL 07/31] target/ppc: Remove last user of .load_state_old
Date: Tue, 18 Jan 2022 14:07:06 +0100	[thread overview]
Message-ID: <20220118130730.1927983-8-clg@kaod.org> (raw)
In-Reply-To: <20220118130730.1927983-1-clg@kaod.org>

This breaks migration compatibility from (very) old versions of
QEMU. This should not be a problem for the pseries machine for which
migration is only supported on recent QEMUs ( > 2.x). There is no
clear status on what is supported or not for the other machines. Let's
move forward and remove the .load_state_old handler.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20220118104150.1899661-2-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 target/ppc/machine.c | 112 -------------------------------------------
 1 file changed, 112 deletions(-)

diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index 756d8de5d8dd..df547385ff1e 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -23,117 +23,6 @@ static void post_load_update_msr(CPUPPCState *env)
     pmu_update_summaries(env);
 }
 
-static int cpu_load_old(QEMUFile *f, void *opaque, int version_id)
-{
-    PowerPCCPU *cpu = opaque;
-    CPUPPCState *env = &cpu->env;
-    unsigned int i, j;
-    target_ulong sdr1;
-    uint32_t fpscr, vscr;
-#if defined(TARGET_PPC64)
-    int32_t slb_nr;
-#endif
-    target_ulong xer;
-
-    for (i = 0; i < 32; i++) {
-        qemu_get_betls(f, &env->gpr[i]);
-    }
-#if !defined(TARGET_PPC64)
-    for (i = 0; i < 32; i++) {
-        qemu_get_betls(f, &env->gprh[i]);
-    }
-#endif
-    qemu_get_betls(f, &env->lr);
-    qemu_get_betls(f, &env->ctr);
-    for (i = 0; i < 8; i++) {
-        qemu_get_be32s(f, &env->crf[i]);
-    }
-    qemu_get_betls(f, &xer);
-    cpu_write_xer(env, xer);
-    qemu_get_betls(f, &env->reserve_addr);
-    qemu_get_betls(f, &env->msr);
-    for (i = 0; i < 4; i++) {
-        qemu_get_betls(f, &env->tgpr[i]);
-    }
-    for (i = 0; i < 32; i++) {
-        union {
-            float64 d;
-            uint64_t l;
-        } u;
-        u.l = qemu_get_be64(f);
-        *cpu_fpr_ptr(env, i) = u.d;
-    }
-    qemu_get_be32s(f, &fpscr);
-    env->fpscr = fpscr;
-    qemu_get_sbe32s(f, &env->access_type);
-#if defined(TARGET_PPC64)
-    qemu_get_betls(f, &env->spr[SPR_ASR]);
-    qemu_get_sbe32s(f, &slb_nr);
-#endif
-    qemu_get_betls(f, &sdr1);
-    for (i = 0; i < 32; i++) {
-        qemu_get_betls(f, &env->sr[i]);
-    }
-    for (i = 0; i < 2; i++) {
-        for (j = 0; j < 8; j++) {
-            qemu_get_betls(f, &env->DBAT[i][j]);
-        }
-    }
-    for (i = 0; i < 2; i++) {
-        for (j = 0; j < 8; j++) {
-            qemu_get_betls(f, &env->IBAT[i][j]);
-        }
-    }
-    qemu_get_sbe32s(f, &env->nb_tlb);
-    qemu_get_sbe32s(f, &env->tlb_per_way);
-    qemu_get_sbe32s(f, &env->nb_ways);
-    qemu_get_sbe32s(f, &env->last_way);
-    qemu_get_sbe32s(f, &env->id_tlbs);
-    qemu_get_sbe32s(f, &env->nb_pids);
-    if (env->tlb.tlb6) {
-        /* XXX assumes 6xx */
-        for (i = 0; i < env->nb_tlb; i++) {
-            qemu_get_betls(f, &env->tlb.tlb6[i].pte0);
-            qemu_get_betls(f, &env->tlb.tlb6[i].pte1);
-            qemu_get_betls(f, &env->tlb.tlb6[i].EPN);
-        }
-    }
-    for (i = 0; i < 4; i++) {
-        qemu_get_betls(f, &env->pb[i]);
-    }
-    for (i = 0; i < 1024; i++) {
-        qemu_get_betls(f, &env->spr[i]);
-    }
-    if (!cpu->vhyp) {
-        ppc_store_sdr1(env, sdr1);
-    }
-    qemu_get_be32s(f, &vscr);
-    ppc_store_vscr(env, vscr);
-    qemu_get_be64s(f, &env->spe_acc);
-    qemu_get_be32s(f, &env->spe_fscr);
-    qemu_get_betls(f, &env->msr_mask);
-    qemu_get_be32s(f, &env->flags);
-    qemu_get_sbe32s(f, &env->error_code);
-    qemu_get_be32s(f, &env->pending_interrupts);
-    qemu_get_be32s(f, &env->irq_input_state);
-    for (i = 0; i < POWERPC_EXCP_NB; i++) {
-        qemu_get_betls(f, &env->excp_vectors[i]);
-    }
-    qemu_get_betls(f, &env->excp_prefix);
-    qemu_get_betls(f, &env->ivor_mask);
-    qemu_get_betls(f, &env->ivpr_mask);
-    qemu_get_betls(f, &env->hreset_vector);
-    qemu_get_betls(f, &env->nip);
-    qemu_get_sbetl(f); /* Discard unused hflags */
-    qemu_get_sbetl(f); /* Discard unused hflags_nmsr */
-    qemu_get_sbe32(f); /* Discard unused mmu_idx */
-    qemu_get_sbe32(f); /* Discard unused power_mode */
-
-    post_load_update_msr(env);
-
-    return 0;
-}
-
 static int get_avr(QEMUFile *f, void *pv, size_t size,
                    const VMStateField *field)
 {
@@ -808,7 +697,6 @@ const VMStateDescription vmstate_ppc_cpu = {
     .version_id = 5,
     .minimum_version_id = 5,
     .minimum_version_id_old = 4,
-    .load_state_old = cpu_load_old,
     .pre_save = cpu_pre_save,
     .post_load = cpu_post_load,
     .fields = (VMStateField[]) {
-- 
2.31.1



  parent reply	other threads:[~2022-01-18 14:37 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 13:06 [PULL 00/31] ppc queue Cédric Le Goater
2022-01-18 13:07 ` [PULL 01/31] docs: rSTify ppc-spapr-hotplug.txt Cédric Le Goater
2022-01-18 13:07 ` [PULL 02/31] docs: Rename ppc-spapr-hotplug.txt to ppc-spapr-hotplug.rst Cédric Le Goater
2022-01-18 13:07 ` [PULL 03/31] Link new ppc-spapr-hotplug.rst file to pseries.rst Cédric Le Goater
2022-01-18 13:07 ` [PULL 04/31] rSTify ppc-spapr-uv-hcalls.txt Cédric Le Goater
2022-01-18 13:07 ` [PULL 05/31] Rename ppc-spapr-uv-hcalls.txt to ppc-spapr-uv-hcalls.rst Cédric Le Goater
2022-01-18 13:07 ` [PULL 06/31] Link new ppc-spapr-uv-hcalls.rst to pseries.rst Cédric Le Goater
2022-01-18 13:07 ` Cédric Le Goater [this message]
2022-01-18 13:07 ` [PULL 08/31] target/ppc: Finish removal of 401/403 CPUs Cédric Le Goater
2022-01-18 13:07 ` [PULL 09/31] target/ppc: Fix 7448 support Cédric Le Goater
2022-01-18 13:07 ` [PULL 10/31] tests/avocado: ppc: Add smoke tests for MPC7400 and MPC7450 families Cédric Le Goater
2022-01-18 13:07 ` [PULL 11/31] ppc/pnv: use PHB4 obj in pnv_pec_stk_pci_xscom_ops Cédric Le Goater
2022-01-18 13:07 ` [PULL 12/31] ppc/pnv: move PCI registers to PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 13/31] ppc/pnv: move phbbar " Cédric Le Goater
2022-01-18 13:07 ` [PULL 14/31] ppc/pnv: move intbar " Cédric Le Goater
2022-01-18 13:07 ` [PULL 15/31] ppc/pnv: change pnv_phb4_update_regions() to use PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 16/31] ppc/pnv: move mmbar0/mmbar1 and friends to PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 17/31] ppc/pnv: move nest_regs[] " Cédric Le Goater
2022-01-18 13:07 ` [PULL 18/31] ppc/pnv: change pnv_pec_stk_update_map() to use PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 19/31] ppc/pnv: move nest_regs_mr to PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 20/31] ppc/pnv: move phb_regs_mr " Cédric Le Goater
2022-01-18 13:07 ` [PULL 21/31] ppc/pnv: introduce PnvPHB4 'pec' property Cédric Le Goater
2022-01-18 13:07 ` [PULL 22/31] ppc/pnv: reduce stack->stack_no usage Cédric Le Goater
2022-01-18 13:07 ` [PULL 23/31] ppc/pnv: remove stack pointer from PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 24/31] ppc/pnv: move default_phb_realize() to pec_realize() Cédric Le Goater
2022-01-18 13:07 ` [PULL 25/31] ppc/pnv: remove PnvPhb4PecStack::stack_no Cédric Le Goater
2022-01-18 13:07 ` [PULL 26/31] ppc/pnv: make PECs create and realize PHB4s Cédric Le Goater
2022-01-18 13:07 ` [PULL 27/31] ppc/pnv: remove PnvPhb4PecStack object Cédric Le Goater
2022-01-18 13:07 ` [PULL 28/31] ppc/pnv: rename pnv_pec_stk_update_map() Cédric Le Goater
2022-01-18 13:07 ` [PULL 29/31] ppc/pnv: Move root port allocation under pnv_pec_default_phb_realize() Cédric Le Goater
2022-01-18 13:07 ` [PULL 30/31] ppc/pnv: Add a 'rp_model' class attribute for the PHB4 PEC Cédric Le Goater
2022-01-18 13:07 ` [PULL 31/31] ppc/pnv: Remove PHB4 version property Cédric Le Goater
2022-01-18 22:27 ` [PULL 00/31] ppc queue Peter Maydell

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=20220118130730.1927983-8-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.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.