[Top][All Lists]
[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.
- [Qemu-devel] [PATCH 14/25] q35: Fix non-PCI IRQ processing in ich9_lpc_update_apic, (continued)
- [Qemu-devel] [PATCH 22/25] ahci: properly reset PxCMD on HBA reset, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 01/25] pci: pci capability must be in PCI space, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 05/25] pc, pc_piix: split out pc nic initialization, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 19/25] ahci: add migration support, Jason Baron, 2012/09/13
- Re: [Qemu-devel] [PATCH 19/25] ahci: add migration support,
Juan Quintela <=
- [Qemu-devel] [PATCH 21/25] pcie_aer: clear cmask for Advanced Error Interrupt Message Number, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 11/25] q35: Introduce q35 pc based chipset emulator, Jason Baron, 2012/09/13