Skip to content

Fix VMState design flaws

Juan Quintela qemu-devel 2 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 0 repliesNew
  2. v14 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- fix old_version field for ps2 keyboard (thanks paolo)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4vmstate: remove const for put operationshw/hw.h hw/pci.c hw/ptimer.c +1 more+28 -280 replies
2/4vmstate: add version_id argument to post_loadexec.c hw/acpi.c hw/cirrus_vga.c +10 more+13 -130 replies
3/4vmstate: remove ps2_kbd_load_old()hw/ps2.c+4 -120 replies
4/4vmstate: Add support for sending partial arrayshw/hw.h+12 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/4] Fix VMState design flaws

Hi

v2:
- fix old_version field for ps2 keyboard (thanks paolo)

v1:
I know you are not going to believe it, but VMState design have flaws:

(everybody) Ooohhhhhhh!!!!

This patches fixes (some) of them:

* When we added .pre_save() and .post_save(), we have it basically to change values in the variable pointed by the "void *opaque". Without this functions, it made sense that this variables were const, with them, it means that we have to do
FooState *s = (void *)opaque
in every pre/post_save() function. Just remove the const.
* Add version_id field to post_load(). Now we can assign default values in post_load for old versions of the state (ps2_kbd as example). This one is also needed for ioapic in qemu-kvm.
* Add support for sending partial struct arrays (i.e. only some fields starting from the beggining) fdc cleanups for getting pc98 in need it.

That is all for now :)

Later, Juan.

Juan Quintela (4):
vmstate: remove const for put operations
vmstate: add version_id argument to post_load
vmstate: remove ps2_kbd_load_old()
vmstate: Add support for sending partial arrays

 exec.c             |    2 +-
 hw/acpi.c          |    2 +-
 hw/cirrus_vga.c    |    2 +-
 hw/dma.c           |    2 +-
 hw/fdc.c           |    2 +-
 hw/hpet.c          |    2 +-
 hw/hw.h            |   18 +++++++++++++++---
 hw/pci.c           |    2 +-
 hw/piix_pci.c      |    2 +-
 hw/ps2.c           |   16 ++++------------
 hw/ptimer.c        |    4 ++--
 hw/serial.c        |    2 +-
 hw/slavio_intctl.c |    2 +-
 hw/tcx.c           |    2 +-
 hw/vmmouse.c       |    2 +-
 savevm.c           |   48 ++++++++++++++++++++++++------------------------
 16 files changed, 57 insertions(+), 53 deletions(-)