[Qemu-devel] [PATCH 2/2] Don't zero out buffer in sched_getaffinity

2011-04-18 Thread Mike McCormack
The kernel doesn't fill the buffer provided to sched_getaffinity with zero bytes, so neither should QEMU. Signed-off-by: Mike McCormack Reviewed-by: Stefan Hajnoczi --- linux-user/syscall.c | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/linux-user/syscall.

[Qemu-devel] [PATCH 1/2] Fix buffer overrun in sched_getaffinity

2011-04-18 Thread Mike McCormack
Zeroing of the cpu array should start from &cpus[kernel_ret] not &cpus[num_zeros_to_fill]. This fixes a crash in EFL's edje_cc running under qemu-arm. Signed-off-by: Mike McCormack Reviewed-by: Stefan Hajnoczi Acked-by: Mike Frysinger --- linux-user/syscall.c |2 +- 1 files changed, 1 ins

[Qemu-devel] [PATCH] virtio-serial: Fix endianness bug in the config space

2011-04-18 Thread David Gibson
From: Alexey Kardashevskiy The virtio serial specification requres that the values in the config space are encoded in native endian of the guest. The qemu virtio-serial code did not do conversion to the guest endian format what caused problems when host and guest use different format. This patc

[Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256

2011-04-18 Thread David Gibson
From: Anton Blanchard The original pSeries machine was limited to 32 CPUs, more or less arbitrarily. Particularly when we get SMT KVM guests it will be pretty easy to exceed this. Therefore, raise the max number of CPUs in a pseries machine guest to 256. Signed-off-by: Anton Blanchard Signed-

[Qemu-devel] [PATCH 3/3] Place pseries vty devices at addresses more similar to existing machines

2011-04-18 Thread David Gibson
Currently the qemu pseries machine numbers its virtual serial devices from 0. However, existing pSeries machines running pHyp number them from 0x3000. In theory these indices are arbitrary, since everything necessary for the kernel to find them is advertised in the device tree. However the d

[Qemu-devel] [PATCH 2/3] Make pSeries 'model' property more closely resemble real hardware

2011-04-18 Thread David Gibson
Currently, the qemu emulated pseries machine puts "qemu,emulated-pSeries-LPAR" in the device tree's root level 'model' property. Unfortunately this confuses some installers and ybin, which expect this to start with "IBM" on pSeries machines. This patch addresses this problem, making the property

[Qemu-devel] [0/3] More pSeries machine tweaks

2011-04-18 Thread David Gibson
Hi Alex, Here are several more minor tweaks/improvements to the pseries machine emulation.

Re: [Qemu-devel] [PATCH 1/2] KVM: PPC: booke: save/restore VRSAVE (a.k.a. USPRG0)

2011-04-18 Thread Scott Wood
On Mon, Apr 18, 2011 at 05:25:48PM -0500, Scott Wood wrote: > Linux doesn't use USPRG0 (now renamed VRSAVE in the architecture, even > when Altivec isn't involved), but a guest might. > > Signed-off-by: Scott Wood > --- > arch/powerpc/include/asm/kvm_host.h |1 + > arch/powerpc/kernel/asm-of

[Qemu-devel] [PATCH 2/2] KVM: PPC: booke: add sregs support

2011-04-18 Thread Scott Wood
Signed-off-by: Scott Wood --- Documentation/kvm/api.txt |6 +- arch/powerpc/include/asm/kvm.h | 184 +++ arch/powerpc/include/asm/kvm_44x.h |1 - arch/powerpc/include/asm/kvm_e500.h |1 + arch/powerpc/include/asm/kvm_host.h |3 + ar

[Qemu-devel] [PATCH 1/2] KVM: PPC: booke: save/restore VRSAVE (a.k.a. USPRG0)

2011-04-18 Thread Scott Wood
Linux doesn't use USPRG0 (now renamed VRSAVE in the architecture, even when Altivec isn't involved), but a guest might. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/kvm_host.h |1 + arch/powerpc/kernel/asm-offsets.c |1 + arch/powerpc/kvm/booke_interrupts.S |5 - 3 fi

Re: [Qemu-devel] [PATCH] target-ppc: use softfloat min/max functions

2011-04-18 Thread Alexander Graf
On 18.04.2011, at 21:23, Aurelien Jarno wrote: > Use the new softfloat float32_min() and float32_max() to implement the > vminfp and vmaxfp instructions. > > Cc: Alexander Graf > Signed-off-by: Aurelien Jarno > --- > target-ppc/op_helper.c | 16 +--- > 1 files changed, 5 insertion

Re: [Qemu-devel] [PATCH 03/17] linux-user: define a couple of syscalls for non-uid16 targets

2011-04-18 Thread Alexander Graf
On 18.04.2011, at 18:32, Riku Voipio wrote: > On Fri, Apr 15, 2011 at 05:32:44PM +0200, Alexander Graf wrote: >> From: Ulrich Hecht >> >> Quite a number of syscalls are only defined on systems with USE_UID16 >> defined; this patch defines them on other systems as well. >> >> Fixes a large numb

[Qemu-devel] [PATCH] multiboot: Support commas in module parameters

