From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4W0m-0005ZE-JS for qemu-devel@nongnu.org; Mon, 15 Jun 2015 11:09:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4W0k-0000kF-Np for qemu-devel@nongnu.org; Mon, 15 Jun 2015 11:09:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4W0k-0000kA-JV for qemu-devel@nongnu.org; Mon, 15 Jun 2015 11:09:18 -0400 Message-ID: <557EEA9C.3040303@redhat.com> Date: Mon, 15 Jun 2015 09:09:16 -0600 From: Eric Blake MIME-Version: 1.0 References: <1434117956-4929-1-git-send-email-dslutz@verizon.com> <1434117956-4929-2-git-send-email-dslutz@verizon.com> <557B5F49.5050109@redhat.com> <557ED8D3.8010900@one.verizon.com> In-Reply-To: <557ED8D3.8010900@one.verizon.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KPk2U2ql6HTsSpB4rmPjhfVfPF7sHtwxw" Subject: Re: [Qemu-devel] [BUGFIX][PATCH v7 1/9] vmport: The io memory region needs to be at least a size of 4 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Don Slutz , "qemu-devel@nongnu.org" Cc: "Michael S. Tsirkin" , Markus Armbruster , Luiz Capitulino , Don Slutz , Anthony Liguori , Paolo Bonzini , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Richard Henderson This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KPk2U2ql6HTsSpB4rmPjhfVfPF7sHtwxw Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/15/2015 07:53 AM, Don Slutz wrote: > On 06/12/15 18:38, Eric Blake wrote: >>> =20 >>> + /* Only support 1 address */ >>> + if (addr) { >>> + return ~0U; >>> + } >> >> Different answer on 32-bit platforms (there, ~0U is 0xffffffff, which >> then 0-extends to uint64_t rather than your desired result of >> 0xffffffffffffffffULL). >> >=20 > This is not true: Oh, I was confusing ~0UL (where sign extension on 32- vs 64-bit matters) and ~0U (which you used). >=20 >> Why can't you just 'return -1;'? >> >=20 > I/O instructions on x86 are limited to 32bits max. Also when EAX is > changed via inl, the high 32bits are 0. So the correct result is ~0U > not -1. Still, it might be better to write an explicit 0xffffffff or even have a named constant, rather than making people reason about whether ~0U promotes into a 64-bit value with only 32 bits set. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --KPk2U2ql6HTsSpB4rmPjhfVfPF7sHtwxw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVfuqcAAoJEKeha0olJ0NqMEsH/ju6sbohSU80Y4q1rtp5qctA q614hCvCPym7VrkOSOpypK4sB8ss6850m51JC+xKzuU98sm/Ud63e38rOxGa3IxS ihyxT+0p5CTquK0d79e6IhT6gEF66fIAf1R21MlSdm7ElZ2G96DQxzYGpfcUTEb5 4aLkTpl3wOHfLeHur9mXfzEupOQNIGCDTFFJf+AiIou/4xME6+TAfH7n0nCI1t0G w+3kNnKcgCXhHa531cDjQtc7P+c+p0v+Zq1o4o7ZZpB+7t3zw5yFIv3ZraNyncWc HKVVUqsU4pzHK+ymbUKBC8DKCoYXieuhxBMPI7v7HZeb76GsqC8DPcF0xWAGZeo= =Xt8B -----END PGP SIGNATURE----- --KPk2U2ql6HTsSpB4rmPjhfVfPF7sHtwxw--