From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu8ar-0008Fs-3a for qemu-devel@nongnu.org; Mon, 09 Jun 2014 19:03:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wu8ag-0007V4-6R for qemu-devel@nongnu.org; Mon, 09 Jun 2014 19:03:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu8af-0007Up-Uh for qemu-devel@nongnu.org; Mon, 09 Jun 2014 19:02:58 -0400 Message-ID: <53963D1B.4090900@redhat.com> Date: Mon, 09 Jun 2014 17:02:51 -0600 From: Eric Blake MIME-Version: 1.0 References: <463560c2fbe9c476d4a500008618f01740cd5631.1402299637.git.hutao@cn.fujitsu.com> In-Reply-To: <463560c2fbe9c476d4a500008618f01740cd5631.1402299637.git.hutao@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fJvvSevEj86EcVHPCOhiFn10cJ8UTMobH" Subject: Re: [Qemu-devel] [PATCH v4 02/29] NUMA: check if the total numa memory size is equal to ram_size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao , qemu-devel@nongnu.org Cc: Eduardo Habkost , "Michael S. Tsirkin" , Paolo Bonzini , Igor Mammedov , Yasunori Goto , Wanlong Gao This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fJvvSevEj86EcVHPCOhiFn10cJ8UTMobH Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/09/2014 04:25 AM, Hu Tao wrote: > From: Wanlong Gao >=20 > If the total number of the assigned numa nodes memory is not > equal to the assigned ram size, it will write the wrong data > to ACPI table, then the guest will ignore the wrong ACPI table > and recognize all memory to one node. It's buggy, we should > check it to ensure that we write the right data to ACPI table. >=20 > Signed-off-by: Wanlong Gao > Reviewed-by: Eduardo Habkost > Signed-off-by: Paolo Bonzini > Signed-off-by: Hu Tao > --- > numa.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) >=20 > + if (numa_total !=3D ram_size) { > + error_report("qemu: total memory size for NUMA nodes (%" P= RIu64 ")" > + " should equal to RAM size (" RAM_ADDR_FMT ")= \n", error_report() should not include trailing \n > + numa_total, ram_size); > + exit(1); Not your fault that this file is full of exit(1), but it would be nice to have a cleanup patch someday that uses EXIT_FAILURE. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --fJvvSevEj86EcVHPCOhiFn10cJ8UTMobH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTlj0bAAoJEKeha0olJ0NqPwIIAJ79FZ2xPBbXpC07246EgPer cUwMwQjDEZqktQqCQFx9khv7iRMHK4u6kR+XELZ4NnNfoq5JRRSo8yFWVDNJ6B8V 2boBDWHHfx5uijbrVPzZTEP9zckvd3ECK7QFY4VMsyImUj9Pk+qEM9/oRi2Ps8NA ke2neXYrmVa+PXV8XJIuV8sBABWJWjIRcPWm+mD+5VSFJvKDFitMMAgSL2d0c7Z/ KqqPSgHfMuGSi+Ld+jlxPr7LHBf9mEVn3ES36M8V+9GK8hA4Zbsrt4Z83zLr7BtC 6TrJBBveQxW93CCLUya+LzZyQcmtuCsmHL1Vf4MdKCg7rk0bhfFFiJRwqSdhKTQ= =gEci -----END PGP SIGNATURE----- --fJvvSevEj86EcVHPCOhiFn10cJ8UTMobH--