From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Blake Subject: Re: [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function Date: Fri, 18 Jan 2013 09:11:42 -0700 Message-ID: <50F9743E.2080601@redhat.com> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2IELIWGGFPQOWSMIFXLHS" Cc: Gleb Natapov , "kvm@vger.kernel.org list" , qemu-devel@nongnu.org, Anthony Liguori , Igor Mammedov , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= To: Eduardo Habkost Return-path: In-Reply-To: <20130118142013.GX10683@otherpad.lan.raisama.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org 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--