2011-04-18 Thread Adam Lackorzynski
Support commas in the parameter list of modules, by using double commas (via get_opt_value()). Signed-off-by: Adam Lackorzynski --- hw/multiboot.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/multiboot.c b/hw/multiboot.c index 394ed01..7d5cb22 1006

[Qemu-devel] [PATCH 14/20] target-i386: fix helper_fsqrt() wrt softfloat

2011-04-18 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target-i386/exec.h |4 target-i386/op_helper.c |7 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/target-i386/exec.h b/target-i386/exec.h index b2af894..292e0de 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@

Re: [Qemu-devel] [PATCH 10/17] s390x: keep hint on virtio managing size

2011-04-18 Thread Alexander Graf
On 18.04.2011, at 21:06, Aurelien Jarno wrote: > On Fri, Apr 15, 2011 at 05:32:51PM +0200, Alexander Graf wrote: >> The s390x virtio bus keeps management information on virtio after the top >> of the guest's RAM. We need to be able to tell the guest the size of its >> RAM (without virtio stuff),

[Qemu-devel] [PATCH 19/20] target-i386: fix constants wrt softfloat

2011-04-18 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target-i386/exec.h |8 target-i386/op_helper.c | 24 +--- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/target-i386/exec.h b/target-i386/exec.h index 292e0de..ee36a71 100644 --- a/target-i386/exec.h +++ b/

[Qemu-devel] [PATCH 17/20] target-i386: fix logarithmic and trigonometric helpers wrt softfloat

2011-04-18 Thread Aurelien Jarno
Use the new CPU86_LDouble <-> double conversion functions to make logarithmic and trigonometric helpers working with softfloat. Signed-off-by: Aurelien Jarno --- target-i386/op_helper.c | 52 +++--- 1 files changed, 26 insertions(+), 26 deletions(-) dif

[Qemu-devel] [PATCH 20/20] target-i386: switch to softfloat

2011-04-18 Thread Aurelien Jarno
This increase the correctness (precision, NaN values, corner cases) on non-x86 machines, and add the possibility to handle the exception correctly. Signed-off-by: Aurelien Jarno --- configure |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/configure b/configure index d

[Qemu-devel] [PATCH 18/20] target-i386: fix helper_fprem() and helper_fprem1() wrt softfloat

2011-04-18 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target-i386/op_helper.c | 48 +++--- 1 files changed, 28 insertions(+), 20 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index 4671a96..0c4f0da 100644 --- a/target-i386/op_helper.c +++ b/tar

[Qemu-devel] [PATCH 15/20] target-i386: replace approx_rsqrt and approx_rcp by softfloat ops

2011-04-18 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target-i386/op_helper.c | 10 -- target-i386/ops_sse.h | 36 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index d935488..9628d27 100644 --- a/

[Qemu-devel] [PATCH 06/20] softfloat: add floatx80_compare*() functions

2011-04-18 Thread Aurelien Jarno
Add floatx80_compare() and floatx80_compare_quiet() functions to match the softfloat-native ones. Signed-off-by: Aurelien Jarno --- fpu/softfloat.c | 46 ++ fpu/softfloat.h |2 ++ 2 files changed, 48 insertions(+), 0 deletions(-) diff --git a/fp

[Qemu-devel] [PATCH 10/20] target-i386: fix helper_fscale() wrt softfloat

2011-04-18 Thread Aurelien Jarno
Use the scalbn softfloat function to implement helper_fscale(). This fixes corner cases (e.g. NaN) and makes a few more GNU libc math tests to pass. Signed-off-by: Aurelien Jarno --- target-i386/exec.h |4 target-i386/op_helper.c |7 ++- 2 files changed, 10 insertions(+), 1

[Qemu-devel] [PATCH 08/20] softfloat-native: fix float*_scalbn() functions

2011-04-18 Thread Aurelien Jarno
float*_scalbn() should be able to take a status parameter. Fix that. Signed-off-by: Aurelien Jarno --- fpu/softfloat-native.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fpu/softfloat-native.h b/fpu/softfloat-native.h index 97fb3c7..f497e64 100644 --- a/fpu/soft

[Qemu-devel] [PATCH 04/20] softfloat: add pi constants

2011-04-18 Thread Aurelien Jarno
Add a pi constant for float32, float64, floatx80. It will be used by target-i386 and later by the trigonometric functions. Signed-off-by: Aurelien Jarno --- fpu/softfloat.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fpu/softfloat.h b/fpu/softfloat.h index 90e0c41.

[Qemu-devel] [PATCH 16/20] target-i386: add CPU86_LDouble <-> double conversion functions

