[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/4] e1000e: No need to validate configuration o
From: |
Dmitry Fleytman |
Subject: |
Re: [Qemu-devel] [PATCH 2/4] e1000e: No need to validate configuration on migration |
Date: |
Thu, 27 Oct 2016 09:42:53 +0300 |
> On 26 Oct 2016, at 22:21 PM, Eduardo Habkost <address@hidden> wrote:
>
> The user (or management software) is responsible for keeping the
> same configuration on both sides while migrating. Remove the
> configuration validation code at e1000e_post_load, and the
> unnecessary subsys_used/subsys_ven_used fields.
Migration with different subsys/subsys_ven may have a
really cumbersome consequences that are very hard to debug,
so I believe such a verification may save a lot of time,
however it’s a matter of convention.
Jason, is there specific convention for cases like this?
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> hw/net/e1000e.c | 14 --------------
> 1 file changed, 14 deletions(-)
>
> diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
> index df24e55..a932620 100644
> --- a/hw/net/e1000e.c
> +++ b/hw/net/e1000e.c
> @@ -66,9 +66,6 @@ typedef struct E1000EState {
> uint16_t subsys_ven;
> uint16_t subsys;
>
> - uint16_t subsys_ven_used;
> - uint16_t subsys_used;
> -
> bool disable_vnet;
>
> E1000ECore core;
> @@ -424,9 +421,6 @@ static void e1000e_pci_realize(PCIDevice *pci_dev, Error
> **errp)
> pci_set_word(pci_dev->config + PCI_SUBSYSTEM_VENDOR_ID, s->subsys_ven);
> pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID, s->subsys);
>
> - s->subsys_ven_used = s->subsys_ven;
> - s->subsys_used = s->subsys;
> -
> /* Define IO/MMIO regions */
> memory_region_init_io(&s->mmio, OBJECT(s), &mmio_ops, s,
> "e1000e-mmio", E1000E_MMIO_SIZE);
> @@ -531,14 +525,6 @@ static int e1000e_post_load(void *opaque, int version_id)
>
> trace_e1000e_cb_post_load();
>
> - if ((s->subsys != s->subsys_used) ||
> - (s->subsys_ven != s->subsys_ven_used)) {
> - fprintf(stderr,
> - "ERROR: Cannot migrate while device properties "
> - "(subsys/subsys_ven) differ");
> - return -1;
> - }
> -
> return e1000e_core_post_load(&s->core);
> }
>
> --
> 2.7.4
>
[Qemu-devel] [PATCH 4/4] e1000e: Rename "subsys_ven" property to "subsys-vendor", Eduardo Habkost, 2016/10/26
[Qemu-devel] [PATCH 3/4] e1000e: Rename "disable_vnet_hdr" property to "vnet", Eduardo Habkost, 2016/10/26