Re: [Qemu-devel] [PATCH] Initial support for Ilumos build and Illumos-kvm

2012-03-17 Thread Jan Kiszka
On 2012-03-16 14:46, Lee Essen wrote: > > On 16 Mar 2012, at 13:14, Jan Kiszka wrote: > >> On 2012-03-16 10:23, Lee Essen wrote: >>> +#ifdef __sun__ >>> +#include >>> +#else >>> #include >>> #include >>> +#endif >> >> As Paolo already said, this should somehow be centralised. > > Yep, fair po

Re: [Qemu-devel] [PATCH] Initial support for Ilumos build and Illumos-kvm

2012-03-16 Thread Paolo Bonzini
Il 16/03/2012 18:25, Lee Essen ha scritto: > Correct … but actually this raises another question … why create a separate > pointer to kvm_state… > > KVMState *s = kvm_state; > > … why not just use kvm_state throughout the function? > > This seems to be a common approach in many of the funct

Re: [Qemu-devel] [PATCH] Initial support for Ilumos build and Illumos-kvm

2012-03-16 Thread Lee Essen
On 16 Mar 2012, at 11:56, Paolo Bonzini wrote: > Il 16/03/2012 10:23, Lee Essen ha scritto: >> +while (mlock(base, (nbytes = step * ps)) == -1) { >> +if (errno != EAGAIN) { >> +return -1; >> +} >> + >> +if (waiting == 0) { >> +waiting = gethrtim

Re: [Qemu-devel] [PATCH] Initial support for Ilumos build and Illumos-kvm

2012-03-16 Thread Lee Essen
On 16 Mar 2012, at 16:28, Paolo Bonzini wrote: > Il 16/03/2012 14:46, Lee Essen ha scritto: >> It does indeed … this came from the original Joyent code, I must >> admit I did wonder whether gcc would optimise it away. I did consider >> adding something to stop gcc complaining, but I don't fully >

Re: [Qemu-devel] [PATCH] Initial support for Ilumos build and Illumos-kvm

2012-03-16 Thread Paolo Bonzini
Il 16/03/2012 14:46, Lee Essen ha scritto: > It does indeed … this came from the original Joyent code, I must > admit I did wonder whether gcc would optimise it away. I did consider > adding something to stop gcc complaining, but I don't fully > understand why this is necessary given the mlock() bi

Re: [Qemu-devel] [PATCH] Initial support for Ilumos build and Illumos-kvm

2012-03-16 Thread Lee Essen
On 16 Mar 2012, at 13:14, Jan Kiszka wrote: > On 2012-03-16 10:23, Lee Essen wrote: >> +#ifdef __sun__ >> +#include >> +#else >> #include >> #include >> +#endif > > As Paolo already said, this should somehow be centralised. Yep, fair point. I'll address this one. > Also, CONFIG_SOLARIS vs.

Re: [Qemu-devel] [PATCH] Initial support for Ilumos build and Illumos-kvm

2012-03-16 Thread Jan Kiszka
On 2012-03-16 10:23, Lee Essen wrote: > This fixes a number of issues with the build process (namely ensuring the use > of bash), adds specific support for the Illumos port of KVM and fixes a few > general Solaris compatibility issues. > > There are still some things outstanding: > > - there's

Re: [Qemu-devel] [PATCH] Initial support for Ilumos build and Illumos-kvm

2012-03-16 Thread Paolo Bonzini
Il 16/03/2012 10:23, Lee Essen ha scritto: > diff --git a/Makefile.objs b/Makefile.objs > index 226b01d..c2a440a 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -373,12 +373,12 @@ else > trace.h: trace.h-timestamp > endif > trace.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-

Re: [Qemu-devel] [PATCH] Initial support for Ilumos build and Illumos-kvm

2012-03-16 Thread Andreas Färber
Am 16.03.2012 10:23, schrieb Lee Essen: > This fixes a number of issues with the build process (namely ensuring > the use of bash), adds specific support for the Illumos port of KVM > and fixes a few general Solaris compatibility issues. > > There are still some things outstanding: > > - there's a