Re: [Qemu-devel] apparently missing yet another notify_event()

2012-09-03 Thread Michael Tokarev
On 04.09.2012 10:53, Paolo Bonzini wrote: > Il 03/09/2012 20:13, Michael Tokarev ha scritto: [] >> qemu -nographic -kernel /boot/vmlinuz-$(uname -r) -append console=ttyS0 >> -serial pty >> >> This will hang with 100% CPU usage until something is sent >> to the pty. key is enough. [] > Could it

Re: [Qemu-devel] apparently missing yet another notify_event()

2012-09-03 Thread Paolo Bonzini
Il 03/09/2012 20:13, Michael Tokarev ha scritto: > There's a new bugreport filed against qemu-kvm in debian, > which looks very similar to what we already had before -- > https://bugs.launchpad.net/qemu/+bug/1021649 > which were fixed by adding qemu_notify_event() call. > Later on these qemu_notify

Re: [Qemu-devel] [PATCH 1/6] libqblock APIs

2012-09-03 Thread Paolo Bonzini
Il 04/09/2012 05:15, Wenchao Xia ha scritto: >> >> Can you use GError instead? >> > read through the GError doc, GError is defined as following: > struct GError { > GQuark domain; > gint code; > gchar *message; > }; > I am worried about the message member, I guess prog

Re: [Qemu-devel] [PATCH 1/6] libqblock APIs

2012-09-03 Thread Wenchao Xia
Thank u for the careful reviewing of my codes, I will write down the typo errors you mentioned on a note. On 09/03/2012 03:18 AM, Wenchao Xia wrote: This patch contains the major APIs in the library. Important APIs: 1 QBroker. These structure was used to retrieve errors, every thread

[Qemu-devel] [PATCH (stable, 1.2)] add missing pty_chr_update_read_handler() in qemu_chr_open_pty()

2012-09-03 Thread Michael Tokarev
Currently pty code does not register i/o handler properly, so that one have to "ping" the pty in order for qemu to work, or else it is sitting in main loop doing nothing and using 100% CPU. qemu -nographic -kernel /boot/vmlinuz-$(uname -r) -append console=ttyS0 -serial pty shows this nicely: th

Re: [Qemu-devel] boot device order has no effect for virtio-scsi devices

2012-09-03 Thread Paolo Bonzini
Il 04/09/2012 02:03, ching ha scritto: > i add boot order and the virtual machine still boot from hard disk instead of > cd-rom > > > > > > > > > > > > > > > > > > here is the captured command line gener

[Qemu-devel] [PATCH] target-cris: Fix buffer overflow

2012-09-03 Thread Stefan Weil
Report from smatch: target-cris/translate.c:3464 cpu_dump_state(32) error: buffer overflow 'env->sregs' 4 <= 255 sregs is declared 'uint32_t sregs[4][16]', so the first index must be less than 4. Signed-off-by: Stefan Weil --- I did not fix tabs, therefore checkpatch.pl reports an error. ta

[Qemu-devel] [PATCH] target-arm: Fix potential buffer overflow

2012-09-03 Thread Stefan Weil
Report from smatch: target-arm/helper.c:651 arm946_prbs_read(6) error: buffer overflow 'env->cp15.c6_region' 8 <= 8 target-arm/helper.c:661 arm946_prbs_write(6) error: buffer overflow 'env->cp15.c6_region' 8 <= 8 c7_region is an array with 8 elements, so the index must be less than 8. Signed-o

[Qemu-devel] [KVM][Kemari]:Kemari slows down the VM user experience

2012-09-03 Thread Harshita
Hello, As part of implementing Fault Tolerant solution, we are exploring Kemari. In the process of understanding it, we tested the branch "next" of git repository. It is working fine. But, once we trigger sync command, VM response is very slow for the actions performed. Observation:

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

2012-09-03 Thread Peter Crosthwaite
Thanks Stefan, Please enqueue to Trivial. Regards, Peter On Sat, Sep 1, 2012 at 7:12 PM, 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

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-03 Thread Alex Williamson
On Mon, 2012-09-03 at 18:59 +0300, Avi Kivity wrote: > On 08/29/2012 11:49 AM, Peter Maydell wrote: > > On 29 August 2012 09:47, Jan Kiszka wrote: > >> On 2012-08-28 23:26, Peter Maydell wrote: > >>> Since this is arch-specific we should probably give the > >>> resulting device a more specific nam

Re: [Qemu-devel] [PATCH 4/6] libqblock internal used functions

2012-09-03 Thread Wenchao Xia
于 2012-9-3 21:18, Paolo Bonzini 写道: Il 03/09/2012 11:18, Wenchao Xia ha scritto: This patch contains internal helper codes. Signed-off-by: Wenchao Xia --- block.c |2 +- block.h |1 + libqblock/libqblock-helper.c | 92 +

Re: [Qemu-devel] [PATCH 1/6] libqblock APIs

2012-09-03 Thread Wenchao Xia
于 2012-9-3 21:18, Paolo Bonzini 写道: Il 03/09/2012 11:18, Wenchao Xia ha scritto: 1 QBroker. These structure was used to retrieve errors, every thread must create one first, Later maybe thread related staff could be added into it. Can you use GError instead? read through the GError doc,

Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem

