Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-14 Thread Michael S. Tsirkin
On Mon, Mar 13, 2017 at 11:02:01AM +0800, Peter Xu wrote: > On Sun, Mar 12, 2017 at 09:12:43PM +0200, Michael S. Tsirkin wrote: > > info mtree is doing 64 bit math to figure out > > addresses from offsets, this does not work ncorrectly > > incase of overflow. > > > > Overflow usually indicates a g

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-14 Thread Peter Xu
On Tue, Mar 14, 2017 at 11:26:19AM +0100, Paolo Bonzini wrote: > > > On 13/03/2017 04:02, Peter Xu wrote: > > On Sun, Mar 12, 2017 at 09:12:43PM +0200, Michael S. Tsirkin wrote: > >> info mtree is doing 64 bit math to figure out > >> addresses from offsets, this does not work ncorrectly > >> inca

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-14 Thread Paolo Bonzini
On 13/03/2017 04:02, Peter Xu wrote: > On Sun, Mar 12, 2017 at 09:12:43PM +0200, Michael S. Tsirkin wrote: >> info mtree is doing 64 bit math to figure out >> addresses from offsets, this does not work ncorrectly >> incase of overflow. >> >> Overflow usually indicates a guest bug, so this is unus

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-14 Thread Paolo Bonzini
On 12/03/2017 20:35, Peter Maydell wrote: >> + >> +static inline uint64_t int128_printf1(Int128 a) >> +{ >> +/* We assume 4 highest bits are clear and safe to ignore */ >> +return (int128_gethi(a) << 4) | (int128_getlo(a) >> 60); >> +} >> + >> +static inline uint64_t int128_printf2(Int128

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-12 Thread Peter Xu
On Sun, Mar 12, 2017 at 09:12:43PM +0200, Michael S. Tsirkin wrote: > info mtree is doing 64 bit math to figure out > addresses from offsets, this does not work ncorrectly > incase of overflow. > > Overflow usually indicates a guest bug, so this is unusual > but reporting correct addresses makes i

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-12 Thread Peter Maydell
On 12 March 2017 at 20:12, Michael S. Tsirkin wrote: > info mtree is doing 64 bit math to figure out > addresses from offsets, this does not work ncorrectly > incase of overflow. > > Overflow usually indicates a guest bug, so this is unusual > but reporting correct addresses makes it easier to dis

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-12 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree Message-id: 1489345956-29167-1-git-send-email-...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total

[Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-12 Thread Michael S. Tsirkin
info mtree is doing 64 bit math to figure out addresses from offsets, this does not work ncorrectly incase of overflow. Overflow usually indicates a guest bug, so this is unusual but reporting correct addresses makes it easier to discover what is going on. Reported-by: Mark Cave-Ayland Cc: Paolo