From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjIwe-0001eY-HG for qemu-devel@nongnu.org; Mon, 05 Oct 2015 23:29:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjIwb-0007Ea-AT for qemu-devel@nongnu.org; Mon, 05 Oct 2015 23:29:40 -0400 Date: Tue, 6 Oct 2015 14:25:07 +1100 From: David Gibson Message-ID: <20151006032507.GD3861@voom.fritz.box> 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> <5612858A.80907@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SO98HVl1bnMOfKZd" Content-Disposition: inline In-Reply-To: <5612858A.80907@redhat.com> 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: Paolo Bonzini Cc: Laurent Vivier , thuth@redhat.com, Michael Roth , Juan Quintela , Alexey Kardashevskiy , gwshan@linux.vnet.ibm.com, qemu-devel@nongnu.org, alex.williamson@redhat.com, qemu-ppc@nongnu.org --SO98HVl1bnMOfKZd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 05, 2015 at 04:13:30PM +0200, Paolo Bonzini wrote: >=20 >=20 > On 03/10/2015 02:25, Alexey Kardashevskiy wrote: > >> I think this is the aim of VMSTATE_UINT64_EQUAL() ? > >=20 > > 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. >=20 > 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. >=20 > Michael Roth did most of this work, IIRC. Documenting it in > docs/migration.txt would be nice. Ah.. which means we probably should use VMSTATE_*_EQUAL here since the window size determines the size of the array of actual TCEs to follow shortly. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --SO98HVl1bnMOfKZd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWEz8TAAoJEGw4ysog2bOSt/oP/idYyRI22o+nAnoAxzmogD8c bOR+rGCu6EP2ByarWLKc12iDGvj629WA2W0yshx9TiMaMDLiC+JFtXUFXRcq5pDl Ua+Znrqyt/gpoV6weAh4mu5YoeBse0X637v7RQAOq1OIGBs//0GBTqHoqu8592+H wZ/N6EYuqnV0mbiFmpKHLI6POWKALs3E7j2gZo8+seq9K/ofQzr12CZy3ZnzyIgR zMK4tgW1Ay+khPsEaK9rJdfz68xroelX21UmihlaGqprpiZJCySrugI8OnkR8vre FWplhTh1JKbtsVtHVOF/fF9YPk2Uosz0NfJ8ki+UkngV4GLLGO0KgCQpqu+SG4Jg hKf5GrK1GtAtIBTbq4wdtVp134GAOUlnntq9rB/zRc3NeEmkcTzlIQlaseXvQ9XN aZohLM4CSM3gKMS6mDCu7oKh+iWhgW1+DsocBDFGimMKh2KAmOli/hMJeN3Cj5jb m0cNpPDFrQIg0waZaIUopkf5hobk8jc20X7p/7D4Phbc/GbTKf3m+4IwDmXIMLBf aHWEbIoxxtboLChZv0FMhcMfPz5CLbcOtqc2ZhFkZC7UIKlAmTwirES+oZTJxJEw ckA7iaWHcm3bOoyv1kgml4JnAAr/9Re4kQRUAlHFtg05/fgbxuTGBagHQgUZWfnU 85Jvk+io5jo45SSLvhHZ =YR4+ -----END PGP SIGNATURE----- --SO98HVl1bnMOfKZd--