From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW7TF-0008NO-QP for qemu-devel@nongnu.org; Tue, 15 Oct 2013 12:27:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VW7T7-0000aT-HN for qemu-devel@nongnu.org; Tue, 15 Oct 2013 12:27:45 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:40669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW7T7-0000aF-B3 for qemu-devel@nongnu.org; Tue, 15 Oct 2013 12:27:37 -0400 Received: by mail-pd0-f172.google.com with SMTP id z10so9113484pdj.31 for ; Tue, 15 Oct 2013 09:27:36 -0700 (PDT) From: Anthony Liguori In-Reply-To: <525D5630.1030801@redhat.com> References: <1381762577-12526-1-git-send-email-mst@redhat.com> <1381762577-12526-43-git-send-email-mst@redhat.com> <525D51C3.2050201@redhat.com> <20131015143530.GA7763@redhat.com> <525D5630.1030801@redhat.com> Date: Tue, 15 Oct 2013 09:27:33 -0700 Message-ID: <87txgimrd6.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PULL 42/43] piix4: add acpi pci hotplug support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , "Michael S. Tsirkin" Cc: peter.maydell@linaro.org, marcel.a@redhat.com, kraxel@redhat.com, qemu-devel@nongnu.org, imammedo@redhat.com Paolo Bonzini writes: > Il 15/10/2013 16:35, Michael S. Tsirkin ha scritto: >> On Tue, Oct 15, 2013 at 04:31:31PM +0200, Paolo Bonzini wrote: >>> Il 14/10/2013 17:01, Michael S. Tsirkin ha scritto: >>>> - VMSTATE_STRUCT(pci0_status, PIIX4PMState, 2, vmstate_pci_status, >>>> - struct pci_status), >>>> + VMSTATE_STRUCT_TEST(pci0_status, PIIX4PMState, >>>> + vmstate_test_no_use_acpi_pci_hotplug, >>>> + 2, vmstate_pci_status, >>>> + struct pci_status), >>> >>> There's no reason to remove this from the stream when a new machine type >>> is in use. You'll just send out zeroes. >> >> Seemed cleaner not to. > > It certainly would be if we had a self-descriptive migration stream > format. Yes, removing tests is always a good thing. But I think subsections should always be used when they can. We should not break compatibility (even if we technical don't guarantee it) unless we absolutely have to. Regards, Anthony Liguori > > However, what we have is "send bytes, parse them on the destination, > hope the format matches". Hence, anything that makes the format less > declarative adds to the complication and complicates debugging. This is > the same reason why I prefer a subsection for the new hotplug stuff---it > makes the format more declarative and self-descriptive. > > Paolo > >>>> + VMSTATE_PCI_HOTPLUG(acpi_pci_hotplug, PIIX4PMState, >>>> + vmstate_test_use_acpi_pci_hotplug), >>> >>> This works, but it is a bit different from other cases that are already >>> present, which use a subsection. It is a bit ugly because it looks like >>> a version-1 field, but in fact it is not version 1. >>> >>> I'll let other people decide whether it's acceptable or not, but I'm >>> leaning towards asking you to use a subsection. >>> >>> Paolo