2011-04-18 Thread Aurelien Jarno
Add functions to convert CPU86_LDouble to double and vice versa. They are going to be used to implement logarithmic and trigonometric function until softfloat implement them. Signed-off-by: Aurelien Jarno --- target-i386/op_helper.c | 22 ++ 1 files changed, 22 insertions(+

[Qemu-devel] [PATCH 12/20] target-i386: fix helper_fxtract() wrt softfloat

2011-04-18 Thread Aurelien Jarno
With softfloat it's not possible to play with the overflow of an unsigned value to get the 0 case partially correct. Use a special case for that. Using a division to generate an infinity is the easiest way that works for both softfloat and softfloat-native. Signed-off-by: Aurelien Jarno --- targ

[Qemu-devel] [PATCH 07/20] softfloat: fix float*_scalnb() corner cases

2011-04-18 Thread Aurelien Jarno
float*_scalnb() were not taking into account all cases. This patch fixes some corner cases: - NaN values in input were not properly propagated and the invalid flag not correctly raised. Use propagateFloat*NaN() for that. - NaN or infinite values in input of floatx80_scalnb() were not correctly

[Qemu-devel] [PATCH 09/20] softfloat-native: add float*_is_any_nan() functions

2011-04-18 Thread Aurelien Jarno
Add float*_is_any_nan() functions to match the softfloat API. Signed-off-by: Aurelien Jarno --- fpu/softfloat-native.c | 26 ++ fpu/softfloat-native.h |3 +++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/fpu/softfloat-native.c b/fpu/softfloat-nati

[Qemu-devel] [PATCH 05/20] softfloat-native: add a few constant values

2011-04-18 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- fpu/softfloat-native.h | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/fpu/softfloat-native.h b/fpu/softfloat-native.h index ea7a15e..97fb3c7 100644 --- a/fpu/softfloat-native.h +++ b/fpu/softfloat-native.h @@ -

[Qemu-devel] [PATCH 01/20] softfloat: fix floatx80 handling of NaN

2011-04-18 Thread Aurelien Jarno
The floatx80 format uses an explicit bit that should be taken into account when converting to and from commonNaN format. When converting to commonNaN, the explicit bit should be removed if it is a 1, and a default NaN should be used if it is 0. When converting from commonNan, the explicit bit sho

[Qemu-devel] [PATCH 00/20] target-i386 conversion to softfloat

2011-04-18 Thread Aurelien Jarno
The i386 target is the last one still using softfloat-native. Compared to softfloat, it is faster but lacks exception handling, float80 (except on x86 hosts) and float128, as well as correctness (use NaN propagation from the host, different corner cases, etc.). It's API has also diverged from so

[Qemu-devel] [PATCH 13/20] target-i386: fix helper_fdiv() wrt softfloat

2011-04-18 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target-i386/exec.h |4 target-i386/op_helper.c |5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/target-i386/exec.h b/target-i386/exec.h index 211cc8c..b2af894 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -1

[Qemu-devel] [PATCH 03/20] softfloat: add floatx80 constants

2011-04-18 Thread Aurelien Jarno
Add floatx80 constants similarly to float32 or float64. Signed-off-by: Aurelien Jarno --- fpu/softfloat.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fpu/softfloat.h b/fpu/softfloat.h index 3363128..90e0c41 100644 --- a/fpu/softfloat.h +++ b/fpu/softfloat.h @@

[Qemu-devel] [PATCH 11/20] target-i386: fix helper_flbd_ST0() wrt softfloat

2011-04-18 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target-i386/op_helper.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index f614893..737 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -3920,9 +3920,10

[Qemu-devel] [PATCH 02/20] softfloat: fix floatx80_is_infinity()

2011-04-18 Thread Aurelien Jarno
With floatx80, the explicit bit is set for infinity. Signed-off-by: Aurelien Jarno --- fpu/softfloat.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fpu/softfloat.h b/fpu/softfloat.h index 340f0a9..3363128 100644 --- a/fpu/softfloat.h +++ b/fpu/softfloat.h @@ -566,7 +

Re: [Qemu-devel] [PATCH v2 0/3] pc-bios: Use iPXE ROMs

2011-04-18 Thread Stefan Weil
Am 18.04.2011 19:34, schrieb Anthony Liguori: On 04/18/2011 12:25 PM, Alex Williamson wrote: On Mon, 2011-04-11 at 13:57 -0600, Alex Williamson wrote: On Mon, 2011-04-11 at 14:48 -0500, Anthony Liguori wrote: On 04/11/2011 02:35 PM, Alex Williamson wrote: This series replaces our current gPXE

Re: [Qemu-devel] [PATCH] target-ppc: use softfloat min/max functions

2011-04-18 Thread Peter Maydell
On 18 April 2011 20:23, Aurelien Jarno wrote: > diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c > index 9aa108e..9058d78 100644 > --- a/target-ppc/op_helper.c > +++ b/target-ppc/op_helper.c > @@ -2369,22 +2369,16 @@ VMINMAX(uw, u32) >  #undef VMINMAX_DO >  #undef VMINMAX > > -#define

[Qemu-devel] [PATCH] target-ppc: use softfloat min/max functions

2011-04-18 Thread Aurelien Jarno
Use the new softfloat float32_min() and float32_max() to implement the vminfp and vmaxfp instructions. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/op_helper.c | 16 +--- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/target-ppc/op_helper.c b/ta

Re: [Qemu-devel] [PATCH 2/4] [arm] move helpers.h to helper.h

2011-04-18 Thread Aurelien Jarno
On Wed, Apr 13, 2011 at 06:38:24PM +0200, Lluís wrote: > This provides a consistent naming scheme across all targets. > > Signed-off-by: Lluís Vilanova > --- > target-arm/helper.c|2 > target-arm/helper.h| 475 > > target-arm/he

Re: [Qemu-devel] [PATCH] libcacard: fix opposite usage of isspace

2011-04-18 Thread Aurelien Jarno
On Wed, Apr 13, 2011 at 02:42:00PM +0300, Alon Levy wrote: > Signed-off-by: Alon Levy > --- > libcacard/vcard_emul_nss.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) Thanks, applied. > diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c > index 71f2ba3..baada

