Skip to contentSkip to conversation

ppc pbr403 vmstate

PATCH Dr. David Alan Gilbert 4 participants 8 messages Jan 13, 2022 – Jan 18, 2022

lore
Share & tools
lore
#0 lore raw

Hi,
Is there any easy way of getting a machine where the pbr403 vmstate
would be generated?

Given my vague understanding of vmstate subsection naming, I think
we need:

target/ppc/machine.c +1 -1
index 756d8de5d8..e535edb7c4 100644
@@ -718,7 +718,7 @@ static bool pbr403_needed(void *opaque)
 }
 
 static const VMStateDescription vmstate_pbr403 = {
-    .name = "cpu/pbr403",
+    .name = "cpu/tlb6xx/pbr403",
     .version_id = 1,
     .minimum_version_id = 1,
     .needed = pbr403_needed,

to fit the rule where the name of a subsection is prefixed by the parent name. (Something a new check I added just triggered).

Dave

Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#1 lore raw
Quoted 3 lines · Dr. David Alan Gilbert

Hi,
Is there any easy way of getting a machine where the pbr403 vmstate
would be generated?

The condition in pbr403_needed is...

    return (pvr & 0xffff0000) == 0x00200000;

.. which looks to be the PVR for ppc403 models. That makes sense with the section name... but not so much with the fact that it's under cpu/tlb6xx. The 6xx MMU is basically unrelated to the 40x MMU. But it looks like the vmstate_tlbemb might be shared between then, because of bad ideas of the past.

But in any case, we already dropped what little 403 support we ever had - there's nothing with that PVR even listed in target/ppc/cpu-models.h.

So I think we should just drop it.

Quoted 22 lines

Given my vague understanding of vmstate subsection naming, I think
we need:

target/ppc/machine.c +1 -1
index 756d8de5d8..e535edb7c4 100644
@@ -718,7 +718,7 @@ static bool pbr403_needed(void *opaque)
 }
 
 static const VMStateDescription vmstate_pbr403 = {
-    .name = "cpu/pbr403",
+    .name = "cpu/tlb6xx/pbr403",
     .version_id = 1,
     .minimum_version_id = 1,
     .needed = pbr403_needed,

to fit the rule where the name of a subsection is prefixed by the parent name. (Something a new check I added just triggered).

Dave

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#2 lore raw
Quoted 15 lines · David Gibson
Quoted 3 lines · Dr. David Alan Gilbert

Hi,
Is there any easy way of getting a machine where the pbr403 vmstate
would be generated?

The condition in pbr403_needed is...

     return (pvr & 0xffff0000) == 0x00200000;

.. which looks to be the PVR for ppc403 models. That makes sense with the section name... but not so much with the fact that it's under cpu/tlb6xx. The 6xx MMU is basically unrelated to the 40x MMU. But it looks like the vmstate_tlbemb might be shared between then, because of bad ideas of the past.

Quoted 5 lines

But in any case, we already dropped what little 403 support we ever had - there's nothing with that PVR even listed in target/ppc/cpu-models.h.

So I think we should just drop it.

yes. But we can not remove env.pb since this would break migration compatibility, correct ?

I will send a patch.

Thanks,

C.

#3 lore raw
Quoted 16 lines · Cédric le Goater
Quoted 15 lines · David Gibson
Quoted 3 lines · Dr. David Alan Gilbert

Hi,
Is there any easy way of getting a machine where the pbr403 vmstate
would be generated?

The condition in pbr403_needed is...

     return (pvr & 0xffff0000) == 0x00200000;

.. which looks to be the PVR for ppc403 models. That makes sense with the section name... but not so much with the fact that it's under cpu/tlb6xx. The 6xx MMU is basically unrelated to the 40x MMU. But it looks like the vmstate_tlbemb might be shared between then, because of bad ideas of the past.

Quoted 8 lines
Quoted 5 lines

But in any case, we already dropped what little 403 support we ever had - there's nothing with that PVR even listed in target/ppc/cpu-models.h.

So I think we should just drop it.

yes. But we can not remove env.pb since this would break migration compatibility, correct ?

Only if it appears in a migration section that's actually emitted by a supported machine type. As far as I can tell the only section that does that is vmstate_pbr403, which we're also dropping so we should be fine.

It is also touched in the *super* old cpu_load_old. I suspect we could probably just drop that completely, since I don't think we realistically support migration from a version that old anyway. But even if we don't want to do that right now, we can just replace the reads into env->pb with discarding reads and we'll be fine. We don't implement any cpus that actually used those fields, so we can ignore them in the migration stream.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#4 lore raw
Quoted 23 lines · David Gibson
Quoted 22 lines · Cédric le Goater
Quoted 20 lines · David Gibson
Quoted 3 lines · Dr. David Alan Gilbert

Hi,
Is there any easy way of getting a machine where the pbr403 vmstate
would be generated?

The condition in pbr403_needed is...

      return (pvr & 0xffff0000) == 0x00200000;

.. which looks to be the PVR for ppc403 models. That makes sense with the section name... but not so much with the fact that it's under cpu/tlb6xx. The 6xx MMU is basically unrelated to the 40x MMU. But it looks like the vmstate_tlbemb might be shared between then, because of bad ideas of the past.

But in any case, we already dropped what little 403 support we ever had - there's nothing with that PVR even listed in target/ppc/cpu-models.h.

So I think we should just drop it.

Quoted 7 lines
Quoted 2 lines

yes. But we can not remove env.pb since this would break migration compatibility, correct ?

Only if it appears in a migration section that's actually emitted by a supported machine type. As far as I can tell the only section that does that is vmstate_pbr403, which we're also dropping so we should be fine.

I sent a patch to remove vmstate_pbr403 first.

Quoted 7 lines

It is also touched in the *super* old cpu_load_old. I suspect we could probably just drop that completely, since I don't think we realistically support migration from a version that old anyway. But even if we don't want to do that right now, we can just replace the reads into env->pb with discarding reads and we'll be fine. We don't implement any cpus that actually used those fields, so we can ignore them in the migration stream.

I will take a look at this also with follow ups.

Thanks,

C.

#5 lore raw
Quoted 27 lines · * Cédric Le Goater ([email protected]) wrote:
Quoted 26 lines · David Gibson
Quoted 24 lines · Cédric le Goater
Quoted 15 lines · David Gibson
Quoted 3 lines · Dr. David Alan Gilbert

Hi,
Is there any easy way of getting a machine where the pbr403 vmstate
would be generated?

The condition in pbr403_needed is...

      return (pvr & 0xffff0000) == 0x00200000;

.. which looks to be the PVR for ppc403 models. That makes sense with the section name... but not so much with the fact that it's under cpu/tlb6xx. The 6xx MMU is basically unrelated to the 40x MMU. But it looks like the vmstate_tlbemb might be shared between then, because of bad ideas of the past.

Quoted 5 lines

But in any case, we already dropped what little 403 support we ever had - there's nothing with that PVR even listed in target/ppc/cpu-models.h.

So I think we should just drop it.

yes. But we can not remove env.pb since this would break migration compatibility, correct ?

Quoted 6 lines
Quoted 4 lines

Only if it appears in a migration section that's actually emitted by a supported machine type. As far as I can tell the only section that does that is vmstate_pbr403, which we're also dropping so we should be fine.

I sent a patch to remove vmstate_pbr403 first.

Thanks!

Dave

Quoted 14 lines
Quoted 7 lines

It is also touched in the *super* old cpu_load_old. I suspect we could probably just drop that completely, since I don't think we realistically support migration from a version that old anyway. But even if we don't want to do that right now, we can just replace the reads into env->pb with discarding reads and we'll be fine. We don't implement any cpus that actually used those fields, so we can ignore them in the migration stream.

I will take a look at this also with follow ups.

Thanks,

C.

Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#6 lore raw
In reply to David Gibson
Quoted 3 lines · David Gibson

It is also touched in the *super* old cpu_load_old. I suspect we could probably just drop that completely, since I don't think we realistically support migration from a version that old anyway.

This would be a nice thing to do, because the PPC CPU is the only remaining in-tree user of the .load_state_old migration hook, so if we declared that we don't support migrating from those old versions of QEMU (1.5 and earlier, I think) then we could delete the .load_state_old and .minimum_version_id_old handling completely.

-- PMM

#7 lore raw
Quoted 11 lines · Peter Maydell
Quoted 3 lines · David Gibson

It is also touched in the *super* old cpu_load_old. I suspect we could probably just drop that completely, since I don't think we realistically support migration from a version that old anyway.

This would be a nice thing to do, because the PPC CPU is the only remaining in-tree user of the .load_state_old migration hook, so if we declared that we don't support migrating from those old versions of QEMU (1.5 and earlier, I think) then we could delete the .load_state_old and .minimum_version_id_old handling completely.

yes. It should be fine for PPC.

Thanks,

C.