On 08/06/2015 10:54 PM, Lin Ma wrote:
> 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?

You can always pass a negative number to set the highest bit (that's
what libvirt does: when it is sending a uint64 value to qemu via command
line or QMP, it intentionally writes values larger than INT64_MAX by
first casting them to signed and writing the int64_t counterpart
instead). It's a shortcoming in our data parser, and not an actual
prohibition in values you can set.  And if you don't like the behavior,
patches are welcome.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to