Re: [Qemu-devel] [PATCH 10/17] s390x: keep hint on virtio managing size

2011-04-18 Thread Aurelien Jarno
On Fri, Apr 15, 2011 at 05:32:51PM +0200, Alexander Graf wrote: > The s390x virtio bus keeps management information on virtio after the top > of the guest's RAM. We need to be able to tell the guest the size of its > RAM (without virtio stuff), but also be able to trap when the guest accesses > RAM

Re: [Qemu-devel] [PATCH 09/17] s390x: virtio machine storage keys

2011-04-18 Thread Aurelien Jarno
On Fri, Apr 15, 2011 at 05:32:50PM +0200, Alexander Graf wrote: > For emulation (and migration) we need to know about the guest's storage keys. > These are separate from actual RAM contents, so we need to allocate them in > parallel to RAM. > > While touching the file, this patch also adjusts the

Re: [Qemu-devel] [PATCH 08/17] s390x: Dispatch interrupts to KVM or the real CPU

2011-04-18 Thread Aurelien Jarno
On Fri, Apr 15, 2011 at 05:32:49PM +0200, Alexander Graf wrote: > The KVM interrupt injection path is non-generic for now. So we need to push > knowledge of how to inject a device interrupt using KVM into the actual device > code. > > Signed-off-by: Alexander Graf > --- > hw/s390-virtio-bus.c |

Re: [Qemu-devel] [PATCH 07/17] s390x: Enable s390x-softmmu target

2011-04-18 Thread Aurelien Jarno
On Fri, Apr 15, 2011 at 05:32:48PM +0200, Alexander Graf wrote: > This patch adds some code paths for running s390x guest OSs without the > need for KVM. > > Signed-off-by: Alexander Graf > > --- > > v3 -> v4: > > - declare non-working when EXT is masked > - remove obsolete cpu_halted > --

Re: [Qemu-devel] [PATCH 06/17] s390x: Prepare cpu.h for emulation

2011-04-18 Thread Aurelien Jarno
On Fri, Apr 15, 2011 at 05:32:47PM +0200, Alexander Graf wrote: > We need to add some more logic to the CPU description to leverage emulation > of an s390x CPU. This patch adds all the required helpers, fields in CPUState > and constant definitions required for user and system emulation. > > Signe

Re: [Qemu-devel] [PATCH 01/17] tcg: extend max tcg opcodes on 32bit

2011-04-18 Thread Aurelien Jarno
On Fri, Apr 15, 2011 at 05:32:42PM +0200, Alexander Graf wrote: > When running on a 32 bit host, we tend to use more TCG ops than on > a 64 bit host. Reflect that in the reserved opcode amount constant. > > Signed-off-by: Alexander Graf > --- > exec-all.h |4 > 1 files changed, 4 insert

Re: [Qemu-devel] [PATCH 05/17] kvm: add kvm stub for arch specific stuff

2011-04-18 Thread Aurelien Jarno
On Fri, Apr 15, 2011 at 05:32:46PM +0200, Alexander Graf wrote: > We have a generic stub architecture for kvm calls, but some architectures > are different from others. So we do want to be able to have stubs for > architecture specific functionality as well. > > This patch adds kvm stubs for all a

[Qemu-devel] [PATCH 0/2] target-arm: Handle UNDEF cases for Neon load/stores

2011-04-18 Thread Peter Maydell
These two simple patches make qemu correctly UNDEF where required in the Neon load/store space. We also catch and UNDEF on an UNPREDICTABLE rather than indexing off the end of the register file. Tested in the usual way with random instruction sequences. Peter Maydell (2): target-arm: Handle UND

[Qemu-devel] [PATCH 2/2] target-arm: Handle UNDEF cases for Neon VLD/VST multiple-structures

2011-04-18 Thread Peter Maydell
Correctly UNDEF for Neon VLD/VST "multiple structures" forms where the align field is not valid. Signed-off-by: Peter Maydell --- target-arm/translate.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 5

[Qemu-devel] [PATCH 1/2] target-arm: Handle UNDEFs for Neon single element load/stores

2011-04-18 Thread Peter Maydell
Handle the UNDEF and UNPREDICTABLE cases for Neon "single element to one lane" VLD and "single element from one lane" VST. Signed-off-by: Peter Maydell --- target-arm/translate.c | 34 ++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/target-arm

Re: [Qemu-devel] [PATCH 1/2] Implement basic part of SA-1110/SA-1100

2011-04-18 Thread Aurelien Jarno
On Thu, Apr 14, 2011 at 10:18:02AM +0400, Dmitry Eremin-Solenikov wrote: > Basic implementation of DEC/Intel SA-1100/SA-1110 chips emulation. > Implemented: > - IRQs > - GPIO > - PPC > - RTC > - UARTs (no IrDA/etc.) > - OST reused from pxa25x > > Everything else is TODO (esp. PM/idle/sleep!)

Re: [Qemu-devel] [PATCH v2 0/3] pc-bios: Use iPXE ROMs

