From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj6WK-0001bf-HG for qemu-devel@nongnu.org; Mon, 05 Oct 2015 10:13:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj6WH-0000YC-AH for qemu-devel@nongnu.org; Mon, 05 Oct 2015 10:13:40 -0400 References: <1442495357-26547-1-git-send-email-david@gibson.dropbear.id.au> <1442495357-26547-8-git-send-email-david@gibson.dropbear.id.au> <5602F585.4000800@redhat.com> <20150923235459.GG15944@voom.fritz.box> <56039F55.6040907@redhat.com> <560F2069.5030902@ozlabs.ru> From: Paolo Bonzini Message-ID: <5612858A.80907@redhat.com> Date: Mon, 5 Oct 2015 16:13:30 +0200 MIME-Version: 1.0 In-Reply-To: <560F2069.5030902@ozlabs.ru> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 07/10] spapr_pci: Allow PCI host bridge DMA window to be configured List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , Laurent Vivier , David Gibson Cc: thuth@redhat.com, Michael Roth , Juan Quintela , gwshan@linux.vnet.ibm.com, qemu-devel@nongnu.org, alex.williamson@redhat.com, qemu-ppc@nongnu.org On 03/10/2015 02:25, Alexey Kardashevskiy wrote: >> I think this is the aim of VMSTATE_UINT64_EQUAL() ? > > We use it only for things which cannot be set via the command line > and ideally there should be no VMSTATE_*_EQUAL. If something can be > set via the command line, then the management software (read - > libvirt) runs QEMU with explicit parameters to guarantee that these > are equal. VMSTATE_*_EQUAL is used when a value is later used as e.g. the size of an array. It basically provides bounds checking for the subsequent array, avoiding that an invalid migration file or an error issuing the QEMU command on the destination transforms into a buffer overflow. Michael Roth did most of this work, IIRC. Documenting it in docs/migration.txt would be nice. Paolo