Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 16:49, Ingo Molnar wrote: > > * Matt Evans wrote: > >> Since tools/kvm/include/linux/types.h only requires __u32, >> __u64 et al from , wouldn't it be most >> straightforward to just #include ? >> This avoids #define __KERNEL__ breaking other includes brought >> into userland, a

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans wrote: > Since tools/kvm/include/linux/types.h only requires __u32, > __u64 et al from , wouldn't it be most > straightforward to just #include ? > This avoids #define __KERNEL__ breaking other includes brought > into userland, avoids changing system headers/distros, and > inc

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 15:56, Matt Evans wrote: > On 08/12/11 15:49, Ingo Molnar wrote: >> >> * Matt Evans wrote: >> >>> On 08/12/11 04:14, Pekka Enberg wrote: On Wed, 7 Dec 2011, Ingo Molnar wrote: > > * Matt Evans wrote: > [...] I haven't looked closely at Matt's p

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 15:49, Ingo Molnar wrote: > > * Matt Evans wrote: > >> On 08/12/11 04:14, Pekka Enberg wrote: >>> On Wed, 7 Dec 2011, Ingo Molnar wrote: >>> * Matt Evans wrote: >>> [...] I haven't looked closely at Matt's >>> patches, but it should be possible to use [un]sig

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans wrote: > On 08/12/11 04:14, Pekka Enberg wrote: > > On Wed, 7 Dec 2011, Ingo Molnar wrote: > > > >> > >> * Matt Evans wrote: > >> > > [...] I haven't looked closely at Matt's > > patches, but it should be possible to use [un]signed long long > > for the u64/s64 types,

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 04:14, Pekka Enberg wrote: > On Wed, 7 Dec 2011, Ingo Molnar wrote: > >> >> * Matt Evans wrote: >> > [...] I haven't looked closely at Matt's > patches, but it should be possible to use [un]signed long long > for the u64/s64 types, I would think. In tools/kvm/ w

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Pekka Enberg
On 12/07/2011 09:16 AM, Ingo Molnar wrote: > That's what's happening here; we're __powerpc64__ and > !__KERNEL__, tools/kvm/include/linux/types.h includes > asm/types.h so gets the int-l64.h definition of __u64, as > above. :/ > > builtin-run.c:389: error: format `%llx' expects type `long >

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Pekka Enberg
On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed long long for the u64/s64 types, I would think. In tools/kvm/ we are using our own u64/s64 definitions, not glibc's, so i think it shoul

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Paolo Bonzini
On 12/07/2011 09:16 AM, Ingo Molnar wrote: > That's what's happening here; we're __powerpc64__ and > !__KERNEL__, tools/kvm/include/linux/types.h includes > asm/types.h so gets the int-l64.h definition of __u64, as > above. :/ > > builtin-run.c:389: error: format `%llx' expects type `long >

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans wrote: > >> [...] I haven't looked closely at Matt's > >> patches, but it should be possible to use [un]signed long long > >> for the u64/s64 types, I would think. > > > > In tools/kvm/ we are using our own u64/s64 definitions, not > > glibc's, so i think it should be fine - as

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-06 Thread Matt Evans
Hi Ingo, On 06/12/11 21:24, Ingo Molnar wrote: > > * Paul Mackerras wrote: > >> On Tue, Dec 06, 2011 at 09:28:27AM +0100, Ingo Molnar wrote: >>> >>> * Sasha Levin wrote: >>> Ingo actually got us to remove all the PRI* specifiers, but that was back when we only did x86 :)

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-06 Thread Ingo Molnar
* Paul Mackerras wrote: > On Tue, Dec 06, 2011 at 09:28:27AM +0100, Ingo Molnar wrote: > > > > * Sasha Levin wrote: > > > > > Ingo actually got us to remove all the PRI* specifiers, but > > > that was back when we only did x86 :) > > > > > > Ingo, does it make sense to use them now when we

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-06 Thread Paul Mackerras
On Tue, Dec 06, 2011 at 09:28:27AM +0100, Ingo Molnar wrote: > > * Sasha Levin wrote: > > > Ingo actually got us to remove all the PRI* specifiers, but > > that was back when we only did x86 :) > > > > Ingo, does it make sense to use them now when we support > > different architectures? > >

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-06 Thread Ingo Molnar
* Sasha Levin wrote: > Ingo actually got us to remove all the PRI* specifiers, but > that was back when we only did x86 :) > > Ingo, does it make sense to use them now when we support > different architectures? Not at all - ppc should use a sane u64/s64 definition, i.e. int-ll64.h instead o

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-06 Thread Sasha Levin
Ingo actually got us to remove all the PRI* specifiers, but that was back when we only did x86 :) Ingo, does it make sense to use them now when we support different architectures? On Tue, 2011-12-06 at 14:38 +1100, Matt Evans wrote: > On LP64 systems our u64s are just longs; remove the %llx'es in

[PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-05 Thread Matt Evans
On LP64 systems our u64s are just longs; remove the %llx'es in favour of PRIx64 etc. This patch also adds CFLAGS to the final link, so that any -m64 is obeyed when linking, too. Signed-off-by: Matt Evans --- tools/kvm/Makefile |2 +- tools/kvm/builtin-run.c | 14 -- too