2011-04-18 Thread Anthony Liguori
On 04/18/2011 12:25 PM, Alex Williamson wrote: > On Mon, 2011-04-11 at 13:57 -0600, Alex Williamson wrote: >> On Mon, 2011-04-11 at 14:48 -0500, Anthony Liguori wrote: >>> On 04/11/2011 02:35 PM, Alex Williamson wrote: This series replaces our current gPXE based PXE ROMs with iPXE version

[Qemu-devel] [PATCH 6/6] linux-user: untie syscalls from UID16

2011-04-18 Thread Riku Voipio
Quite a number of uid/gid related syscalls are only defined on systems with USE_UID16 defined. This is apperently based on the idea that these system calls would never be called on non-UID16 systems. Make these syscalls available for all architectures that define them. drop alpha hack to support s

[Qemu-devel] [PATCH 3/6] linux-user: convert ioctl(SIOCGIFCONF, ...) result.

2011-04-18 Thread Riku Voipio
From: Laurent Vivier The result needs to be converted as it is stored in an array of struct ifreq and sizeof(struct ifreq) differs according to target and host alignment rules. This patch allows to execute correctly the following program on arm and m68k: #include #include #include #inclu

[Qemu-devel] [PATCH 5/6] linux-user: add s390x to llseek list

2011-04-18 Thread Riku Voipio
From: Alexander Graf We keep a list of host architectures that do llseek with the same syscall as lseek. S390x is one of them, so let's add it to the list. Original-patch-by: Ulrich Hecht Signed-off-by: Alexander Graf Signed-off-by: Riku Voipio --- linux-user/syscall.c |3 ++- 1 files ch

[Qemu-devel] [PATCH 4/6] linux-user: add ioctl(SIOCGIWNAME, ...) support.

2011-04-18 Thread Riku Voipio
From: Laurent Vivier Allow to run properly following program from linux-user: /* cc -o wifi wifi.c */ #include #include #include #include #include #include #include #include int main(int argc, char **argv) { int ret; struct ifreq req; struct sockaddr_in *addr; i

[Qemu-devel] [PATCH 2/6] linux-user: improve traces

2011-04-18 Thread Riku Voipio
From: Laurent Vivier Add trace details for getpid(), kill(), _llseek(), rt_sigaction(), rt_sigprocmask(), clone(). Signed-off-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/strace.c| 161 linux-user/strace.list | 12 ++-- 2

[Qemu-devel] [PATCH 1/6] [v2] linux-user: bigger default stack

2011-04-18 Thread Riku Voipio
From: Riku Voipio PTHREAD_STACK_MIN (16KB) is somewhat inadequate for a new stack for new QEMU threads. Set new limit to 256K which should be enough, yet doesn't increase memory pressure significantly. Signed-off-by: Riku Voipio Reviewed-by: Nathan Froyd --- linux-user/syscall.c |7 ++

[Qemu-devel] [PATCH 0/6] linux-user: pending patches

2011-04-18 Thread Riku Voipio
Apart from the last patch, all patches have been seen on the list. If no problems are found in reviews, I'll send these as the next pull request. Changes can also be pulled by git from: git://gitorious.org/qemu-maemo/qemu.git linux-user-for-upstream notice that linux-user git will move soon t

Re: [Qemu-devel] [PATCH 2/2] Remove unused function parameter from cpu_restore_state

2011-04-18 Thread Peter Maydell
On 18 April 2011 17:39, Stefan Weil wrote: > The previous patch removed the need for parameter puc. > Is is now unused, so remove it. Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH v2 0/3] pc-bios: Use iPXE ROMs

