From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNZhE-0005AY-A2 for qemu-devel@nongnu.org; Fri, 07 Aug 2015 00:55:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNZhB-0006xm-4O for qemu-devel@nongnu.org; Fri, 07 Aug 2015 00:55:56 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:33049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNZhA-0006v7-Tn for qemu-devel@nongnu.org; Fri, 07 Aug 2015 00:55:53 -0400 Message-ID: <55C43A0D.9070000@suse.com> Date: Fri, 07 Aug 2015 12:54:37 +0800 From: Lin Ma MIME-Version: 1.0 References: <55BB319A.2010906@suse.com> In-Reply-To: <55BB319A.2010906@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] The issue about parameters(uint64) of a device are treated as signed long int. Reply-To: lma@suse.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "pbonzini@redhat.com >> Paolo Bonzini" Cc: "qemu-devel@nongnu.org Developers" Hi Paolo, As mentioned in below email, The type of wwn is reported as uint64, But in qemu command line, The max valid value for wwn is 0x7fffffffffffffff. Obviously, it's treated as int64 there. I'd like to know that does the highest bit of _world wide name_ have special meaning and must be zero? May I have your thoughts? Thanks, Lin 在 2015年07月31日 16:28, Lin Ma 写道: > Hi all, > > Because qemu uses strtoll to parse string in parse_str function of > qapi/string-input-visitor.c, I'd like to know why the parameters of > scsi-hd device which are specified as uint64(says wwn) are getting > interpreted as signed long int's instead > > e.g: > # qemu-system-x86_64 -device scsi-hd,? > ...... > scsi-hd.wwn=uint64 > ...... > > Does the highest bit of wwn value have special meaning and it must be > a zero? > > Thanks in advance, > Lin