Re: [Qemu-devel] [PATCH] osdep: Fix ROUND_UP(64-bit, 32-bit)

2017-09-14 Thread Eric Blake
On 09/14/2017 03:44 AM, Laszlo Ersek wrote: > On 09/13/17 23:03, Eric Blake wrote: >> When using bit-wise operations that exploit the power-of-two >> nature of the second argument of ROUND_UP(), we still need to >> ensure that the mask is as wide as the first argument (done >> by using addition of

Re: [Qemu-devel] [PATCH] osdep: Fix ROUND_UP(64-bit, 32-bit)

2017-09-14 Thread Laszlo Ersek
On 09/13/17 23:03, Eric Blake wrote: > When using bit-wise operations that exploit the power-of-two > nature of the second argument of ROUND_UP(), we still need to > ensure that the mask is as wide as the first argument (done > by using addition of 0 to force proper arithmetic promotion). > Unpatch

Re: [Qemu-devel] [PATCH] osdep: Fix ROUND_UP(64-bit, 32-bit)

2017-09-13 Thread Paolo Bonzini
On 13/09/2017 23:03, Eric Blake wrote: > When using bit-wise operations that exploit the power-of-two > nature of the second argument of ROUND_UP(), we still need to > ensure that the mask is as wide as the first argument (done > by using addition of 0 to force proper arithmetic promotion). > Unpat

[Qemu-devel] [PATCH] osdep: Fix ROUND_UP(64-bit, 32-bit)

2017-09-13 Thread Eric Blake
When using bit-wise operations that exploit the power-of-two nature of the second argument of ROUND_UP(), we still need to ensure that the mask is as wide as the first argument (done by using addition of 0 to force proper arithmetic promotion). Unpatched, ROUND_UP(2ULL*1024*1024*1024*1024, 512) pro