2011-04-18 Thread Alex Williamson
On Mon, 2011-04-11 at 13:57 -0600, Alex Williamson wrote: > On Mon, 2011-04-11 at 14:48 -0500, Anthony Liguori wrote: > > On 04/11/2011 02:35 PM, Alex Williamson wrote: > > > This series replaces our current gPXE based PXE ROMs with iPXE > > > versions from the iPXE project (http://ipxe.org). This

Re: [Qemu-devel] [PATCH 1/2] Remove unused function parameters from gen_pc_load and rename the function

2011-04-18 Thread Peter Maydell
On 18 April 2011 17:39, Stefan Weil wrote: > Function gen_pc_load was introduced in commit > d2856f1ad4c259e5766847c49acbb4e390731bd4. > The only reason for parameter searched_pc was > a debug statement in target-i386/translate.c. > > Parameter puc was needed by target-sparc until > commit d2856f1

Re: [Qemu-devel] [PULL] Migration of misc devices

2011-04-18 Thread Juan Quintela
Anthony Liguori wrote: > On 04/17/2011 03:08 PM, Juan Quintela wrote: >> >> >> The following changes since commit a0102082de4026833afbd2525e8a6320d1f92885: >> >> usb: fix spelling errors in usb-linux.c (2011-04-16 12:24:28 +0100) >> >> are available in the git repository at: >> git://repo.

[Qemu-devel] [PATCH 2/2] Remove unused function parameter from cpu_restore_state

2011-04-18 Thread Stefan Weil
The previous patch removed the need for parameter puc. Is is now unused, so remove it. Cc: Aurelien Jarno Signed-off-by: Stefan Weil --- cpu-exec.c|2 +- exec-all.h|3 +-- exec.c|9 - target-alpha/op_helper.c

[Qemu-devel] [PATCH 1/2] Remove unused function parameters from gen_pc_load and rename the function

2011-04-18 Thread Stefan Weil
Function gen_pc_load was introduced in commit d2856f1ad4c259e5766847c49acbb4e390731bd4. The only reason for parameter searched_pc was a debug statement in target-i386/translate.c. Parameter puc was needed by target-sparc until commit d2856f1ad4c259e5766847c49acbb4e390731bd4. Remove searched_pc fr

Re: [Qemu-devel] [PATCH] Remove unneeded function parameter from gen_pc_load

2011-04-18 Thread Stefan Weil
Am 17.04.2011 23:43, schrieb Aurelien Jarno: On Sun, Apr 17, 2011 at 10:34:47PM +0100, Peter Maydell wrote: On 17 April 2011 22:07, Stefan Weil wrote: Am 17.04.2011 20:27, schrieb Aurelien Jarno: On Thu, Apr 14, 2011 at 08:50:00PM +0200, Stefan Weil wrote: Am 13.04.2011 23:05, schrieb Pete

Re: [Qemu-devel] [PATCH 03/17] linux-user: define a couple of syscalls for non-uid16 targets

2011-04-18 Thread Riku Voipio
On Fri, Apr 15, 2011 at 05:32:44PM +0200, Alexander Graf wrote: > From: Ulrich Hecht > > Quite a number of syscalls are only defined on systems with USE_UID16 > defined; this patch defines them on other systems as well. > > Fixes a large number of uid/gid-related testcases on the s390x target >

Re: [Qemu-devel] [PATCH] acpi_piix4: fix save/load of PIIX4PMState

2011-04-18 Thread Juan Quintela
Isaku Yamahata wrote: > It's vmstate parameter was wrong. This patch fixes it. > > Reported-by: Avi Kivity > Signed-off-by: Isaku Yamahata > --- > hw/acpi_piix4.c |3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c > index 96f5222..3

Re: [Qemu-devel] iPXE/Etherboot prompts twice for booting?

2011-04-18 Thread Alex Williamson
On Mon, 2011-04-18 at 10:45 +0100, Stefan Hajnoczi wrote: > On Sat, Apr 16, 2011 at 8:41 PM, Michael Tokarev wrote: > > I'm playing with iPXE ROM images again, and see > > iPXE prompts two times during bootup. Once like > > this: "Press Ctrl-B to configure", at early stage, > > even if -boot n is

Re: [Qemu-devel] [RFC PATCH] implement vmware pvscsi device

2011-04-18 Thread Paolo Bonzini
On 04/18/2011 04:05 PM, Hannes Reinecke wrote: My proposal would be to implement a full virtio-scsi _host_, and extend the proposal to be able to handle the transport layer too. Yes, I have added this independently from Friday to today, and it is why I haven't sent the proposal yet. At the

[Qemu-devel] [Bug 656285] Re: arm-semi mishandling SYS_HEAPINFO

2011-04-18 Thread Peter Maydell
I've just submitted a patchset which I think fixes this bug (among others): http://patchwork.ozlabs.org/patch/91789/ [1/3] linux-user: Don't use MAP_FIXED in do_brk() http://patchwork.ozlabs.org/patch/91790/ [2/3] arm-semi.c: Use correct check for failure of do_brk() http://patchwork.ozlabs.org/

Re: [Qemu-devel] [PULL] Migration of misc devices

2011-04-18 Thread Jan Kiszka
On 2011-04-18 17:44, Anthony Liguori wrote: > On 04/18/2011 10:36 AM, Jan Kiszka wrote: >> On 2011-04-18 17:12, Anthony Liguori wrote: >>> On 04/17/2011 03:08 PM, Juan Quintela wrote: The following changes since commit a0102082de4026833afbd2525e8a6320d1f92885: usb:

[Qemu-devel] [PATCH 3/3] m68k-semi.c: Use correct check for failure of do_brk()

2011-04-18 Thread Peter Maydell
In the m68k semihosting implementation of HOSTED_INIT_SIM, use the correct check for whether do_brk() has failed -- it does not return -1 but the previous value of the break limit. Signed-off-by: Peter Maydell --- m68k-semi.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -

Re: [Qemu-devel] [PULL] Migration of misc devices

2011-04-18 Thread Anthony Liguori
On 04/18/2011 10:36 AM, Jan Kiszka wrote: > On 2011-04-18 17:12, Anthony Liguori wrote: >> On 04/17/2011 03:08 PM, Juan Quintela wrote: >>> >>> >>> The following changes since commit a0102082de4026833afbd2525e8a6320d1f92885: >>> >>> usb: fix spelling errors in usb-linux.c (2011-04-16 12:24:28 +01

Re: [Qemu-devel] [PATCH] set VIRTIO_BALLOON_F_MUST_TELL_HOST unconditionally

2011-04-18 Thread Dave Hansen
On Fri, 2011-04-15 at 14:20 -0500, Anthony Liguori wrote: > On 04/15/2011 02:15 PM, Dave Hansen wrote: > > On Fri, 2011-04-15 at 12:17 -0500, Anthony Liguori wrote: > >> If you're in OOM and you need memory, you can't ask the host for more > >> and wait for a response. You have to reclaim it imme

Re: [Qemu-devel] [PULL] Migration of misc devices

2011-04-18 Thread Jan Kiszka
On 2011-04-18 17:12, Anthony Liguori wrote: > On 04/17/2011 03:08 PM, Juan Quintela wrote: >> >> >> The following changes since commit a0102082de4026833afbd2525e8a6320d1f92885: >> >> usb: fix spelling errors in usb-linux.c (2011-04-16 12:24:28 +0100) >> >> are available in the git repository at:

Re: [Qemu-devel] KVM call agenda for April 19th

2011-04-18 Thread Antonio Galindo Castro
Tools for resource accounting the virtual machines. Fingerprint 35C0 49D6 E879 1F30 2FC3 0313 58C0 8857 4681 A236 Luis Antonio Galindo Castro (FunkyM0nk3y) On Mon, Apr 18, 2011 at 04:46, Juan Quintela wrote: > > Please, send in any agenda items you are interested in covering. > > Later, Juan.

[Qemu-devel] [PATCH 0/3] Fix ARM semihosting SYS_HEAPINFO issues

2011-04-18 Thread Peter Maydell
This patchset is intended to fix some problems with the ARM semihosting SYS_HEAPINFO call. Patch 1 fixes a bug in do_brk() which meant that using SYS_HEAPINFO tended to result in our accidentally unmapping the host libc. Patch 2 fixes the bug https://bugs.launchpad.net/qemu/+bug/656285 by correctin

[Qemu-devel] [PATCH 2/3] arm-semi.c: Use correct check for failure of do_brk()

2011-04-18 Thread Peter Maydell
In the ARM semihosting implementation of SYS_HEAPINFO, use the correct check for whether do_brk() has failed -- it does not return -1 but the previous value of the break limit. Signed-off-by: Peter Maydell --- arm-semi.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 1/3] linux-user: Don't use MAP_FIXED in do_brk()

2011-04-18 Thread Peter Maydell
Since mmap() with MAP_FIXED will map over the top of existing mappings, it's a bad idea to use it to implement brk(), because brk() with a large size is likely to overwrite important things like qemu itself or the host libc. So we drop MAP_FIXED and handle "mapped but at different address" as an er

Re: [Qemu-devel] [RFC PATCH] implement vmware pvscsi device

2011-04-18 Thread Stefan Hajnoczi
On Mon, Apr 18, 2011 at 3:05 PM, Hannes Reinecke wrote: > On 04/15/2011 10:56 PM, Paolo Bonzini wrote: >> >> On 04/15/2011 05:04 PM, Stefan Hajnoczi wrote: >>> >>> The way I approached virtio-scsi was to look at the SCSI Architecture >>> Model document and some of the Linux SCSI code. I'm not sure

Re: [Qemu-devel] [PULL] Migration of misc devices

2011-04-18 Thread Anthony Liguori
On 04/17/2011 03:08 PM, Juan Quintela wrote: > > > The following changes since commit a0102082de4026833afbd2525e8a6320d1f92885: > > usb: fix spelling errors in usb-linux.c (2011-04-16 12:24:28 +0100) > > are available in the git repository at: > git://repo.or.cz/qemu/quintela.git vmstate-mi

[Qemu-devel] [RFC][PATCH v2 11/17] qmp proxy: build QEMU with qmp proxy

2011-04-18 Thread Michael Roth
Signed-off-by: Michael Roth --- Makefile.objs |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index df7e670..f143bd8 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -103,6 +103,7 @@ common-obj-y += block-migration.o common-obj-y += pflib.

[Qemu-devel] [RFC][PATCH v2 17/17] guest agent: build qemu-ga, add QEMU-wide gio dep

2011-04-18 Thread Michael Roth
This allows us to build qemu-ga with "make qemu-ga". It pulls in the qemu-tools deps, but does not currently build by default. This may change to avoid bitrot and help with host-side-only unit tests. This also pulls in gio dependences for all of qemu, currently we only pull in gthread. In general

[Qemu-devel] [RFC][PATCH v2 14/17] guest agent: core marshal/dispatch interfaces

2011-04-18 Thread Michael Roth
These are basically a stripped-down, guest-side analogue to what's in qmp_core.c: definitions used by qmp-gen.py-generated marshalling code to handle dispatch and a registration of command->function mappings (minus all the bits related to Qmp sessions/server/events). As a result of that, there is

[Qemu-devel] [RFC][PATCH v2 15/17] guest agent: qemu-ga daemon

2011-04-18 Thread Michael Roth
This is the actual guest daemon, it listens for requests over a virtio-serial/isa-serial/unix socket channel and routes them through to dispatch routines, and writes the results back to the channel in a manner similar to QMP. A shorthand invocation: qemu-ga -d Is equivalent to: qemu-ga -c v

[Qemu-devel] [RFC][PATCH v2 03/17] json-parser: add handling for NULL token list

2011-04-18 Thread Michael Roth
Currently a NULL token list will crash the parser, instead we have it pass back a NULL QObject. Signed-off-by: Michael Roth --- json-parser.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/json-parser.c b/json-parser.c index 58e973b..849e215 100644 --- a/json-parse

[Qemu-devel] [RFC][PATCH v2 05/17] qapi: fix handling for null-return async callbacks

2011-04-18 Thread Michael Roth
Async commands like 'guest-ping' have NULL retvals. Handle these by inserting an empty dictionary in the response's "return" field. Signed-off-by: Michael Roth --- qmp-core.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/qmp-core.c b/qmp-core.c index e33f7a4..9f3d1

[Qemu-devel] [RFC][PATCH v2 01/17] json-lexer: make lexer error-recovery more deterministic

2011-04-18 Thread Michael Roth
Currently when we reach an error state we effectively flush everything fed to the lexer, which can put us in a state where we keep feeding tokens into the parser at arbitrary offsets in the stream. This makes it difficult for the lexer/tokenizer/parser to get back in sync when bad input is made by

[Qemu-devel] [RFC][PATCH v2 13/17] guest agent: command state class

2011-04-18 Thread Michael Roth
Signed-off-by: Michael Roth --- qga/guest-agent-command-state.c | 73 +++ 1 files changed, 73 insertions(+), 0 deletions(-) create mode 100644 qga/guest-agent-command-state.c diff --git a/qga/guest-agent-command-state.c b/qga/guest-agent-command-state.c ne

[Qemu-devel] [RFC][PATCH v2 02/17] json-streamer: add handling for JSON_ERROR token/state

2011-04-18 Thread Michael Roth
This allows a JSON_ERROR state to be passed to the streamer to force a flush of the current tokens and pass a NULL token list to the parser rather that have it churn on bad data. (Alternatively we could just not pass it to the parser at all, but it may be useful to push there errors up the stack. N

[Qemu-devel] [RFC][PATCH v2 10/17] qmp proxy: add qmp_proxy chardev

2011-04-18 Thread Michael Roth
This allows qemu to be started with guest agent support via: qemu -chardev qmp_proxy,id=qmp_proxy -device ...,chardev=qmp_proxy Writes to the guest agent are buffered, with deferred work handled by a timer. Writes from the guest agent to host/proxy are passed directly into a JSON streamer object/

[Qemu-devel] [RFC][PATCH v2 12/17] guest agent: worker thread class

2011-04-18 Thread Michael Roth
Signed-off-by: Michael Roth --- qga/guest-agent-worker.c | 173 ++ 1 files changed, 173 insertions(+), 0 deletions(-) create mode 100644 qga/guest-agent-worker.c diff --git a/qga/guest-agent-worker.c b/qga/guest-agent-worker.c new file mode 100644 i

[Qemu-devel] [RFC][PATCH v2 16/17] guest agent: add guest agent RPCs/commands

2011-04-18 Thread Michael Roth
This adds the initial set of QMP/QAPI commands provided by the guest agent: guest-ping guest-file-open guest-file-read guest-file-write guest-file-seek guest-file-close The input/output specification for these commands are documented in the schema. Signed-off-by: Michael Roth --- qapi-schema.j

[Qemu-devel] [RFC][PATCH v2 06/17] qapi: fix memory leak for async marshalling code

2011-04-18 Thread Michael Roth
When generating the callback function for an async command, if we expect a QString we copy it into a native char* type, then call the completion function. We should free it after calling the completion function, since the completion function will later copy it into a new QString before adding it to

[Qemu-devel] [RFC][PATCH v2 04/17] qapi: fix function name typo in qmp-gen.py

2011-04-18 Thread Michael Roth
Signed-off-by: Michael Roth --- qmp-gen.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qmp-gen.py b/qmp-gen.py index 90069ca..4164692 100644 --- a/qmp-gen.py +++ b/qmp-gen.py @@ -2328,7 +2328,7 @@ void qga_init_marshal(void) if not s.has_key('command'):

[Qemu-devel] [RFC][PATCH v2 08/17] qapi: fix Error usage in qemu-sockets.c

2011-04-18 Thread Michael Roth
Fix spurious errors due to not initializing Error pointer to NULL before checking for errors. Signed-off-by: Michael Roth --- qemu-sockets.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index dc8beeb..e709e5f 100644 --- a/qemu-sockets.

[Qemu-devel] [RFC][PATCH v2 07/17] qapi: qmp-gen.py, use basename of path for guard/core prefix

2011-04-18 Thread Michael Roth
To avoid errors when generating output to a seperate subdirectory, use only the filename, minus any leading directories, when passing it into functions to be used as a prefix for header guards, includes, etc. Also, trim file extensions based on "." seperator instead of assuming a single-char exten

[Qemu-devel] [RFC][PATCH v2 09/17] qmp proxy: core code for proxying qmp requests to guest

2011-04-18 Thread Michael Roth
This provides a QmpProxy class, 1 instance of which is shared by all QMP servers/sessions to send/receive QMP requests/responses between QEMU and the QEMU guest agent. A single qmp_proxy_send_request() is the only interface currently needed by a QMP session, QAPI/QMP's existing async support handl

[Qemu-devel] [RFC][PATCH v2 00/11] QEMU Guest Agent: QMP-based host/guest communication (virtagent)

2011-04-18 Thread Michael Roth
These apply on top of Anthony's glib tree, commit 03d5927deb5e6baebaade1b4c8ff2428a85e125c currently, and can also be obtained from: git://repo.or.cz/qemu/mdroth.git qga_v2 Patches 1-8 are general json/QAPI-related fixes. Anthony, please consider pulling these into your glib tree. The json fix-

  1   2   >