[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 05/11] pckbd: don't update OBF flags if KBD_STAT_OBF is se
From: |
Gerd Hoffmann |
Subject: |
Re: [PATCH v3 05/11] pckbd: don't update OBF flags if KBD_STAT_OBF is set |
Date: |
Tue, 18 May 2021 12:49:34 +0200 |
Hi,
> static const VMStateDescription vmstate_kbd = {
> .name = "pckbd",
> - .version_id = 3,
> + .version_id = 4,
> .minimum_version_id = 3,
> .post_load = kbd_post_load,
> .fields = (VMStateField[]) {
> @@ -435,6 +471,7 @@ static const VMStateDescription vmstate_kbd = {
> VMSTATE_UINT8(status, KBDState),
> VMSTATE_UINT8(mode, KBDState),
> VMSTATE_UINT8(pending, KBDState),
> + VMSTATE_UINT8_V(obdata, KBDState, 4),
> VMSTATE_END_OF_LIST()
> },
> .subsections = (const VMStateDescription*[]) {
> @@ -512,12 +549,20 @@ void i8042_setup_a20_line(ISADevice *dev, qemu_irq
> a20_out)
> qdev_connect_gpio_out_named(DEVICE(dev), I8042_A20_LINE, 0, a20_out);
> }
Unfortunately live migration isn't that easy. Reason is we want able to
live-migrate both ways (old qemu -> new qemu but also new qemu -> old qemu).
With version ids we can do old qemu -> new qemu only.
So the usual way to deal with this is that new features which require
additional state information can be enabled/disabled at runtime using
device properties. The feature is turned off for the compatibility
machine types. The additional state is added using a conditional
subsection, which is only sent in case the feature is enabled. That way
qemu with -- says -- "-machine pc-q35-5.0" will only enable features and
sent vmstate which qemu 5.0 is able to deal with.
I think there is no way around such a property for the ps2 fixes, even
if we use it for sending/not sending the additional ps2 state
information needed by the bugfixes. Making the fixes itself conditional
should not be needed I think.
take care,
Gerd
- [PATCH v3 00/11] PS/2 controller related fixes, Volker Rümelin, 2021/05/15
- [PATCH v3 01/11] ps2: fix mouse stream corruption, Volker Rümelin, 2021/05/15
- [PATCH v3 04/11] pckbd: split out interrupt line changing code, Volker Rümelin, 2021/05/15
- [PATCH v3 03/11] ps2: don't deassert irq twice if queue is empty, Volker Rümelin, 2021/05/15
- [PATCH v3 05/11] pckbd: don't update OBF flags if KBD_STAT_OBF is set, Volker Rümelin, 2021/05/15
- Re: [PATCH v3 05/11] pckbd: don't update OBF flags if KBD_STAT_OBF is set,
Gerd Hoffmann <=
- [PATCH v3 08/11] pckbd: add controller response queue, Volker Rümelin, 2021/05/15
- [PATCH v3 02/11] ps2: don't raise an interrupt if queue is full, Volker Rümelin, 2021/05/15
- [PATCH v3 06/11] pckbd: PS/2 keyboard throttle, Volker Rümelin, 2021/05/15
- [PATCH v3 09/11] pckbd: add function kbd_pending(), Volker Rümelin, 2021/05/15
- [PATCH v3 07/11] pckbd: add state variable for interrupt source, Volker Rümelin, 2021/05/15
- [PATCH v3 10/11] pckbd: correctly disable PS/2 communication, Volker Rümelin, 2021/05/15
- [PATCH v3 11/11] pckbd: remove duplicated keyboard and mouse defines, Volker Rümelin, 2021/05/15
- Re: [PATCH v3 00/11] PS/2 controller related fixes, Philippe Mathieu-Daudé, 2021/05/15