[Qemu-devel] [PATCH v2] usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller

2012-09-22 Thread Jan Kiszka
From: Jan Kiszka This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as wel

Re: [Qemu-devel] [PATCH 7/7] tcg: Streamline movcond_i64 using movcond_i32

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 03:27:52PM -0700, Richard Henderson wrote: > On 09/21/2012 02:23 PM, Aurelien Jarno wrote: > > Now I wonder if it wouldn't be better to write brcond2 as setcond2 + > > brcond. And even setcond2 as a pair of setcond in TCG, which would allow > > some optimizations in case bot

Re: [Qemu-devel] [PATCH v2 3/5] target-arm: convert sar, shl and shr helpers to TCG

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 04:14:29PM -0700, Richard Henderson wrote: > On 09/21/2012 12:33 PM, Aurelien Jarno wrote: > > +static void gen_sar(TCGv dest, TCGv t0, TCGv t1) > > +{ > > +TCGv tmp1, tmp2, tmp3; > > +tmp1 = tcg_temp_new_i32(); > > +tcg_gen_andi_i32(tmp1, t1, 0xff); > > +tmp

Re: [Qemu-devel] [PATCH v2 07/10] tcg/optimize: further optimize brcond/movcond/setcond

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 04:17:08PM -0700, Richard Henderson wrote: > On 09/21/2012 12:43 PM, Aurelien Jarno wrote: > > +/* Return 2 if the condition can't be simplified, and the result > > + of the condition (0 or 1) if it can */ > > Ok as-is. But I'd bike-shed the "fail" return to -1. > I ha

Re: [Qemu-devel] [PATCH v2 10/10] tcg/optimize: add constant folding for deposit

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 04:22:53PM -0700, Richard Henderson wrote: > On 09/21/2012 12:43 PM, Aurelien Jarno wrote: > > +tmp = ((1ull << args[4]) - 1); > > +tmp = (temps[args[1]].val & ~(tmp << args[3])) > > + | ((temps[args[2]].val & tmp) << args

Re: [Qemu-devel] [PATCH] tcg-hppa: Implement movcond

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 06:46:32PM -0700, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/hppa/tcg-target.c | 21 + > tcg/hppa/tcg-target.h | 2 +- > 2 files changed, 22 insertions(+), 1 deletion(-) > > diff --git a/tcg/hppa/tcg-target.c b/tcg/hppa/tc

Re: [Qemu-devel] [PATCH 1/8] tcg: Adjust descriptions of *cond opcodes

2012-09-22 Thread malc
On Fri, 21 Sep 2012, Richard Henderson wrote: > The README file documented the operand ordering of the tcg_gen_* > functions. Since we're documenting opcodes here, use the true > operand ordering. Thanks, looks good. [..snip..] -- mailto:av1...@comtv.ru

[Qemu-devel] [RFC v2 2/2] target-arm: Add support for Cortex-R4F

2012-09-22 Thread Andreas Färber
With QOM ARMCPU we can now distinguish between -cpu cortex-r4 and -cpu cortex-r4f despite identical MIDR. Signed-off-by: Andreas Färber --- target-arm/cpu.c | 47 +++ 1 Datei geändert, 47 Zeilen hinzugefügt(+) diff --git a/target-arm/cpu.c b/target-

[Qemu-devel] [RFC v2 1/2] target-arm: Prepare support for Cortex-R4

2012-09-22 Thread Andreas Färber
Glue "cortex-r4" to r1p4, the latest available TRM. Set MPU and Thumb division feature bit. Signed-off-by: Andreas Färber --- target-arm/cpu.c | 24 1 Datei geändert, 24 Zeilen hinzugefügt(+) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index b00f5fa..6726498 1006

Re: [Qemu-devel] [PATCH] linux-user: Add naive implementation of capget() syscall

2012-09-22 Thread Blue Swirl
On Wed, Sep 19, 2012 at 3:09 PM, Karol Lewandowski wrote: > libcap, library used to manipulate posix file capabilities uses > getcap() to query version of capabilities supported by running > kernel. Information obtained from this syscall is then used to > initialize data structures that can be use

Re: [Qemu-devel] [PATCH v6 08/13] m25p80: Initial implementation of SPI flash device

2012-09-22 Thread Blue Swirl
On Thu, Sep 20, 2012 at 1:37 AM, Peter Crosthwaite wrote: > On Thu, Sep 20, 2012 at 4:25 AM, Blue Swirl wrote: >> On Tue, Sep 18, 2012 at 2:11 AM, Peter A. G. Crosthwaite >>> +int64_t dirty_page; >>> + >>> +uint64_t waddr; >>> +int write_enable; >>> + >>> +char *part_name; >> >> W

Re: [Qemu-devel] [RfC PATCH] vga: add mmio bar to standard vga

2012-09-22 Thread Blue Swirl
On Thu, Sep 20, 2012 at 5:43 AM, Gerd Hoffmann wrote: > Hi, > >>> +vbe_ioport_write_index(&d->vga, 0, index); >>> +return vbe_ioport_read_data(&d->vga, 0); >> >> These functions are only available with CONFIG_BOCHS_VBE #defined, so >> this code should be conditional as well. >> >> But bu

Re: [Qemu-devel] [PATCH] Added more entries to the LEON processor configuration register

2012-09-22 Thread Blue Swirl
On Thu, Sep 20, 2012 at 7:15 AM, Ronald Hecht wrote: > On 09/19/2012 08:56 PM, Blue Swirl wrote: >>> >>> --- a/target-sparc/translate.c >>> +++ b/target-sparc/translate.c >>> @@ -2590,13 +2590,9 @@ static void disas_sparc_insn(DisasContext * dc, >>> unsigned int insn) >>>

Re: [Qemu-devel] [PATCH RFC] hw/grlib: SMP support added to LEON interrupt controller

2012-09-22 Thread Blue Swirl
On Thu, Sep 20, 2012 at 7:27 AM, Ronald Hecht wrote: > On 09/19/2012 09:19 PM, Blue Swirl wrote: >> >> On Wed, Sep 19, 2012 at 3:30 PM, Ronald Hecht wrote: >> >>> >>> This patch adds SMP support to the LEON SPARC interrupt controller. >>> I don't like that CPU status (halted/not halted) is access

Re: [Qemu-devel] [PATCH] tcg-hppa: Implement movcond

2012-09-22 Thread Richard Henderson
On 2012-09-22 03:01, Aurelien Jarno wrote: >> > +/* ??? We can actually support a signed 14-bit arg3, but we >> > + only have existing constraints for a signed 11-bit. */ >> > +{ INDEX_op_movcond_i32, { "r", "rZ", "rI", "rI", "0" } }, >> > + > What's the problem in adding a constrain

Re: [Qemu-devel] [PATCH v2 10/10] tcg/optimize: add constant folding for deposit

2012-09-22 Thread Richard Henderson
On 2012-09-22 02:41, Aurelien Jarno wrote: > On Fri, Sep 21, 2012 at 04:22:53PM -0700, Richard Henderson wrote: >> On 09/21/2012 12:43 PM, Aurelien Jarno wrote: >>> +tmp = ((1ull << args[4]) - 1); >>> +tmp = (temps[args[1]].val & ~(tmp << args[3])) >>> +

Re: [Qemu-devel] [PATCH v2 07/10] tcg/optimize: further optimize brcond/movcond/setcond

2012-09-22 Thread Richard Henderson
On 2012-09-22 02:35, Aurelien Jarno wrote: > On Fri, Sep 21, 2012 at 04:17:08PM -0700, Richard Henderson wrote: >> On 09/21/2012 12:43 PM, Aurelien Jarno wrote: >>> +/* Return 2 if the condition can't be simplified, and the result >>> + of the condition (0 or 1) if it can */ >> >> Ok as-is. But

Re: [Qemu-devel] [RFC v2 1/2] target-arm: Prepare support for Cortex-R4

2012-09-22 Thread Peter Maydell
On 22 September 2012 12:45, Andreas Färber wrote: > +static void cortex_r4_initfn(Object *obj) > +{ > +ARMCPU *cpu = ARM_CPU(obj); > +set_feature(&cpu->env, ARM_FEATURE_V7); > +set_feature(&cpu->env, ARM_FEATURE_THUMB_DIV); > +set_feature(&cpu->env, ARM_FEATURE_MPU); This will tri

Re: [Qemu-devel] [PATCH 8/8] tcg: Sanity check goto_tb input

2012-09-22 Thread Max Filippov
On 09/22/2012 04:18 AM, Richard Henderson wrote: > Checking that we don't try for idx != [01] is trivial. Checking > that we don't issue more than one of any index requires a tad > more data and some ifdefs protecting that new variable. > > Signed-off-by: Richard Henderson > Cc: Max Filippov >

Re: [Qemu-devel] directory hierarchy

2012-09-22 Thread Blue Swirl
On Thu, Sep 20, 2012 at 11:31 AM, Avi Kivity wrote: > On 09/19/2012 10:57 PM, Blue Swirl wrote: >> On Wed, Sep 19, 2012 at 12:54 PM, Avi Kivity wrote: >>> On 09/14/2012 10:51 PM, Blue Swirl wrote: > > exec: These files need cleanup so that TCG code gets into tcg/. Maybe also >>>

Re: [Qemu-devel] [PATCH] ehci: Fix interrupt packet MULT handling

2012-09-22 Thread Blue Swirl
On Thu, Sep 20, 2012 at 3:38 PM, Hans de Goede wrote: > There are several issues with our handling of the MULT epcap field > of interrupt qhs, which this patch fixes. > > 1) When we don't execute a transaction because of the transaction counter > being 0, p->async stays EHCI_ASYNC_NONE, and the ne

Re: [Qemu-devel] [PATCH v5 00/17] Allow changing of Hypervisor CPUIDs.

2012-09-22 Thread Blue Swirl
On Sat, Sep 22, 2012 at 12:13 AM, Don Slutz wrote: > Also known as Paravirtualization CPUIDs. > > This is primarily done so that the guest will think it is running > under vmware when hypervisor-vendor=vmware is specified as a > property of a cpu. Please use checkpatch.pl to check for missing bra

Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine

2012-09-22 Thread Blue Swirl
On Fri, Sep 21, 2012 at 3:08 AM, David Gibson wrote: > Below is a patch which implements the (PAPR mandated) NVRAM for the > pseries machine. It raises a couple of generic questions. > > First, this adds a new "nvram" machine option which is used to give a > block device id to back the NVRAM so i

Re: [Qemu-devel] [RFC PATCH v3 06/19] Implement "-dimm" command line option

2012-09-22 Thread Blue Swirl
On Fri, Sep 21, 2012 at 11:17 AM, Vasilis Liaskovitis wrote: > Example: > "-dimm id=dimm0,size=512M,node=0,populated=off" There should not be a need to introduce a new top level option, instead you should just use -device, like -device dimm,base=0,id=dimm0,size=512M,node=0,populated=off That wou

Re: [Qemu-devel] [RFC PATCH v3 07/19] acpi_piix4: Implement memory device hotplug registers

2012-09-22 Thread Blue Swirl
On Fri, Sep 21, 2012 at 11:17 AM, Vasilis Liaskovitis wrote: > A 32-byte register is used to present up to 256 hotplug-able memory devices > to BIOS and OSPM. Hot-add and hot-remove functions trigger an ACPI hotplug > event through these. Only reads are allowed from these registers. > > An ACPI ho

Re: [Qemu-devel] [RFC v2 1/2] target-arm: Prepare support for Cortex-R4

2012-09-22 Thread Andreas Färber
Am 22.09.2012 15:05, schrieb Peter Maydell: > On 22 September 2012 12:45, Andreas Färber wrote: >> +static void cortex_r4_initfn(Object *obj) >> +{ >> +ARMCPU *cpu = ARM_CPU(obj); >> +set_feature(&cpu->env, ARM_FEATURE_V7); >> +set_feature(&cpu->env, ARM_FEATURE_THUMB_DIV); >> +set

[Qemu-devel] [Bug 1052380] Re: qemu 1.0.50-2012.03-0ubuntu2 makes ARMv6k kernels crash

2012-09-22 Thread Launchpad Bug Tracker
This bug was fixed in the package qemu-linaro - 1.2.0-2012.09-0ubuntu1 --- qemu-linaro (1.2.0-2012.09-0ubuntu1) quantal; urgency=low [ Fathi Boudra ] * FFe for new upstream version (LP: #1053212) - Compatibility with ARM realview kernels > 3.0 with VFP (LP: #1052380) * Also

Re: [Qemu-devel] [RFC PATCH v3 08/19] pc: calculate dimm physical addresses and adjust memory map

2012-09-22 Thread Blue Swirl
On Fri, Sep 21, 2012 at 11:17 AM, Vasilis Liaskovitis wrote: > Dimm physical address offsets are calculated automatically and memory map is > adjusted accordingly. If a DIMM can fit before the PCI_HOLE_START (currently > 0xe000), it will be added normally, otherwise its physical address will b

Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine

2012-09-22 Thread Alexander Graf
On 22.09.2012, at 15:31, Blue Swirl wrote: > On Fri, Sep 21, 2012 at 3:08 AM, David Gibson > wrote: >> Below is a patch which implements the (PAPR mandated) NVRAM for the >> pseries machine. It raises a couple of generic questions. >> >> First, this adds a new "nvram" machine option which is

Re: [Qemu-devel] [RFC PATCH v3 00/19] ACPI memory hotplug

2012-09-22 Thread Blue Swirl
On Fri, Sep 21, 2012 at 11:17 AM, Vasilis Liaskovitis wrote: > This is v3 of the ACPI memory hotplug functionality. Only x86_64 target is > supported > for now. > > Overview: > > Dimm device layout is modeled with a new qemu command line > > "-dimm id=name,size=sz,node=pxm,populated=on|off" > > T

Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine

2012-09-22 Thread Blue Swirl
On Sat, Sep 22, 2012 at 2:16 PM, Alexander Graf wrote: > > > On 22.09.2012, at 15:31, Blue Swirl wrote: > >> On Fri, Sep 21, 2012 at 3:08 AM, David Gibson >> wrote: >>> Below is a patch which implements the (PAPR mandated) NVRAM for the >>> pseries machine. It raises a couple of generic questio

Re: [Qemu-devel] [RFC v2 1/2] target-arm: Prepare support for Cortex-R4

2012-09-22 Thread Peter Maydell
On 22 September 2012 14:56, Andreas Färber wrote: > And of course the Cortex-R4's lock-step mode that seems to make it so > interesting for automotive customers. Lock-step is trivial to emulate: just do nothing and never raise a "cores out of sync" error :-) -- PMM

Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization

2012-09-22 Thread Blue Swirl
On Fri, Sep 21, 2012 at 4:24 PM, Michael Roth wrote: > On Fri, Sep 21, 2012 at 05:57:42PM +0200, Paolo Bonzini wrote: >> Il 21/09/2012 16:07, Michael Roth ha scritto: >> > >> > QIDL_DECLARE(SerialDevice) { >> > SysBusDevice parent; >> > >> > uint8_t thr; /* transmi

Re: [Qemu-devel] [PATCH 05/10] tcg/mips: use stack for TCG temps

2012-09-22 Thread Blue Swirl
On Fri, Sep 21, 2012 at 4:43 PM, Aurelien Jarno wrote: > Use stack instead of temp_buf array in CPUState for TCG > temps. > > Signed-off-by: Aurelien Jarno > --- > tcg/mips/tcg-target.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/tcg/mips/tcg-target.c b/

Re: [Qemu-devel] [PATCH v2 0/7] tcg: movcond (ppc32 version)

2012-09-22 Thread Blue Swirl
On Fri, Sep 21, 2012 at 8:10 PM, malc wrote: > diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c > index 26c4b33..0fb6fc7 100644 > --- a/tcg/ppc/tcg-target.c > +++ b/tcg/ppc/tcg-target.c > @@ -390,6 +390,7 @@ static int tcg_target_const_match(tcg_target_long val, > #define ORCXO31(412)

Re: [Qemu-devel] [PATCH v2 10/10] tcg/optimize: add constant folding for deposit

2012-09-22 Thread Blue Swirl
On Sat, Sep 22, 2012 at 9:41 AM, Aurelien Jarno wrote: > On Fri, Sep 21, 2012 at 04:22:53PM -0700, Richard Henderson wrote: >> On 09/21/2012 12:43 PM, Aurelien Jarno wrote: >> > +tmp = ((1ull << args[4]) - 1); >> > +tmp = (temps[args[1]].val & ~(tmp << args[3])) >>

Re: [Qemu-devel] [RFC v2 2/2] target-arm: Add support for Cortex-R4F

2012-09-22 Thread Blue Swirl
On Sat, Sep 22, 2012 at 11:45 AM, Andreas Färber wrote: > With QOM ARMCPU we can now distinguish between -cpu cortex-r4 and > -cpu cortex-r4f despite identical MIDR. > > Signed-off-by: Andreas Färber > --- > target-arm/cpu.c | 47 +++ > 1 Datei geänd

Re: [Qemu-devel] [RFC v2 2/2] target-arm: Add support for Cortex-R4F

2012-09-22 Thread Peter Maydell
On 22 September 2012 12:45, Andreas Färber wrote: > With QOM ARMCPU we can now distinguish between -cpu cortex-r4 and > -cpu cortex-r4f despite identical MIDR. I'm not convinced that we should treat the R4 any differently to any of the other CPUs which we model which might or might not have an FP

Re: [Qemu-devel] [PATCH 1/4] w64: Fix TCG helper functions with 5 arguments

2012-09-22 Thread Aurelien Jarno
On Thu, Sep 13, 2012 at 07:37:43PM +0200, Stefan Weil wrote: > TCG uses 6 registers for function arguments on 64 bit Linux hosts, > but only 4 registers on W64 hosts. > > Commit 2999a0b20074a7e4a58f56572bb1436749368f59 increased the number > of arguments for some important helper functions from 4

Re: [Qemu-devel] [PATCH 1/2] tcg/README: document tcg_gen_goto_tb restrictions

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 04:18:07AM +0400, Max Filippov wrote: > See > http://lists.nongnu.org/archive/html/qemu-devel/2012-09/msg03196.html > for the whole story. > > Signed-off-by: Max Filippov > --- > tcg/README |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/t

Re: [Qemu-devel] [PATCH 2/2] tcg: add TB sanity checking

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 04:18:08AM +0400, Max Filippov wrote: > Do a sanity checking pass on the intermediate code. > Check that goto_tb indices are either 0 or 1 and used at most once per > TB. > > Signed-off-by: Max Filippov > --- > tcg/tcg.c | 69 > +

Re: [Qemu-devel] [PATCH 3/4] tcg/i386: Remove unused registers from tcg_target_call_iarg_regs

2012-09-22 Thread Aurelien Jarno
On Thu, Sep 13, 2012 at 07:37:45PM +0200, Stefan Weil wrote: > 32 bit x86 hosts don't need registers for helper function arguments > because they use the default stack based calling convention. > > Removing the registers allows simpler code for function > tcg_target_get_call_iarg_regs_count. > >

Re: [Qemu-devel] [PATCH 4/4] tcg: Remove tcg_target_get_call_iarg_regs_count

2012-09-22 Thread Aurelien Jarno
On Thu, Sep 13, 2012 at 07:37:46PM +0200, Stefan Weil wrote: > The TCG targets no longer need individual implementations. > > Since commit 6a18ae2d2947532d5c26439548afa0481c4529f9, > 'flags' is no longer used in tcg_target_get_call_iarg_regs_count. > > The remaining tcg_target_get_call_iarg_regs_

Re: [Qemu-devel] [PATCH 2/4] tcg/i386: Add shortcuts for registers used in L constraint

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 14, 2012 at 07:18:17AM +0200, Stefan Weil wrote: > Am 14.09.2012 00:20, schrieb Richard Henderson: > >On 09/13/2012 03:03 PM, Peter Maydell wrote: > >>Hard to come up with a snappy name for "register which is the Nth > >>input argument if input args are in registers, but an arbitrary >

Re: [Qemu-devel] [PATCH] tcg-hppa: Implement movcond

2012-09-22 Thread Aurelien Jarno
On Sat, Sep 22, 2012 at 05:43:13AM -0700, Richard Henderson wrote: > On 2012-09-22 03:01, Aurelien Jarno wrote: > >> > +/* ??? We can actually support a signed 14-bit arg3, but we > >> > + only have existing constraints for a signed 11-bit. */ > >> > +{ INDEX_op_movcond_i32, { "r", "

Re: [Qemu-devel] [PATCH v5 01/17] target-i386: Allow tsc-frequency to be larger then 2.147G

2012-09-22 Thread Stefan Hajnoczi
On Fri, Sep 21, 2012 at 08:13:13PM -0400, Don Slutz wrote: > The check using INT_MAX (2147483647) is wrong in this case. > > Signed-off-by: Fred Oliveira > Signed-off-by: Don Slutz > --- > target-i386/cpu.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Thanks, applied to the tr

Re: [Qemu-devel] [PATCH] qemu-ga: Remove unreachable code after g_error

2012-09-22 Thread Stefan Hajnoczi
On Sat, Sep 01, 2012 at 09:34:15AM +0200, Stefan Weil wrote: > Report from smatch: > qemu-ga.c:117 register_signal_handlers(11) info: ignoring unreachable code. > qemu-ga.c:122 register_signal_handlers(16) info: ignoring unreachable code. > > g_error calls abort which terminates the program. > >

Re: [Qemu-devel] [Qemu-trivial] [PATCH] qemu-sockets: Fix potential memory leak

2012-09-22 Thread Stefan Hajnoczi
On Sat, Sep 01, 2012 at 09:40:26AM +0200, Stefan Weil wrote: > The old code leaks variable 'peer'. > > Signed-off-by: Stefan Weil > --- > qemu-sockets.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Report from smatch: > qemu-sockets.c:404 inet_dgram_opts(101) warn: variable de

Re: [Qemu-devel] [Qemu-trivial] [PATCH] cadence_uart: Fix buffer overflow

2012-09-22 Thread Stefan Hajnoczi
On Sat, Sep 01, 2012 at 11:12:23AM +0200, Stefan Weil wrote: > Report from smatch: > hw/cadence_uart.c:413 uart_read(13) error: buffer overflow 's->r' 18 <= 18 > > This fixes read access to s->r[R_MAX] which is behind the limits of s->r. > > Signed-off-by: Stefan Weil > --- > hw/cadence_uart.c

Re: [Qemu-devel] [PATCH] lm4549: Fix buffer overflow

2012-09-22 Thread Stefan Hajnoczi
On Sat, Sep 01, 2012 at 12:43:41PM +0200, Stefan Weil wrote: > Report from smatch: > lm4549.c:234 lm4549_write_samples(14) error: > buffer overflow 's->buffer' 1024 <= 1024 > > There must be enough space to add two entries starting with index > s->buffer_level, therefore the old check was wrong.

Re: [Qemu-devel] [Qemu-trivial] [PATCH] ioh3420: Remove unreachable code

2012-09-22 Thread Stefan Hajnoczi
On Sat, Sep 01, 2012 at 12:56:03PM +0200, Stefan Weil wrote: > Report from smatch: > hw/ioh3420.c:128 ioh3420_initfn(35) info: ignoring unreachable code. > > Signed-off-by: Stefan Weil > --- > hw/ioh3420.c |1 - > 1 file changed, 1 deletion(-) Thanks, applied to the trivial patches tree: ht

Re: [Qemu-devel] [Qemu-trivial] [PATCH] pflash_cfi01: Fix warning caused by unreachable code

2012-09-22 Thread Stefan Hajnoczi
On Sat, Sep 01, 2012 at 01:00:48PM +0200, Stefan Weil wrote: > Report from smatch: > hw/pflash_cfi01.c:431 pflash_write(180) info: ignoring unreachable code. > > Instead of removing the return statement after the switch statement, > the patch replaces the return statements in the switch statement

Re: [Qemu-devel] [Qemu-trivial] [PATCH] dtrace backend: add function to reserved words

2012-09-22 Thread Stefan Hajnoczi
On Sun, Sep 02, 2012 at 02:04:16AM +0300, Alon Levy wrote: > Signed-off-by: Alon Levy > --- > scripts/tracetool/backend/dtrace.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to the trivial patches tree: https://github.com/stefanha/qemu/commits/trivial-patches Stefan

Re: [Qemu-devel] [Qemu-trivial] [PATCH] TextConsole: saturate escape parameter in TTY_STATE_CSI

2012-09-22 Thread Stefan Hajnoczi
On Mon, Sep 17, 2012 at 11:10:03AM +0200, Laszlo Ersek wrote: > Signed-off-by: Laszlo Ersek > --- > Build tested. > console.c |7 +-- > 1 files changed, 5 insertions(+), 2 deletions(-) Thanks, applied to the trivial patches tree: https://github.com/stefanha/qemu/commits/trivial-patches

Re: [Qemu-devel] [Qemu-trivial] [PATCH 0/5 v3] convert system_powerdown command to notifiers

2012-09-22 Thread Stefan Hajnoczi
On Tue, Sep 18, 2012 at 05:58:14PM +0200, Igor Mammedov wrote: > On Wed, 5 Sep 2012 23:06:20 +0200 > Igor Mammedov wrote: > > ping This series has acks and should be ready to go. qemu-trivial is a bit of a stretch, please merge directly into qemu.git through Anthony, Blue, etc. Stefan

Re: [Qemu-devel] [PATCH] qemu-timer: simplify qemu_run_timers

2012-09-22 Thread Stefan Hajnoczi
On Wed, Sep 19, 2012 at 03:52:44PM +0200, Paolo Bonzini wrote: > ptimer_head is an invariant pointer to clock->active_timers. > Remove it, and just reference clock->active_timers directly. > > Signed-off-by: Paolo Bonzini > --- > qemu-timer.c | 7 +++ > 1 file modificato, 3 inserzioni(+), 4

Re: [Qemu-devel] [Qemu-trivial] [PATCH] pflash: Avoid warnings from coverity

2012-09-22 Thread Stefan Hajnoczi
On Wed, Sep 19, 2012 at 06:41:14PM +0200, Stefan Weil wrote: > hw/pflash_cfi01.c:209: > check_return: Calling function "bdrv_write" without checking return value (as > is done elsewhere 35 out of 37 times). > > hw/pflash_cfi02.c:144: > unterminated_default: The default case is not terminated by a

Re: [Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW)

2012-09-22 Thread Stefan Hajnoczi
On Thu, Sep 20, 2012 at 09:32:19PM +0200, Stefan Weil wrote: > Add a type cast which was removed by commit > 213fd5087e2e4e2da10ad266df0ba950cf7618bf again. > > Without it, MinGW compilers complain: > > net/socket.c:136: warning: > pointer targets in passing argument 2 of ‘sendto’ differ in sign

Re: [Qemu-devel] [Qemu-trivial] [PATCH] pflash: Avoid warnings from coverity

2012-09-22 Thread Peter Maydell
On 22 September 2012 17:29, Stefan Hajnoczi wrote: > Please report the errno and possibly bdrv_get_device_name() to uniquely > identify this block device. > > Peter's comments about reporting errors to the guest make sense to me. > I'm not sure how much work that involves, printing the error is a

[Qemu-devel] [PATCH v2] net/socket: Fix compiler warning (regression for MinGW)

2012-09-22 Thread Stefan Weil
Add a type cast which was removed by commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf again. Without it, MinGW compilers complain: net/socket.c:136: warning: pointer targets in passing argument 2 of ‘sendto’ differ in signedness /usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/i

Re: [Qemu-devel] [PATCH 05/10] tcg/mips: use stack for TCG temps

2012-09-22 Thread Aurelien Jarno
On Sat, Sep 22, 2012 at 02:37:35PM +, Blue Swirl wrote: > On Fri, Sep 21, 2012 at 4:43 PM, Aurelien Jarno wrote: > > Use stack instead of temp_buf array in CPUState for TCG > > temps. > > > > Signed-off-by: Aurelien Jarno > > --- > > tcg/mips/tcg-target.c | 10 ++ > > 1 file change

Re: [Qemu-devel] [PATCH v3 00/10] target-xtensa: implement FP coprocessor option

2012-09-22 Thread Blue Swirl
On Wed, Sep 19, 2012 at 12:23 AM, Max Filippov wrote: > This series implements floating point coprocessor and coprocessor context > options for xtensa and fixes a couple of bugs to make it work. Thanks, applied all. > > Changes v2->v3: > - add comment to the NO_SIGNALING_NANS definition > - rewo

[Qemu-devel] [Bug 1054558] [NEW] 1366x768 resolution missing

2012-09-22 Thread StarBrilliant
Public bug reported: I use ArchLinux with QEMU 1.2.0. I found that 1366x768 resolution is missing, even if I use -vga std or -vga vmware. I think that it is necessary to patch it into the source. Also, why not add a command-line option to specify custom resolutions without patching the source? (

Re: [Qemu-devel] [PATCH 05/10] tcg/mips: use stack for TCG temps

2012-09-22 Thread Blue Swirl
On Sat, Sep 22, 2012 at 5:25 PM, Aurelien Jarno wrote: > On Sat, Sep 22, 2012 at 02:37:35PM +, Blue Swirl wrote: >> On Fri, Sep 21, 2012 at 4:43 PM, Aurelien Jarno wrote: >> > Use stack instead of temp_buf array in CPUState for TCG >> > temps. >> > >> > Signed-off-by: Aurelien Jarno >> > ---

Re: [Qemu-devel] [PATCH 6/7] tcg: Streamline movcond_i64 using 32-bit arithmetic

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 10:13:39AM -0700, Richard Henderson wrote: > Avoiding 64-bit arithmetic (outside of the compare) reduces the > generated op count from 15 to 12, and the generated code size on > i686 from 105 to 88 bytes. > > Signed-off-by: Richard Henderson > --- > tcg/tcg-op.h | 42

Re: [Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW)

2012-09-22 Thread Michael Tokarev
On 22.09.2012 20:32, Stefan Hajnoczi wrote: > On Thu, Sep 20, 2012 at 09:32:19PM +0200, Stefan Weil wrote: >> Add a type cast which was removed by commit >> 213fd5087e2e4e2da10ad266df0ba950cf7618bf again. >> >> Without it, MinGW compilers complain: >> >> net/socket.c:136: warning: >> pointer targe

Re: [Qemu-devel] [PATCH 05/10] tcg/mips: use stack for TCG temps

2012-09-22 Thread Aurelien Jarno
On Sat, Sep 22, 2012 at 06:09:13PM +, Blue Swirl wrote: > On Sat, Sep 22, 2012 at 5:25 PM, Aurelien Jarno wrote: > > On Sat, Sep 22, 2012 at 02:37:35PM +, Blue Swirl wrote: > >> On Fri, Sep 21, 2012 at 4:43 PM, Aurelien Jarno > >> wrote: > >> > Use stack instead of temp_buf array in CPUS

Re: [Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW)

2012-09-22 Thread Stefan Weil
Am 22.09.2012 20:01, schrieb Michael Tokarev: On 22.09.2012 20:32, Stefan Hajnoczi wrote: On Thu, Sep 20, 2012 at 09:32:19PM +0200, Stefan Weil wrote: Add a type cast which was removed by commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf again. Without it, MinGW compilers complain: net/socket.c

Re: [Qemu-devel] [PATCH v3 00/14] Sparc TCG cleanup

2012-09-22 Thread Blue Swirl
On Sat, Sep 22, 2012 at 2:04 AM, Richard Henderson wrote: > Changes since v2: > * Patch 4 split out from patch 5 (afaerber feedback) > * TB chaining preserves wrt retranslation > * Last patch for branch retranslation is new > > The patch set is rebased on cfb75cb9807463ebe18b127096b48b5d0db1

Re: [Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW)

2012-09-22 Thread Blue Swirl
On Sat, Sep 22, 2012 at 6:17 PM, Stefan Weil wrote: > Am 22.09.2012 20:01, schrieb Michael Tokarev: > >> On 22.09.2012 20:32, Stefan Hajnoczi wrote: >>> >>> On Thu, Sep 20, 2012 at 09:32:19PM +0200, Stefan Weil wrote: Add a type cast which was removed by commit 213fd5087e2e4e2da10ad

Re: [Qemu-devel] [Qemu-trivial] [PATCH] pflash: Avoid warnings from coverity

2012-09-22 Thread Stefan Weil
Am 22.09.2012 18:29, schrieb Stefan Hajnoczi: On Wed, Sep 19, 2012 at 06:41:14PM +0200, Stefan Weil wrote: [snip] offset_end = (offset_end + 511) >> 9; -bdrv_write(pfl->bs, offset, pfl->storage + (offset << 9), - offset_end - offset); +if (bdrv_write(

[Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW)

2012-09-22 Thread Stefan Weil
Commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf removed a type cast which is needed for MinGW: net/socket.c:136: warning: pointer targets in passing argument 2 of ‘sendto’ differ in signedness /usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/include/winsock2.h:1313: note: expe

Re: [Qemu-devel] [PATCH 2/8] tcg: Emit ANDI as EXTU for appropriate constants

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 05:18:10PM -0700, Richard Henderson wrote: > Note that andi_i64 failed to perform even the minimal > optimizations promised by the README. > > Signed-off-by: Richard Henderson > --- > tcg/tcg-op.h | 67 > ++-- > 1 f

Re: [Qemu-devel] [PATCH 4/8] tcg: Emit XORI as NOT for appropriate constants

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 05:18:12PM -0700, Richard Henderson wrote: > Note that xori_i64 failed to perform even the minimal > optimizations promised by the README. > > Signed-off-by: Richard Henderson > --- > tcg/tcg-op.h | 19 +++ > 1 file changed, 15 insertions(+), 4 deletions(-

Re: [Qemu-devel] [PATCH 7/8] tcg: Sanity check deposit inputs

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 05:18:15PM -0700, Richard Henderson wrote: > Given these are constants, checking once here means everything > after can assume they're correct. > > Signed-off-by: Richard Henderson > --- > tcg/tcg-op.h | 8 > 1 file changed, 8 insertions(+) > > diff --git a/tcg/

Re: [Qemu-devel] [PATCH 6/8] tcg: Add tcg_debug_assert

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 05:18:14PM -0700, Richard Henderson wrote: > Like the C assert macro, except only enabled for CONFIG_DEBUG_TCG, > and without having to set _NDEBUG and disable all other asserts at > the same time. > > The use of __builtin_unreachable (when available) gives the compiler > t

Re: [Qemu-devel] [PATCH 8/8] tcg: Sanity check goto_tb input

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 05:18:16PM -0700, Richard Henderson wrote: > Checking that we don't try for idx != [01] is trivial. Checking > that we don't issue more than one of any index requires a tad > more data and some ifdefs protecting that new variable. > > Signed-off-by: Richard Henderson > Cc

Re: [Qemu-devel] [PATCH 1/8] tcg: Adjust descriptions of *cond opcodes

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 05:18:09PM -0700, Richard Henderson wrote: > The README file documented the operand ordering of the tcg_gen_* > functions. Since we're documenting opcodes here, use the true > operand ordering. > > Signed-off-by: Richard Henderson > Cc: malc > --- > tcg/README | 10

Re: [Qemu-devel] [PATCH 5/8] tcg: Implement concat*_i64 with deposit_i64

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 05:18:13PM -0700, Richard Henderson wrote: > For tcg_gen_concat_i32_i64 we only use deposit if the host supports it. > For tcg_gen_concat32_i64 even if the host does not, as we get identical > code before and after. > > Note that this relies on the ANDI -> EXTU patch for th

Re: [Qemu-devel] [PATCH 3/8] tcg: Optimize initial inputs for ori_i64

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 05:18:11PM -0700, Richard Henderson wrote: > Copy the same optimizations from ori_i32. > > Signed-off-by: Richard Henderson > --- > tcg/tcg-op.h | 19 +-- > 1 file changed, 13 insertions(+), 6 deletions(-) > > diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h > in

[Qemu-devel] [PATCH] w32: Add implementation of gmtime_r, localtime_r

2012-09-22 Thread Stefan Weil
Those functions are missing in MinGW. Some versions of MinGW-w64 include defines for gmtime_r and localtime_r. Older versions of these macros are buggy (they return a pointer to a static variable), therefore we don't want them. Newer versions are similar to the code used here, but without the mems

Re: [Qemu-devel] [PATCH] audio: Fix warning from static code analysis

2012-09-22 Thread Stefan Weil
Am 03.09.2012 21:25, schrieb Stefan Weil: smatch report: audio/audio_template.h:416 AUD_open_out(18) warn: variable dereferenced before check 'as' (see line 414) Moving the ldebug statement after the statement which checks 'as' fixes that warning. Signed-off-by: Stefan Weil --- This patch fa

Re: [Qemu-devel] [PATCH] linux-user: Remove redundant null check and replace free by g_free

2012-09-22 Thread Stefan Weil
Am 04.09.2012 22:14, schrieb Stefan Weil: Report from smatch: linux-user/syscall.c:3632 do_ioctl_dm(220) info: redundant null check on big_buf calling free() 'big_buf' was allocated by g_malloc0, therefore free was also replaced by g_free. Signed-off-by: Stefan Weil --- linux-user/syscall.

Re: [Qemu-devel] [PATCH] hw/xics: Fix one-bit signed bitfields

2012-09-22 Thread Stefan Weil
Am 04.09.2012 22:53, schrieb Peter Maydell: On 4 September 2012 21:30, Stefan Weil wrote: Report from smatch: xics.c:169:19: error: dubious one-bit signed bitfield xics.c:170:15: error: dubious one-bit signed bitfield xics.c:171:19: error: dubious one-bit signed bitfield xics.c:172:25: error:

Re: [Qemu-devel] [PATCH] configure: Allow builds without any system or user emulation

2012-09-22 Thread Stefan Weil
Am 14.09.2012 19:02, schrieb Stefan Weil: The old code aborted configure when no emulation target was selected. Even after removing the 'exit 1', it tried to read from STDIN when QEMU was configured with configure' '--disable-user' '--disable-system' This is fixed here. Signed-off-by: Ste

Re: [Qemu-devel] [PATCH] audio: Fix warning from static code analysis

2012-09-22 Thread malc
On Sat, 22 Sep 2012, Stefan Weil wrote: > Am 03.09.2012 21:25, schrieb Stefan Weil: > > smatch report: > > audio/audio_template.h:416 AUD_open_out(18) warn: > > variable dereferenced before check 'as' (see line 414) > > > > Moving the ldebug statement after the statement which checks 'as' > > f

[Qemu-devel] [PATCH] tcg/mips: fix MIPS32(R2) detection

2012-09-22 Thread Aurelien Jarno
Fix the MIPS32(R2) cpu detection so that it also works with -march=octeon. Thanks to Andrew Pinski for the hint. Cc: Andrew Pinski Signed-off-by: Aurelien Jarno --- tcg/mips/tcg-target.c | 10 +- tcg/mips/tcg-target.h |8 2 files changed, 9 insertions(+), 9 deletions(-)

Re: [Qemu-devel] [PATCH] linux-user: Add naive implementation of capget() syscall

2012-09-22 Thread Erik de Castro Lopo
Blue Swirl wrote: > This is not correct. The structure needs to be converted field by > field to host native format, especially endianness. I'm working in a similar syscall implementation (POSIX timers) and I'm currently testing it in an debian armhf chroot running on my x86-64 laptop. After quit

[Qemu-devel] [Bug 1054812] [NEW] Configure uses wrong libtool on Darwin

2012-09-22 Thread C.W. Betts
Public bug reported: On Darwin/OS X, there are two versions of libtool: the GNU libtool, and Apple's libtool. Both are installed, but Apple's libtool (libtool) won't build libcacard that Qemu uses, but Gnu's libtool (glibtool) does. I get around using Apple's libtool by passing LIBTOOL=glibtool wh

Re: [Qemu-devel] [PATCH v2] virtio-blk: add default serial id

2012-09-22 Thread Dave Young
On Fri, Sep 21, 2012 at 08:15:38AM -0600, Eric Blake wrote: > On 09/21/2012 07:30 AM, Dave Young wrote: > > > > For virtio block device, if user does not specify the serial attribute, > > There will be no serial availabe, this is not convenient for identifying > > the disk. > > > > Doing somethin

Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect

2012-09-22 Thread Orit Wasserman
On 09/20/2012 06:16 PM, Amos Kong wrote: > - Original Message - >> On 09/19/2012 11:31 AM, Amos Kong wrote: >>> On 14/09/12 02:58, Orit Wasserman wrote: getaddrinfo can give us a list of addresses, but we only try to connect to the first one. If that fails we never proceed to

Re: [Qemu-devel] [PATCH] linux-user: Remove redundant null check and replace free by g_free

2012-09-22 Thread Stefan Hajnoczi
On Tue, Sep 04, 2012 at 10:14:19PM +0200, Stefan Weil wrote: > Report from smatch: > > linux-user/syscall.c:3632 do_ioctl_dm(220) info: > redundant null check on big_buf calling free() > > 'big_buf' was allocated by g_malloc0, therefore free was also > replaced by g_free. > > Signed-off-by: Ste

Re: [Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW)

2012-09-22 Thread Stefan Hajnoczi
On Sat, Sep 22, 2012 at 09:13:28PM +0200, Stefan Weil wrote: > Commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf removed a type cast > which is needed for MinGW: > > net/socket.c:136: warning: > pointer targets in passing argument 2 of ‘sendto’ differ in signedness > /usr/lib/gcc/amd64-mingw32msvc/

Re: [Qemu-devel] [PATCH] w32: Always use standard instead of native format strings

2012-09-22 Thread Stefan Hajnoczi
On Wed, Aug 22, 2012 at 09:42:32PM +0200, Stefan Weil wrote: > GLib 2.0 include files use __printf__ for the format attribute > which resolves to native format strings on w32 hosts. > > QEMU wants standard format strings instead of native format > strings, so we simply change any declaration with

[Qemu-devel] [PATCH] hw: Disable code after return statement

2012-09-22 Thread Stefan Weil
Report from smatch: microdrive.c:212 md_common_read(34) info: ignoring unreachable code. microdrive.c:273 md_common_write(33) info: ignoring unreachable code. sd.c:343 sd_req_crc_validate(9) info: ignoring unreachable code. Signed-off-by: Stefan Weil --- hw/ide/microdrive.c |3 ++- hw/sd.c

[Qemu-devel] [PATCH] hw: Fix return value check for bdrv_read, bdrv_write

2012-09-22 Thread Stefan Weil
Those functions return -errno in case of an error. The old code would typically only detect EPERM (1) errors. Signed-off-by: Stefan Weil --- hw/nand.c| 34 ++ hw/onenand.c |2 +- hw/sd.c | 16 +--- 3 files changed, 32 insertions(+), 20