2012-09-03 Thread liu ping fan
On Mon, Sep 3, 2012 at 6:06 PM, liu ping fan wrote: > On Mon, Sep 3, 2012 at 4:52 PM, Avi Kivity wrote: >> On 09/03/2012 10:44 AM, liu ping fan wrote: > If we make the refcount/lock internal to the region, we must remove the opaque, since the region won't protect it.

Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem

2012-09-03 Thread liu ping fan
On Mon, Sep 3, 2012 at 6:16 PM, Avi Kivity wrote: > On 09/03/2012 01:06 PM, liu ping fan wrote: >> On Mon, Sep 3, 2012 at 4:52 PM, Avi Kivity wrote: >>> On 09/03/2012 10:44 AM, liu ping fan wrote: >> > > If we make the refcount/lock internal to the region, we must remove the > opa

Re: [Qemu-devel] [RESEND] [PATCH] Properly use backing file argument to qemu-img convert

2012-09-03 Thread Brad Campbell
On 03/09/12 22:23, Andreas Färber wrote: Am 03.09.2012 09:46, schrieb Brad Campbell: Converting to an image with an output backing file would write out the contents of the source image whether or not it was already contained in the new backing file. This commit ensures that the source fil

Re: [Qemu-devel] [PATCH 2/6] libqblock public type defines

