[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [BUGFIX][PATCH v7 1/9] vmport: The io memory region nee
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [BUGFIX][PATCH v7 1/9] vmport: The io memory region needs to be at least a size of 4 |
Date: |
Mon, 15 Jun 2015 09:09:16 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 06/15/2015 07:53 AM, Don Slutz wrote:
> On 06/12/15 18:38, Eric Blake wrote:
>>>
>>> + /* 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).
>>
>
> This is not true:
Oh, I was confusing ~0UL (where sign extension on 32- vs 64-bit matters)
and ~0U (which you used).
>
>> Why can't you just 'return -1;'?
>>
>
> 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.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH v7 2/9] vmport: Switch to trace, Don Slutz, 2015/06/12
[Qemu-devel] [BUGFIX][PATCH v7 3/9] vmport: Fix vmport_cmd_ram_size, Don Slutz, 2015/06/12
[Qemu-devel] [PATCH v7 6/9] vmport_rpc: Add QMP access to vmport_rpc object., Don Slutz, 2015/06/12
[Qemu-devel] [PATCH v7 7/9] vmport_rpc: Add migration, Don Slutz, 2015/06/12
[Qemu-devel] [PATCH v7 5/9] vmport_rpc: Add limited support of VMware's hyper-call rpc, Don Slutz, 2015/06/12
[Qemu-devel] [PATCH v7 8/9] vmport: Add VMware all ring hack, Don Slutz, 2015/06/12
[Qemu-devel] [PATCH v7 4/9] vmport_rpc: Add the object vmport_rpc, Don Slutz, 2015/06/12