* Peter Maydell <[email protected]>: > You need to increment the version_id and minimum_version_id > to change the vmstate. Or you could instead replace the line with > VMSTATE_UNUSED(1), /* was "disable" */ > (which keeps the migration data structure the same, so no > version bump needed). > > I have no strong preference; I would probably just bump > the version numbers personally.
New patch below. Ok? Helge From: Helge Deller <[email protected]> Subject: [PATCH] hw/char: Drop disable property of Diva GSP card The "disable" property is not used, so drop it. Noticed-by: Peter Maydell <[email protected]> Signed-off-by: Helge Deller <[email protected]> diff --git a/hw/char/diva-gsp.c b/hw/char/diva-gsp.c index 280d0413c6..2be5183216 100644 --- a/hw/char/diva-gsp.c +++ b/hw/char/diva-gsp.c @@ -51,7 +51,6 @@ typedef struct PCIDivaSerialState { SerialState state[PCI_SERIAL_MAX_PORTS]; uint32_t level[PCI_SERIAL_MAX_PORTS]; qemu_irq *irqs; - bool disable; } PCIDivaSerialState; static void diva_pci_exit(PCIDevice *dev) @@ -159,20 +158,18 @@ static void diva_pci_realize(PCIDevice *dev, Error **errp) static const VMStateDescription vmstate_pci_diva = { .name = "pci-diva-serial", - .version_id = 1, - .minimum_version_id = 1, + .version_id = 2, + .minimum_version_id = 2, .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(dev, PCIDivaSerialState), VMSTATE_STRUCT_ARRAY(state, PCIDivaSerialState, PCI_SERIAL_MAX_PORTS, 0, vmstate_serial, SerialState), VMSTATE_UINT32_ARRAY(level, PCIDivaSerialState, PCI_SERIAL_MAX_PORTS), - VMSTATE_BOOL(disable, PCIDivaSerialState), VMSTATE_END_OF_LIST() } }; static const Property diva_serial_properties[] = { - DEFINE_PROP_BOOL("disable", PCIDivaSerialState, disable, false), DEFINE_PROP_CHR("chardev1", PCIDivaSerialState, state[0].chr), DEFINE_PROP_CHR("chardev2", PCIDivaSerialState, state[1].chr), DEFINE_PROP_CHR("chardev3", PCIDivaSerialState, state[2].chr),
