qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 29/50] pckbd: more vmstate_register() from i8042_mm_init() to


From: Hervé Poussineau
Subject: Re: [PATCH 29/50] pckbd: more vmstate_register() from i8042_mm_init() to i8042_mmio_realize()
Date: Mon, 23 May 2022 08:34:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

Hello,

If you want, you can break migration compatibility. I don't see it as a problem.

Hervé

Le 22/05/2022 à 20:18, Mark Cave-Ayland a écrit :
Note in this case it is not possible to register a (new) VMStateDescription in
the DeviceClass without breaking migration compatibility for the MIPS magnum
machine.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
  hw/input/pckbd.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index eb77ad193e..7f3578aa4d 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -681,6 +681,9 @@ static void i8042_mmio_realize(DeviceState *dev, Error 
**errp)
memory_region_init_io(&s->region, OBJECT(dev), &i8042_mmio_ops, ks,
                            "i8042", s->size);
+
+    /* Note we can't use dc->vmsd without breaking migration compatibility */
+    vmstate_register(NULL, 0, &vmstate_kbd, ks);
  }
static void i8042_mmio_init(Object *obj)
@@ -721,8 +724,6 @@ MMIOKBDState *i8042_mm_init(qemu_irq kbd_irq, qemu_irq 
mouse_irq,
      s->irq_kbd = kbd_irq;
      s->irq_mouse = mouse_irq;
- vmstate_register(NULL, 0, &vmstate_kbd, s);
-
      s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s);
      s->mouse = ps2_mouse_init(kbd_update_aux_irq, s);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]