[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 10/20] hw/usb/hcd-ohci: Mark the device with no migrat
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [RFC PATCH v2 10/20] hw/usb/hcd-ohci: Mark the device with no migratable fields |
Date: |
Mon, 18 Jan 2021 20:10:45 +0000 |
User-agent: |
Mutt/1.14.6 (2020-07-11) |
* Philippe Mathieu-Daudé (f4bug@amsat.org) wrote:
> This device doesn't have fields to migrate. Be explicit
> by using vmstate_qdev_no_state_to_migrate.
>
> Add a more descriptive comment to keep a clear separation
> between static property vs runtime changeable.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
OK,
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
although I think it's quite interesting; I think we have
a base class which has data to migrate which expects any
child classes to migrate it's data; so marking it as
not actually having any state is not quite right.
> ---
> hw/usb/hcd-ohci.h | 2 ++
> hw/usb/hcd-ohci.c | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci.h
> index 11ac57058d1..fd4842a352f 100644
> --- a/hw/usb/hcd-ohci.h
> +++ b/hw/usb/hcd-ohci.h
> @@ -101,6 +101,8 @@ struct OHCISysBusState {
> /*< public >*/
>
> OHCIState ohci;
> +
> + /* Properties */
> char *masterbus;
> uint32_t num_ports;
> uint32_t firstport;
> diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
> index f8c64c8b95b..302aab30992 100644
> --- a/hw/usb/hcd-ohci.c
> +++ b/hw/usb/hcd-ohci.c
> @@ -2007,6 +2007,7 @@ static void ohci_sysbus_class_init(ObjectClass *klass,
> void *data)
> DeviceClass *dc = DEVICE_CLASS(klass);
>
> dc->realize = ohci_realize_pxa;
> + dc->vmsd = vmstate_qdev_no_state_to_migrate;
> set_bit(DEVICE_CATEGORY_USB, dc->categories);
> dc->desc = "OHCI USB Controller";
> device_class_set_props(dc, ohci_sysbus_properties);
> --
> 2.26.2
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
- Re: [RFC PATCH v2 02/20] hw/core/qdev: Add vmstate_qdev_no_state_to_migrate, (continued)
- [RFC PATCH v2 04/20] hw/arm/aspeed_soc: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 03/20] hw/arm/armv7m: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 05/20] hw/arm/bcm283x: Mark devices with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 06/20] hw/arm/msf2-soc: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 07/20] hw/core/split-irq: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 09/20] hw/cpu/cluster: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 08/20] hw/cpu/a9mpcore: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 10/20] hw/usb/hcd-ohci: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- Re: [RFC PATCH v2 10/20] hw/usb/hcd-ohci: Mark the device with no migratable fields,
Dr. David Alan Gilbert <=
- [RFC PATCH v2 11/20] hw/intc/arm_gicv2m: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 12/20] hw/misc/armsse-cpuid: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 13/20] hw/misc/iotkit-sysinfo: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 14/20] hw/misc/unimp: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 15/20] hw/nubus/mac-nubus-bridge: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 16/20] hw/sparc64/sun4u: Mark devices with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 17/20] hw/pci-host/gpex: Mark device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 18/20] hw/core/qdev: Display warning for devices missing migration state, Philippe Mathieu-Daudé, 2021/01/17