From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwEXq-0007x5-4j for qemu-devel@nongnu.org; Fri, 18 Jan 2013 11:11:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwEXl-0000eH-4r for qemu-devel@nongnu.org; Fri, 18 Jan 2013 11:11:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwEXk-0000eC-S2 for qemu-devel@nongnu.org; Fri, 18 Jan 2013 11:11:49 -0500 Message-ID: <50F9743E.2080601@redhat.com> Date: Fri, 18 Jan 2013 09:11:42 -0700 From: Eric Blake MIME-Version: 1.0 References: <1358456378-29248-1-git-send-email-ehabkost@redhat.com> <1358456378-29248-5-git-send-email-ehabkost@redhat.com> <50F92DE1.7040107@suse.de> <20130118125340.GV10683@otherpad.lan.raisama.net> <50F9480D.3040400@suse.de> <20130118142013.GX10683@otherpad.lan.raisama.net> In-Reply-To: <20130118142013.GX10683@otherpad.lan.raisama.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2IELIWGGFPQOWSMIFXLHS" Subject: Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Gleb Natapov , "kvm@vger.kernel.org list" , qemu-devel@nongnu.org, Anthony Liguori , Igor Mammedov , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2IELIWGGFPQOWSMIFXLHS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/18/2013 07:20 AM, Eduardo Habkost wrote: >> Could you suggest a text for me to add please? >=20 > "The argument passed to KVM_CREATE_VCPU now has 'unsigned long' type > instead of 'int', as expected by the Linux ioctl() syscall. Maybe an in= t > works on most or all architectures supporting KVM, but it is safer to > use an appropriate 'unsigned long' parameter." Interestingly enough, while the Linux syscall uses 'unsigned long', the POSIX definition of ioctl() uses 'int'; so the Linux kernel is already constrained to never use an ioctl value that doesn't fit within 'int', and glibc is already responsible for ensuring that argument promotion of an int doesn't change the behavior of ioctl() in libc when converting it over to the unsigned long syscall semantics expected by the kernel. >=20 > To find out if 'int' breaks on any architecture, I would need to check > the ABI specification for each architecture. I didn't do that, but I am= > sure we should pass an unsigned long instead, if that's the type > expected by the kernel. >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2IELIWGGFPQOWSMIFXLHS 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.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJQ+XQ+AAoJEKeha0olJ0Nq6T8IAKX+y8gMzqMH7gi7fjIJ09io LIBUTGBcMu8JKbaM386PURYAlJrbspW8xflV2+CcM7auRIHkRQcRF69/0ueYNbwa IRqycccQTOYTUS+ZhCdHkWqBtYow82nkEW/8/6CIWv2zCJYqkB321riIDPllrcRa E/2qzAT3ry1wxKGVHM6NTeTIta04CGRmpXnKWMVADoze+l+w6e4ed4ePcmMvdbrX iIGf/cZTg9kq8w2dmIg5edteTCjvMR5OU6U3btjlYRAntTSibahJLyNWjvdZwqqc xfTeNbGLg6QVqMbCURgb5xfjDP9aPrd1pGHSImvz+aSfQ/S0HtOBkCIfonk96VI= =aJCw -----END PGP SIGNATURE----- ------enig2IELIWGGFPQOWSMIFXLHS--