qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 19/25] ahci: add migration support


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 19/25] ahci: add migration support
Date: Fri, 14 Sep 2012 10:38:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Jason Baron <address@hidden> wrote:
> Add support for ahci migration. This patch builds upon the patches originally
> posted by Andreas Färber.
>
> These patches have been tested by migrating Windows 7 and Fedora 16 guests on
> both piix with ahci attached and on q35 (which has a built-in ahci 
> controller).

> +const VMStateDescription vmstate_ahci = {
> +    .name = "ahci",
> +    .version_id = 1,
> +    .post_load = ahci_state_post_load,
> +    .fields = (VMStateField []) {

  +        VMSTATE_INT32_EQUAL(ports, AHCIState),


> +        VMSTATE_STRUCT_VARRAY_POINTER_INT32(dev, AHCIState, ports,
> +                                     vmstate_ahci_device, AHCIDevice),
> +        VMSTATE_UINT32(control_regs.cap, AHCIState),
> +        VMSTATE_UINT32(control_regs.ghc, AHCIState),
> +        VMSTATE_UINT32(control_regs.irqstatus, AHCIState),
> +        VMSTATE_UINT32(control_regs.impl, AHCIState),
> +        VMSTATE_UINT32(control_regs.version, AHCIState),
> +        VMSTATE_UINT32(idp_index, AHCIState),
> +        VMSTATE_END_OF_LIST()
> +    },
> +};
> +

Only comment that I have is if we can add that bit on the vmstate
transition.  That way we can detect when the number of ports between the
two instances are different.

You can change it to; (it checks that ports received is less ore equal
than original value):

  +        VMSTATE_INT32_LE(ports, AHCIState),

If the code will work if we transfer less ports that are active. I have
no clue which one makes more sense from the ahci point of view.

Thanks, Juan.



reply via email to

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