2012-09-03 Thread Wenchao Xia
于 2012-9-3 21:13, Paolo Bonzini 写道: Il 03/09/2012 11:18, Wenchao Xia ha scritto: +union QBlockOption_fmt { +struct QBlockOption_fmt_cow o_cow; +struct QBlockOption_fmt_qed o_qed; +struct QBlockOption_fmt_qcow o_qcow; +struct QBlockOption_fmt_qcow2 o_qcow2; +

Re: [Qemu-devel] boot device order has no effect for virtio-scsi devices

2012-09-03 Thread ching
On 09/03/2012 04:24 PM, Paolo Bonzini wrote: > Il 03/09/2012 00:23, ching ha scritto: >> have anyone tested the boot order of virtio-scsi devices? >> >> >> hvm >> >> >> >> >> >> >> i try to set the boot order with scsi cd-rom first, then scsi harddisk >> >> but the virtual ma

Re: [Qemu-devel] [PATCH 01/21] target-s390x: fix style

2012-09-03 Thread Alexander Graf
On 03.09.2012, at 15:10, Blue Swirl wrote: > On Mon, Sep 3, 2012 at 4:31 AM, Alexander Graf wrote: >> >> On 02.09.2012, at 13:33, Blue Swirl wrote: >> >>> Before splitting op_helper.c and helper.c in the next patches, >>> fix style issues. No functional changes. >>> >>> Replace also GCC spe

Re: [Qemu-devel] [PATCH] hw/wm8750: Fix potential buffer overflow

2012-09-03 Thread Peter Maydell
On 3 September 2012 21:56, Stefan Weil wrote: > Report from smatch: > > hw/wm8750.c:369 wm8750_tx(12) error: buffer overflow 's->i2c_data' 2 <= 2 > > It looks like the preprocessor statements were simply misplaced. > > Replace also __FUNCTION__ by __func__ to please checkpatch.pl. > > Signed-off-b

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

2012-09-03 Thread Peter Maydell
On 3 September 2012 21:40, Stefan Weil wrote: > Report from smatch: > > kvm-all.c:1373 kvm_init(135) warn: > variable dereferenced before check 's' (see line 1360) > > 's' cannot by NULL (it was alloced using g_malloc0), so there is no need > to check it here. > > Signed-off-by: Stefan Weil Rev

Re: [Qemu-devel] [PATCH] slirp: Fix error reported by static code analysis and remove wrong type casts

2012-09-03 Thread Peter Maydell
On 3 September 2012 21:34, Stefan Weil wrote: > Report from smatch: > slirp/tcp_subr.c:127 tcp_respond(17) error: > we previously assumed 'tp' could be null (see line 124) > > Fix this by checking 'tp' before reading its elements. > > The type casts of pointers to long are not related to the smat

[Qemu-devel] [PATCH] hw/wm8750: Fix potential buffer overflow

2012-09-03 Thread Stefan Weil
Report from smatch: hw/wm8750.c:369 wm8750_tx(12) error: buffer overflow 's->i2c_data' 2 <= 2 It looks like the preprocessor statements were simply misplaced. Replace also __FUNCTION__ by __func__ to please checkpatch.pl. Signed-off-by: Stefan Weil --- hw/wm8750.c |4 ++-- 1 file changed,

Re: [Qemu-devel] [PATCH] json-parser: Fix potential NULL pointer segfault

2012-09-03 Thread Luiz Capitulino
On Mon, 3 Sep 2012 21:19:11 +0200 Stefan Weil wrote: > Report from smatch: > json-parser.c:474 parse_object(62) error: potential null derefence 'dict'. > json-parser.c:553 parse_array(75) error: potential null derefence 'list'. > > Label 'out' in json-parser.c can be called with list == NULL >

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

2012-09-03 Thread Stefan Weil
Report from smatch: kvm-all.c:1373 kvm_init(135) warn: variable dereferenced before check 's' (see line 1360) 's' cannot by NULL (it was alloced using g_malloc0), so there is no need to check it here. Signed-off-by: Stefan Weil --- kvm-all.c | 12 +--- 1 file changed, 5 insertions(+

[Qemu-devel] [PATCH] slirp: Fix error reported by static code analysis and remove wrong type casts

2012-09-03 Thread Stefan Weil
Report from smatch: slirp/tcp_subr.c:127 tcp_respond(17) error: we previously assumed 'tp' could be null (see line 124) Fix this by checking 'tp' before reading its elements. The type casts of pointers to long are not related to the smatch report but happened to be near that code. Those type cas

[Qemu-devel] [PATCH] sparc-dis: Remove redundant NULL check

2012-09-03 Thread Stefan Weil
Report from smatch: sparc-dis.c:2664 build_hash_table(14) info: redundant null check on hash_buf calling free() Signed-off-by: Stefan Weil --- Coding style was not fixed. - sw sparc-dis.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sparc-dis.c b/sparc-dis.c index

Re: [Qemu-devel] [PATCH 16/21] target-arm: switch to AREG0 free mode

2012-09-03 Thread Peter Maydell
On 3 September 2012 21:10, Blue Swirl wrote: > On Mon, Sep 3, 2012 at 7:54 PM, Peter Maydell > wrote: >> I don't want the *file* split, I'd just like to see this *patch* >> as 4 or 5 separate patches, not one big one. > > While converting, it's easier to work on whole files but maybe the > resul

[Qemu-devel] [PATCH] ide: Fix error messages from static code analysis (no real error)

2012-09-03 Thread Stefan Weil
Report from smatch: hw/ide/core.c:1472 ide_exec_cmd(423) error: buffer overflow 'smart_attributes' 8 <= 29 hw/ide/core.c:1474 ide_exec_cmd(425) error: buffer overflow 'smart_attributes' 8 <= 29 hw/ide/core.c:1475 ide_exec_cmd(426) error: buffer overflow 'smart_attributes' 8 <= 29 ... The upper

Re: [Qemu-devel] [PATCH 16/21] target-arm: switch to AREG0 free mode

2012-09-03 Thread Blue Swirl
On Mon, Sep 3, 2012 at 7:54 PM, Peter Maydell wrote: > On 3 September 2012 19:58, Blue Swirl wrote: >> On Mon, Sep 3, 2012 at 12:03 AM, Peter Maydell >> wrote: >>> On 3 September 2012 01:01, Peter Maydell wrote: >>> That's quite hard to cross-reference when the patch is this big. >>> I think i

Re: [Qemu-devel] [PATCH 16/21] target-arm: switch to AREG0 free mode

2012-09-03 Thread Peter Maydell
On 3 September 2012 19:58, Blue Swirl wrote: > On Mon, Sep 3, 2012 at 12:03 AM, Peter Maydell > wrote: >> On 3 September 2012 01:01, Peter Maydell wrote: >> That's quite hard to cross-reference when the patch is this big. >> I think it would be helpful if you could split it up into patches >> t

Re: [Qemu-devel] [PATCH 20/21] target-mips: switch to AREG0 free mode

2012-09-03 Thread Aurelien Jarno
On Mon, Sep 03, 2012 at 07:15:29PM +, Blue Swirl wrote: > On Mon, Sep 3, 2012 at 3:50 PM, Aurelien Jarno wrote: > > On Sun, Sep 02, 2012 at 05:33:49PM +, Blue Swirl wrote: > >> Add an explicit CPUState parameter instead of relying on AREG0 > >> and switch to AREG0 free mode. > >> > >> Sign

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-03 Thread Blue Swirl
On Mon, Sep 3, 2012 at 4:14 PM, Avi Kivity wrote: > On 08/29/2012 11:27 AM, Markus Armbruster wrote: >> >> I don't see a point in making contributors avoid non-problems that might >> conceivably become trivial problems some day. Especially when there's >> no automated help with the avoiding. > >

Re: [Qemu-devel] [PATCH 2/6] libqblock public type defines

2012-09-03 Thread Blue Swirl
On Mon, Sep 3, 2012 at 9:18 AM, Wenchao Xia wrote: > This patch contains public type and defines used in APIs. > > Signed-off-by: Wenchao Xia > --- > libqblock/libqblock-types.h | 228 > +++ > 1 files changed, 228 insertions(+), 0 deletions(-) > creat

Re: [Qemu-devel] [PATCH 5/6] libqblock test example

2012-09-03 Thread Blue Swirl
On Mon, Sep 3, 2012 at 9:18 AM, Wenchao Xia wrote: > In this example, user first create two qcow2 images, and then get the > backing file relationship information of them. Then does write and read > sync IO on them. > > Signed-off-by: Wenchao Xia > --- > tests/libqblock/libqblock-test.c | 219

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

2012-09-03 Thread 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 fails when checked by checkpatch.pl because it

Re: [Qemu-devel] [PATCH 1/6] libqblock APIs

2012-09-03 Thread Blue Swirl
On Mon, Sep 3, 2012 at 9:18 AM, Wenchao Xia wrote: > This patch contains the major APIs in the library. > Important APIs: > 1 QBroker. These structure was used to retrieve errors, every thread must > create one first, Later maybe thread related staff could be added into it. > 2 QBlockState.

[Qemu-devel] [PATCH] json-parser: Fix potential NULL pointer segfault

2012-09-03 Thread Stefan Weil
Report from smatch: json-parser.c:474 parse_object(62) error: potential null derefence 'dict'. json-parser.c:553 parse_array(75) error: potential null derefence 'list'. Label 'out' in json-parser.c can be called with list == NULL which is passed to QDECREF. Modify QDECREF to handle a NULL argumen

Re: [Qemu-devel] [PATCH 20/21] target-mips: switch to AREG0 free mode

2012-09-03 Thread Blue Swirl
On Mon, Sep 3, 2012 at 3:50 PM, Aurelien Jarno wrote: > On Sun, Sep 02, 2012 at 05:33:49PM +, Blue Swirl wrote: >> Add an explicit CPUState parameter instead of relying on AREG0 >> and switch to AREG0 free mode. >> >> Signed-off-by: Blue Swirl >> --- >> configure |2 +- >>

Re: [Qemu-devel] [PATCH 16/21] target-arm: switch to AREG0 free mode

2012-09-03 Thread Blue Swirl
On Mon, Sep 3, 2012 at 12:03 AM, Peter Maydell wrote: > On 3 September 2012 01:01, Peter Maydell wrote: >> On 2 September 2012 18:33, Blue Swirl wrote: >>> Add an explicit CPUState parameter instead of relying on AREG0 >>> and switch to AREG0 free mode. >>> >>> Signed-off-by: Blue Swirl >>> ---

Re: [Qemu-devel] [PATCH 19/21] target-sh4: switch to AREG0 free mode

2012-09-03 Thread Blue Swirl
On Sun, Sep 2, 2012 at 11:42 PM, Aurelien Jarno wrote: > On Sun, Sep 02, 2012 at 05:33:48PM +, Blue Swirl wrote: >> Add an explicit CPUState parameter instead of relying on AREG0 >> and switch to AREG0 free mode. >> >> Signed-off-by: Blue Swirl >> --- >> configure|2 +- >>

Re: [Qemu-devel] [Spice-devel] [PATCH 3/5] Process outstanding commands in the ring after changing capability bits

2012-09-03 Thread Alon Levy
> From: Søren Sandmann Pedersen > > When a new client connects, there may be commands in the ring that it > can't understand, so we need to process these before forwarding new > commands to the client. By doing this after changing the capability > bits we ensure that the new client will never see

Re: [Qemu-devel] [PATCH] qxl: Add set_client_capabilities() interface to QXLInterface

2012-09-03 Thread Alon Levy
> From: Søren Sandmann Pedersen > > This new interface lets spice server inform the guest whether > > (a) a client is connected > (b) what capabilities the client has > > There is a fixed number (464) of bits reserved for capabilities, and > when the capabilities bits change, the QXL_INTERRUPT_

[Qemu-devel] apparently missing yet another notify_event()

2012-09-03 Thread Michael Tokarev
There's a new bugreport filed against qemu-kvm in debian, which looks very similar to what we already had before -- https://bugs.launchpad.net/qemu/+bug/1021649 which were fixed by adding qemu_notify_event() call. Later on these qemu_notify_event() calls become unnecessary as far as I remember. Bu

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

2012-09-03 Thread Luiz Capitulino
On Mon, 03 Sep 2012 19:02:20 +0200 Stefan Weil wrote: > Am 03.09.2012 18:49, schrieb Luiz Capitulino: > > On Sat, 1 Sep 2012 09:34:15 +0200 > > Stefan Weil wrote: > > > >> Report from smatch: > >> qemu-ga.c:117 register_signal_handlers(11) info: ignoring unreachable code. > >> qemu-ga.c:122 reg

Re: [Qemu-devel] [PATCH] json-parser: Fix potential NULL pointer segfault

2012-09-03 Thread Luiz Capitulino
On Mon, 03 Sep 2012 19:14:27 +0200 Stefan Weil wrote: > Am 03.09.2012 18:53, schrieb Stefan Weil: > > Am 03.09.2012 18:41, schrieb Luiz Capitulino: > >> On Sat, 1 Sep 2012 12:52:58 +0200 > >> Stefan Weil wrote: > >> > >>> Report from smatch: > >>> json-parser.c:474 parse_object(62) error: poten

[Qemu-devel] [PATCH 4/5] Set a8 capability in the QXL device if supported by the client

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen --- server/red_worker.c |2 ++ spice-common|2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index f87967c..17d9ef8 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -10377,6 +

[Qemu-devel] [PATCH 3/5] Process outstanding commands in the ring after changing capability bits

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen When a new client connects, there may be commands in the ring that it can't understand, so we need to process these before forwarding new commands to the client. By doing this after changing the capability bits we ensure that the new client will never see a command t

[Qemu-devel] [PATCH 1/5] client: Advertise A8_SURFACE capability

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen --- client/display_channel.cpp |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/client/display_channel.cpp b/client/display_channel.cpp index d08072d..49a4c6a 100644 --- a/client/display_channel.cpp +++ b/client/display_channel.cpp @@ -652,6

[Qemu-devel] [PATCH 5/5] Bump spice.h version number to 0.11.4

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen No new symbols are added, but there is an addition to QXLInterface: void (*set_client_capabilities)(QXLInstance *qin, uint8_t client_present, uint8_t caps[58]); --- server/spice.h |2 +-

[Qemu-devel] [PATCH 2/5] Add new set_client_capabilities() interface to QXLInstance

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen A new interface set_client_capabilities (QXLInstance *qin, uint8_t client_present, uint8_t caps[58]); is added to QXLInstance, and spice server is changed to call it whenever a client connects or disconnects.

Re: [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client

2012-09-03 Thread Søren Sandmann
Søren Sandmann writes: > Alon Levy writes: > >>> --- >>> server/red_worker.c | 2 ++ >>> spice-common| 2 +- >>> 2 files changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/server/red_worker.c b/server/red_worker.c >>> index 843f559..23f3464 100644 >>> --- a/server/red_worker.

[Qemu-devel] [PATCH] qxl: Add set_client_capabilities() interface to QXLInterface

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen This new interface lets spice server inform the guest whether (a) a client is connected (b) what capabilities the client has There is a fixed number (464) of bits reserved for capabilities, and when the capabilities bits change, the QXL_INTERRUPT_CLIENT interrupt i

Re: [Qemu-devel] [Spice-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface

2012-09-03 Thread Søren Sandmann
Søren Sandmann Pedersen writes: > @@ -1292,7 +1315,7 @@ static void qxl_set_mode(PCIQXLDevice *d, int modenr, > int loadvm) > > d->mode = QXL_MODE_COMPAT; > d->cmdflags = QXL_COMMAND_FLAG_COMPAT; > -#ifdef QXL_COMMAND_FLAG_COMPAT_16BPP /* new in spice 0.6.1 */ > +#if QXL_COMMAND_FLAG

Re: [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client

2012-09-03 Thread Søren Sandmann
Alon Levy writes: >> --- >> server/red_worker.c | 2 ++ >> spice-common| 2 +- >> 2 files changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/server/red_worker.c b/server/red_worker.c >> index 843f559..23f3464 100644 >> --- a/server/red_worker.c >> +++ b/server/red_worker.c >> @@

Re: [Qemu-devel] [PATCH] json-parser: Fix potential NULL pointer segfault

2012-09-03 Thread Stefan Weil
Am 03.09.2012 18:53, schrieb Stefan Weil: Am 03.09.2012 18:41, schrieb Luiz Capitulino: On Sat, 1 Sep 2012 12:52:58 +0200 Stefan Weil wrote: Report from smatch: json-parser.c:474 parse_object(62) error: potential null derefence 'dict'. json-parser.c:553 parse_array(75) error: potential null

[Qemu-devel] [PATCH V7 8/8] hw/dma.c: replace register_ioport*

2012-09-03 Thread Julien Grall
This patch replaces all register_ioport* be the new memory API functions. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/dma.c | 108 + 1 files changed, 72 insertions(+), 36 deletions(-) diff

Re: [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cURL and SDL

2012-09-03 Thread Yann E. MORIN
Peter, All, On Monday 03 September 2012 18:38:48 Peter Maydell wrote: > On 3 September 2012 17:28, Yann E. MORIN wrote: > > On Monday 03 September 2012 17:44:51 Peter Maydell wrote: > >> Personally I think it might indeed be a good idea to just say > >> "statically linked softmmu isn't supported"

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

2012-09-03 Thread Stefan Weil
Am 03.09.2012 18:49, schrieb Luiz Capitulino: On Sat, 1 Sep 2012 09:34:15 +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 w

[Qemu-devel] [PATCH V7 1/8] isa: add isa_address_space_io

2012-09-03 Thread Julien Grall
This function permits to retrieve ISA IO address space. It will be usefull when we need to pass IO address space as argument. Signed-off-by: Julien Grall --- hw/isa-bus.c |9 + hw/isa.h |1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/isa-bus.c b/hw/is

[Qemu-devel] [PATCH V7 7/8] hw/pc.c: replace register_ioport*

2012-09-03 Thread Julien Grall
This patch replaces all register_ioport* with portio_* or isa_register_portio_list. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/pc.c | 58 +++--- 1 files changed, 43 insertions(+), 15 deletions(-)

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Paolo Bonzini
Il 03/09/2012 18:40, Jan Kiszka ha scritto: >>> >> And the migration fails. Needlessly, since icw3 == 0 doesn't affect >>> >> guest operation. >> > >> > But the point of subsections is to succeed migration in the common case, >> > assuming there is more than one case that doesn't affect guest ope

Re: [Qemu-devel] [PATCH] json-parser: Fix potential NULL pointer segfault

2012-09-03 Thread Stefan Weil
Am 03.09.2012 18:41, schrieb Luiz Capitulino: On Sat, 1 Sep 2012 12:52:58 +0200 Stefan Weil wrote: Report from smatch: json-parser.c:474 parse_object(62) error: potential null derefence 'dict'. json-parser.c:553 parse_array(75) error: potential null derefence 'list'. Label out can be called

Re: [Qemu-devel] [PATCH] qapi: Fix potential NULL pointer segfault

2012-09-03 Thread Luiz Capitulino
On Mon, 03 Sep 2012 18:49:54 +0200 Stefan Weil wrote: > Am 03.09.2012 18:34, schrieb Luiz Capitulino: > > On Mon, 03 Sep 2012 08:57:36 +0200 > > Paolo Bonzini wrote: > > > >> Il 01/09/2012 09:30, Stefan Weil ha scritto: > >>> Report from smatch: > >>> > >>> qapi-visit.c:1640 visit_type_BlockdevA

Re: [Qemu-devel] [PATCH] qapi: Fix potential NULL pointer segfault

2012-09-03 Thread Stefan Weil
Am 03.09.2012 18:34, schrieb Luiz Capitulino: On Mon, 03 Sep 2012 08:57:36 +0200 Paolo Bonzini wrote: Il 01/09/2012 09:30, Stefan Weil ha scritto: Report from smatch: qapi-visit.c:1640 visit_type_BlockdevAction(8) error: we previously assumed 'obj' could be null (see line 1639) qapi-visit.

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Jan Kiszka
On 2012-09-03 18:33, Paolo Bonzini wrote: > Il 03/09/2012 18:30, Avi Kivity ha scritto: >> The values above are what every user of the PIC cascaded on our targets >> must program to use them. So We will find them in the state once any >> relevant guest code was able to run (e.g.

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

2012-09-03 Thread Luiz Capitulino
On Sat, 1 Sep 2012 09:34:15 +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. > > Signe

[Qemu-devel] [PATCH V7 6/8] hw/serial.c: replace register_ioport*

2012-09-03 Thread Julien Grall
This patch replaces all register_ioport* with a MemoryRegion. It permits to use the new Memory stuff like listener. For more flexibility, the IO address space is passed as an argument. Signed-off-by: Julien Grall --- hw/mips_mipssim.c |3 ++- hw/pc.h |2 +- hw/serial.c |

[Qemu-devel] [PATCH V7 5/8] hw/cirrus_vga.c: replace register_ioport*

2012-09-03 Thread Julien Grall
This patch replaces all register_ioport* with portio_*. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/cirrus_vga.c | 50 ++ 1 files changed, 30 insertions(+), 20 deletions(-) diff --git a/hw/cirrus_vga.

[Qemu-devel] [PATCH V7 4/8] hw/acpi_piix4.c: replace register_ioport*

2012-09-03 Thread Julien Grall
This patch replaces all register_ioport* with the new memory API. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/acpi_piix4.c | 151 +++ 1 files changed, 119 insertions(+), 32 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Paolo Bonzini
Il 03/09/2012 18:30, Avi Kivity ha scritto: > The values above are what every user of the PIC cascaded on our targets > >>> > must program to use them. So We will find them in the state once any > >>> > relevant guest code was able to run (e.g. the BIOS). > >>> > >>> >> Suppose the

Re: [Qemu-devel] [PATCH] qapi: Fix potential NULL pointer segfault

2012-09-03 Thread Luiz Capitulino
On Mon, 03 Sep 2012 08:57:36 +0200 Paolo Bonzini wrote: > Il 01/09/2012 09:30, Stefan Weil ha scritto: > > Report from smatch: > > > > qapi-visit.c:1640 visit_type_BlockdevAction(8) error: > > we previously assumed 'obj' could be null (see line 1639) > > qapi-visit.c:2432 visit_type_NetClientOp

[Qemu-devel] [PATCH V7 3/8] smb: replace_register_ioport*

2012-09-03 Thread Julien Grall
This patch fix smb_ioport_* to be compliant with read/write memory callback. Moreover it replaces all register_ioport* which use theses functions by the new Memory API. Signed-off-by: Julien Grall --- hw/acpi_piix4.c | 18 -- hw/pm_smbus.c |7 --- hw/pm_smbus.h |

Re: [Qemu-devel] [PATCH] json-parser: Fix potential NULL pointer segfault

2012-09-03 Thread Luiz Capitulino
On Sat, 1 Sep 2012 12:52:58 +0200 Stefan Weil wrote: > Report from smatch: > json-parser.c:474 parse_object(62) error: potential null derefence 'dict'. > json-parser.c:553 parse_array(75) error: potential null derefence 'list'. > > Label out can be called with list == NULL. > > Signed-off-by:

Re: [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cURL and SDL

2012-09-03 Thread Peter Maydell
On 3 September 2012 17:28, Yann E. MORIN wrote: > On Monday 03 September 2012 17:44:51 Peter Maydell wrote: >> Personally I think it might indeed be a good idea to just say >> "statically linked softmmu isn't supported" and forbid it, unless >> somebody has a good use case for it... > > I personna

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Avi Kivity
On 09/03/2012 07:23 PM, Paolo Bonzini wrote: > Il 03/09/2012 18:15, Avi Kivity ha scritto: >>> > The values above are what every user of the PIC cascaded on our targets >>> > must program to use them. So We will find them in the state once any >>> > relevant guest code was able to run (e.g. the BIO

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Jan Kiszka
On 2012-09-03 18:15, Avi Kivity wrote: > On 09/03/2012 07:02 PM, Jan Kiszka wrote: > > Looks like the optimal condition is ((s->icw3 & ~s->eclr) != 0) (i.e. > bit set in icw3 but clear in eclr). The standard PC values are optimal: 4 for master, 2 for slave. >>> >>> Can you explai

Re: [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cURL and SDL

2012-09-03 Thread Yann E. MORIN
Hello All, On Monday 03 September 2012 17:44:51 Peter Maydell wrote: > On 3 September 2012 16:41, Andreas Färber wrote: > > The only use case for QEMU's --static compilation I know is linux-user, > > and that doesn't need cURL or SDL AFAIK. Shouldn't we rather sanitize > > our configure-time chec

[Qemu-devel] [PATCH V7 2/8] hw/apm.c: replace register_ioport*

2012-09-03 Thread Julien Grall
This patch replaces all register_ioport* by a MemorySection. It permits to use the new Memory stuff like listener. Moreover, the PCI is added as an argument for apm_init, so we can register IO inside the pci IO address space. Signed-off-by: Julien Grall --- hw/acpi_piix4.c |2 +- hw/apm.c

[Qemu-devel] [PATCH V7 0/8] memory: unify ioport registration

2012-09-03 Thread Julien Grall
This is the seventh version of patch series about ioport registration. Some part of QEMU still use register_ioport* functions to register ioport. These functions doesn't allow to use Memory Listener on it. Modifications between V1 and V2: - Remove the use of get_system_io. Instead of use isa a

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Paolo Bonzini
Il 03/09/2012 18:15, Avi Kivity ha scritto: >> > The values above are what every user of the PIC cascaded on our targets >> > must program to use them. So We will find them in the state once any >> > relevant guest code was able to run (e.g. the BIOS). >> > > Suppose the bios has not run yet? The

Re: [Qemu-devel] [PATCH 2/6] monitor: Adjust qmp_human_monitor_command to new MemCharDriver

2012-09-03 Thread Luiz Capitulino
On Tue, 04 Sep 2012 00:14:03 +0800 Lei Li wrote: > On 08/31/2012 02:51 AM, Luiz Capitulino wrote: > > On Thu, 23 Aug 2012 13:14:22 +0800 > > Lei Li wrote: > > > >> Signed-off-by: Lei Li > >> --- > >> monitor.c |8 +++- > >> 1 files changed, 7 insertions(+), 1 deletions(-) > >> > >> d

Re: [Qemu-devel] [PATCH 2/6] monitor: Adjust qmp_human_monitor_command to new MemCharDriver

2012-09-03 Thread Lei Li
On 08/31/2012 02:51 AM, Luiz Capitulino wrote: On Thu, 23 Aug 2012 13:14:22 +0800 Lei Li wrote: Signed-off-by: Lei Li --- monitor.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index 480f583..ab4650b 100644 --- a/monitor.c +++ b/moni

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Avi Kivity
On 09/03/2012 07:02 PM, Jan Kiszka wrote: Looks like the optimal condition is ((s->icw3 & ~s->eclr) != 0) (i.e. bit set in icw3 but clear in eclr). >>> >>> The standard PC values are optimal: 4 for master, 2 for slave. >> >> Can you explain why? I saw that icw3 is always ORed with eclr

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-03 Thread Avi Kivity
On 08/29/2012 11:27 AM, Markus Armbruster wrote: > > I don't see a point in making contributors avoid non-problems that might > conceivably become trivial problems some day. Especially when there's > no automated help with the avoiding. -Wpointer-arith -- error compiling committee.c: too man

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-03 Thread Avi Kivity
On 08/28/2012 03:30 AM, Jan Kiszka wrote: >> >> Maybe add case 8: and default: with abort(), also below. > > PIO is never 8 bytes long, the generic layer protects us. Note: eventually the pio space will be mapped directly to mmio (instead of being bounced via cpu_inb() in the bridge's mmio handl

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Jan Kiszka
On 2012-09-03 17:57, Avi Kivity wrote: > On 09/03/2012 06:54 PM, Jan Kiszka wrote: >> On 2012-09-03 17:52, Avi Kivity wrote: >>> On 09/03/2012 06:42 PM, Juan Quintela wrote: Avi Kivity wrote: > On 09/03/2012 11:40 AM, Andreas Färber wrote: >> Am 03.09.2012 04:56, schrieb Matthew Ogilv

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-03 Thread Avi Kivity
On 08/29/2012 11:49 AM, Peter Maydell wrote: > On 29 August 2012 09:47, Jan Kiszka wrote: >> On 2012-08-28 23:26, Peter Maydell wrote: >>> Since this is arch-specific we should probably give the >>> resulting device a more specific name than "pci-assign", >>> which implies that it is (a) ok for an

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Avi Kivity
On 09/03/2012 06:54 PM, Jan Kiszka wrote: > On 2012-09-03 17:52, Avi Kivity wrote: >> On 09/03/2012 06:42 PM, Juan Quintela wrote: >>> Avi Kivity wrote: On 09/03/2012 11:40 AM, Andreas Färber wrote: > Am 03.09.2012 04:56, schrieb Matthew Ogilvie: >> diff --git a/hw/i8259_common.c b/hw

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Jan Kiszka
On 2012-09-03 17:52, Avi Kivity wrote: > On 09/03/2012 06:42 PM, Juan Quintela wrote: >> Avi Kivity wrote: >>> On 09/03/2012 11:40 AM, Andreas Färber wrote: Am 03.09.2012 04:56, schrieb Matthew Ogilvie: > diff --git a/hw/i8259_common.c b/hw/i8259_common.c > index ab3d98b..dcde5f2 1006

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Avi Kivity
On 09/03/2012 06:42 PM, Juan Quintela wrote: > Avi Kivity wrote: >> On 09/03/2012 11:40 AM, Andreas Färber wrote: >>> Am 03.09.2012 04:56, schrieb Matthew Ogilvie: diff --git a/hw/i8259_common.c b/hw/i8259_common.c index ab3d98b..dcde5f2 100644 --- a/hw/i8259_common.c +++ b/hw/

Re: [Qemu-devel] [PATCH 20/21] target-mips: switch to AREG0 free mode

2012-09-03 Thread Aurelien Jarno
On Sun, Sep 02, 2012 at 05:33:49PM +, Blue Swirl wrote: > Add an explicit CPUState parameter instead of relying on AREG0 > and switch to AREG0 free mode. > > Signed-off-by: Blue Swirl > --- > configure |2 +- > target-mips/Makefile.objs |2 - > target-mips/cpu.h

Re: [Qemu-devel] [PATCH for-1.2] use --libexecdir instead of ignoring it first and reinventing it later

2012-09-03 Thread Andreas Färber
Am 16.08.2012 16:46, schrieb Andreas Färber: > Am 06.06.2012 23:11, schrieb Michael Tokarev: >> Commit 7b93fadf3a38d1ed65ea5536a52efc2772c6e3b8 "Add basic version >> of bridge helper" put the bridge helper executable into a fixed >> ${prefix}/libexec/ location, instead of using ${libexecdir} for >>

Re: [Qemu-devel] [PATCH for 1.2] qemu-timer: properly arm alarm timer for timers set by device initialization

2012-09-03 Thread Aurelien Jarno
On Mon, Sep 03, 2012 at 05:34:32PM +0200, Paolo Bonzini wrote: > QEMU will hang when fed the following command-line > > qemu-system-mips -kernel vmlinux-2.6.32-5-4kc-malta -append "console=ttyS0" > -nographic -net none > > The -net none is important otherwise it seems some events are generated

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Jan Kiszka
On 2012-09-03 17:42, Juan Quintela wrote: > Avi Kivity wrote: >> On 09/03/2012 11:40 AM, Andreas Färber wrote: >>> Am 03.09.2012 04:56, schrieb Matthew Ogilvie: diff --git a/hw/i8259_common.c b/hw/i8259_common.c index ab3d98b..dcde5f2 100644 --- a/hw/i8259_common.c +++ b/hw/i82

Re: [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cURL and SDL

2012-09-03 Thread Peter Maydell
On 3 September 2012 16:41, Andreas Färber wrote: > The only use case for QEMU's --static compilation I know is linux-user, > and that doesn't need cURL or SDL AFAIK. Shouldn't we rather sanitize > our configure-time checks to only look for the actually needed stuff > than making sure that unnecess

Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register

2012-09-03 Thread Juan Quintela
Avi Kivity wrote: > On 09/03/2012 11:40 AM, Andreas Färber wrote: >> Am 03.09.2012 04:56, schrieb Matthew Ogilvie: >>> diff --git a/hw/i8259_common.c b/hw/i8259_common.c >>> index ab3d98b..dcde5f2 100644 >>> --- a/hw/i8259_common.c >>> +++ b/hw/i8259_common.c >> [...] >>> @@ -111,6 +112,7 @@ stati

Re: [Qemu-devel] [PATCH for 1.2] qemu-timer: properly arm alarm timer for timers set by device initialization

2012-09-03 Thread Jan Kiszka
On 2012-09-03 17:34, Paolo Bonzini wrote: > QEMU will hang when fed the following command-line > > qemu-system-mips -kernel vmlinux-2.6.32-5-4kc-malta -append "console=ttyS0" > -nographic -net none > > The -net none is important otherwise it seems some events are generated > causing the things

Re: [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cURL and SDL

2012-09-03 Thread Andreas Färber
Hello, Am 02.09.2012 15:09, schrieb Yann E. MORIN: > Currently, configure checks for cURL and SDL with either pkg-config (the > default), or with {curl,sdl}-config (as a fallback). > > But pkg-config and {curl,sdl}-config do not have the same set of options: > - to check for shared libs, both u

[Qemu-devel] [PATCH for 1.2] qemu-timer: properly arm alarm timer for timers set by device initialization

2012-09-03 Thread Paolo Bonzini
QEMU will hang when fed the following command-line qemu-system-mips -kernel vmlinux-2.6.32-5-4kc-malta -append "console=ttyS0" -nographic -net none The -net none is important otherwise it seems some events are generated causing the things to work. When it doesn't work, the guest hangs when mea

  1   2   >