[Qemu-devel] [PULL v2 10/27] qapi: Improve a QObject input visitor error message

2017-03-05 Thread Markus Armbruster
The QObject input visitor has three error message formats: * Parameter '%s' is missing * "Invalid parameter type for '%s', expected: %s" * "QMP input object member '%s' is unexpected" The '%s' are member names (or "null", but I'll fix that later). The last error message calls the thing "QMP

[Qemu-devel] [PULL v2 25/27] tests: Cover input visit beyond end of list

2017-03-05 Thread Markus Armbruster
When you try to visit beyond the end of a list, the qobject input visitor crashes, and the string visitor screws returns garbage. The generated list visits never go beyond the list end, but manual visits could. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake

[Qemu-devel] [PULL v2 00/27] QAPI patches for 2017-02-28

2017-03-05 Thread Markus Armbruster
The following changes since commit 17783ac828adc694d986698d2d7014aedfeb48c6: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170303' into staging (2017-03-04 16:31:14 +) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2017-02-28

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-05 Thread Alex Bennée
Alexander Boettcher writes: > Hello, > > beginning with commit 3bd1d74576bacb120949e13cdeded7a0c792c685 > > "cputlb: introduce tlb_flush_* async work" > > using Qemu with SoftMMU+SVM virtualization deadlocks because tb_lock is > taken second time in cputlb.c

[Qemu-devel] [PATCH 2/2] char: Remove confusing mix of assignment with local variables

2017-03-05 Thread Krzysztof Kozlowski
The assignment under pointed offset was put next to declaration of local variables. This might be quite confusing as the assignment looks like duplicated declaration of offset variable. Signed-off-by: Krzysztof Kozlowski --- chardev/char.c | 1 + 1 file changed, 1 insertion(+)

[Qemu-devel] [PATCH 1/2] char: Constify data pointed by few arguments and local variables

2017-03-05 Thread Krzysztof Kozlowski
In few places the function arguments and local variables are not modifying data passed through pointers so this can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- chardev/char.c| 18 +- include/sysemu/char.h | 2 +- 2 files

[Qemu-devel] [PATCH] qdev: Constify data pointed by few arguments and local variables

2017-03-05 Thread Krzysztof Kozlowski
In few places the function arguments and local variables are not modifying data passed through pointers so this can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- hw/core/qdev-properties-system.c | 6 +++--- hw/core/qdev-properties.c| 7

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/arm/exynos: Convert fprintf to error_report()

2017-03-05 Thread Philippe Mathieu-Daudé
Hi Krzysztof, On 03/05/2017 06:48 PM, Krzysztof Kozlowski wrote: error_report() is preferred over fprintf() for logging errors. Also remove square brackets [] and additional new line characters in printed messages. Signed-off-by: Krzysztof Kozlowski ---

Re: [Qemu-devel] [PATCH 3/3] qga: fix compiler warnings (clang 5)

2017-03-05 Thread Marc-André Lureau
On Sat, Mar 4, 2017 at 10:58 PM Philippe Mathieu-Daudé wrote: > static code analyzer complain: > > qga/commands-posix.c:2127:9: warning: Null pointer passed as an argument > to a 'nonnull' parameter > closedir(dp); > ^~~~ > > Reported-by: Clang Static

[Qemu-devel] [PATCH 2/3] hw/arm/exynos4210: Constify data pointed by few arguments and variables

2017-03-05 Thread Krzysztof Kozlowski
In few places the function arguments and local variables are not modifying data passed through pointers so this can be made const for code safeness. Also the static array exynos4210_uart_regs is not being modified. Signed-off-by: Krzysztof Kozlowski ---

[Qemu-devel] [PATCH 1/3] hw/arm/exynos: Convert fprintf to error_report()

2017-03-05 Thread Krzysztof Kozlowski
error_report() is preferred over fprintf() for logging errors. Also remove square brackets [] and additional new line characters in printed messages. Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4_boards.c | 6 +++--- hw/timer/exynos4210_mct.c | 5 +++--

[Qemu-devel] [PATCH 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability

2017-03-05 Thread Krzysztof Kozlowski
Short declaration of 'i' was in the middle of declarations with assignments. Make it a little bit more readable. No functional change. Signed-off-by: Krzysztof Kozlowski --- hw/misc/exynos4210_pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 2/2] vl: Print CPU help after we've registered the CPU accelerators

2017-03-05 Thread David Gibson
On Fri, Mar 03, 2017 at 11:58:07AM -0300, Eduardo Habkost wrote: > On Tue, Jan 31, 2017 at 02:11:59PM +0100, Thomas Huth wrote: > > When running with KVM on POWER, we register some CPU types during > > the initialization function of the ppc64 KVM code (which unfortunately > > also can not be done

[Qemu-devel] [PATCH] block: Constify data passed by pointer to blk_name

2017-03-05 Thread Krzysztof Kozlowski
blk_name() is not modifying data passed to it through pointer and it returns also a pointer to const so the argument can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- block/block-backend.c | 2 +- include/sysemu/block-backend.h | 2 +- 2 files

Re: [Qemu-devel] [PATCH] block: Constify data passed by pointer to blk_name

2017-03-05 Thread Philippe Mathieu-Daudé
On 03/05/2017 06:44 PM, Krzysztof Kozlowski wrote: blk_name() is not modifying data passed to it through pointer and it returns also a pointer to const so the argument can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [PATCH 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers

2017-03-05 Thread Marc-André Lureau
On Sat, Mar 4, 2017 at 10:57 PM Philippe Mathieu-Daudé wrote: > static code analyzer complain: > > hw/usb/dev-smartcard-reader.c:816:5: warning: Null pointer passed as an > argument to a 'nonnull' parameter > memcpy(p->abData, data, len); > ^~~~ >

[Qemu-devel] [PULL v2 24/27] qapi: Make input visitors detect unvisited list tails

2017-03-05 Thread Markus Armbruster
Fix the design flaw demonstrated in the previous commit: new method check_list() lets input visitors report that unvisited input remains for a list, exactly like check_struct() lets them report that unvisited input remains for a struct or union. Implement the method for the qobject input visitor

[Qemu-devel] [PULL v2 23/27] test-qobject-input-visitor: Cover missing nested struct member

2017-03-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <1488544368-30622-25-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake --- tests/test-qobject-input-visitor.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PULL v2 00/27] QAPI patches for 2017-02-28

2017-03-05 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 1488702958-24336-1-git-send-email-arm...@redhat.com Subject: [Qemu-devel] [PULL v2 00/27] QAPI patches for 2017-02-28 Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH v4 25/28] qapi: Make input visitors detect unvisited list tails

2017-03-05 Thread Markus Armbruster
Eric Blake writes: > On 03/03/2017 01:50 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 03/03/2017 06:32 AM, Markus Armbruster wrote: Fix the design flaw demonstrated in the previous commit: new method check_list() lets input

[Qemu-devel] [PULL v2 02/27] libqtest: Work around a "QMP wants a newline" bug

2017-03-05 Thread Markus Armbruster
The next commit is going to add a test that calls qmp("null"). Curiously, this hangs. Here's why. qmp_fd_sendv() doesn't send newlines. Not even when @fmt contains some. At first glance, the QMP parser seems to be fine with that. However, it turns out that it fails to react to input until it

[Qemu-devel] [PULL v2 03/27] qmp-test: New, covering basic QMP protocol

2017-03-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1488544368-30622-4-git-send-email-arm...@redhat.com> --- MAINTAINERS| 1 + tests/Makefile.include | 5 +- tests/libqtest.c | 17 -- tests/libqtest.h | 8

[Qemu-devel] [PULL v2 08/27] qmp: Drop duplicated QMP command object checks

2017-03-05 Thread Markus Armbruster
qmp_check_input_obj() duplicates qmp_dispatch_check_obj(), except the latter screws up an error message. handle_qmp_command() runs first the former, then the latter via qmp_dispatch(), masking the screwup. qemu-ga also masks the screwup, because it also duplicates checks, just differently.

[Qemu-devel] [PULL v2 01/27] qga: Fix crash on non-dictionary QMP argument

2017-03-05 Thread Markus Armbruster
The value of key 'arguments' must be a JSON object. qemu-ga neglects to check, and crashes. To reproduce, send { 'execute': 'guest-sync', 'arguments': [] } to qemu-ga. do_qmp_dispatch() uses qdict_get_qdict() to get the arguments. When not a JSON object, this gets a null pointer, which

[Qemu-devel] [PULL v2 12/27] qapi: Make QObject input visitor set *list reliably

2017-03-05 Thread Markus Armbruster
qobject_input_start_struct() sets *list, except when it fails because qobject_input_get_object() fails, i.e. the input object doesn't exist. All the other input visitor start_struct(), start_list(), start_alternate() always set *obj / *list. Change qobject_input_start_struct() to match.

[Qemu-devel] [PULL v2 11/27] qapi: Clean up after commit 3d344c2

2017-03-05 Thread Markus Armbruster
Drop unused QIV_STACK_SIZE and unused qobject_input_start_struct() parameter errp. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1488544368-30622-13-git-send-email-arm...@redhat.com> --- qapi/qobject-input-visitor.c | 14

[Qemu-devel] [PULL v2 06/27] qapi-introspect: Mangle --prefix argument properly for C

2017-03-05 Thread Markus Armbruster
qapi-introspect.py --prefix hasn't been used so far, but fix it anyway. Signed-off-by: Markus Armbruster Message-Id: <1488544368-30622-7-git-send-email-arm...@redhat.com> [Commit message improved] Reviewed-by: Eric Blake --- scripts/qapi-introspect.py | 2

[Qemu-devel] [PULL v2 07/27] qmp: Clean up how we enforce capability negotiation

2017-03-05 Thread Markus Armbruster
To enforce capability negotiation before normal operation, handle_qmp_command() inspects every command before it's handed off to qmp_dispatch(). This is a bit of a layering violation, and results in duplicated code. Before capability negotiation (!cur_mon->in_command_mode), we fail commands

[Qemu-devel] [PULL v2 16/27] qom: Make object_property_set_qobject()'s input visitor strict

2017-03-05 Thread Markus Armbruster
Commit 240f64b made all qobject input visitors created outside tests strict, except for the one in object_property_set_qobject(). That one was left behind only because Eric couldn't spare the time to figure out whether making it strict would break anything, with a TODO comment. Time to resolve

[Qemu-devel] [PULL v2 09/27] qmp: Eliminate silly QERR_QMP_* macros

2017-03-05 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. QERR_QMP_BAD_INPUT_OBJECT, QERR_QMP_BAD_INPUT_OBJECT_MEMBER, QERR_QMP_EXTRA_MEMBER are used in just one place now, except for one use that has crept into qobject-input-visitor.c. Drop these macros, to make the (bad) error

[Qemu-devel] [PULL v2 15/27] qapi: Make string input and opts visitor require non-null input

2017-03-05 Thread Markus Armbruster
The string input visitor tries to cope with null input. Null input isn't used anywhere, and isn't covered by tests. Unsurprisingly, it doesn't fully work: start_list() crashes because it passes the input via parse_str() to strtoll() unchecked. Make string_input_visitor_new() assert its argument

[Qemu-devel] [PULL v2 13/27] qapi: Improve qobject input visitor error reporting

2017-03-05 Thread Markus Armbruster
Error messages refer to nodes of the QObject being visited by name. Trouble is the names are sometimes less than helpful: * The name of the root QObject is whatever @name argument got passed to the visitor, except NULL gets mapped to "null". We commonly pass NULL. Not good. Avoiding

[Qemu-devel] [PULL v2 05/27] qapi: Support multiple command registries per program

2017-03-05 Thread Markus Armbruster
The command registry encapsulates a single command list. Give the functions using it a parameter instead. Define suitable command lists in monitor, guest agent and test-qmp-commands. Signed-off-by: Markus Armbruster Message-Id:

[Qemu-devel] [PULL v2 18/27] qapi: Drop unused non-strict qobject input visitor

2017-03-05 Thread Markus Armbruster
The split between tests/test-qobject-input-visitor.c and tests/test-qobject-input-strict.c now makes less sense than ever. The next commit will take care of that. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id:

Re: [Qemu-devel] [PATCH v4 10/28] qmp: Improve QMP dispatch error messages

2017-03-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Markus, > > On 03/03/2017 09:32 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> Reviewed-by: Eric Blake >> --- >> qapi/qmp-dispatch.c | 14 -- >> 1 file changed, 8

[Qemu-devel] [PULL v2 04/27] qmp: Dumb down how we run QMP command registration

2017-03-05 Thread Markus Armbruster
The way we get QMP commands registered is high tech: * qapi-commands.py generates qmp_init_marshal() that does the actual work * it also generates the magic to register it as a MODULE_INIT_QAPI function, so it runs when someone calls module_call_init(MODULE_INIT_QAPI) * main() calls

[Qemu-devel] [PULL v2 14/27] qapi: Drop string input visitor method optional()

2017-03-05 Thread Markus Armbruster
visit_optional() is to be called only between visit_start_struct() and visit_end_struct(). Visitors that don't support struct visits, i.e. don't implement start_struct(), end_struct(), have no use for it. Clarify documentation. The string input visitor doesn't support struct visits. Its

[Qemu-devel] [PULL v2 26/27] qapi: Fix object input visit beyond end of list

2017-03-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1488544368-30622-28-git-send-email-arm...@redhat.com> --- qapi/qobject-input-visitor.c | 11 --- tests/test-qobject-input-visitor.c | 2 -- 2 files changed, 8

[Qemu-devel] [PULL v2 17/27] test-qobject-input-visitor: Use strict visitor

2017-03-05 Thread Markus Armbruster
The qobject input visitor comes in a strict and a non-strict variant. This test is the non-strict variant's last user. Turns out it relies on non-strict only in test_visitor_in_null(), and just out of laziness. We don't actually test the non-strict behavior. Clean up test_visitor_in_null(), and

[Qemu-devel] [PULL v2 22/27] tests: Cover partial input visit of list

2017-03-05 Thread Markus Armbruster
Demonstrates a design flaw: there is no way to for input visitors to report that a list visit didn't visit the complete input list. The generated list visits always do, but manual visits needn't. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake

[Qemu-devel] [PULL v2 19/27] tests-qobject-input-strict: Merge into test-qobject-input-visitor

2017-03-05 Thread Markus Armbruster
Much of test-qobject-input-strict.c duplicates test-qobject-input-strict.c, but with less assertions on expected output: * test_validate_struct() duplicates test_visitor_in_struct() * test_validate_struct_nested() duplicates test_visitor_in_struct_nested() * test_validate_list() duplicates

[Qemu-devel] [PULL v2 20/27] test-string-input-visitor: Tear down existing test automatically

2017-03-05 Thread Markus Armbruster
Call visitor_input_teardown() from visitor_input_test_init(), so you don't have to call it from the actual tests. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1488544368-30622-22-git-send-email-arm...@redhat.com> ---

[Qemu-devel] [PULL v2 21/27] test-string-input-visitor: Improve list coverage

2017-03-05 Thread Markus Armbruster
Lists with elements above INT64_MAX don't work (known bug). Empty lists don't work (weird). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1488544368-30622-23-git-send-email-arm...@redhat.com> --- tests/test-string-input-visitor.c |

[Qemu-devel] [PULL v2 27/27] qapi: Improve qobject visitor documentation

2017-03-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1488544368-30622-29-git-send-email-arm...@redhat.com> --- include/qapi/qobject-input-visitor.h | 37 ++- include/qapi/qobject-output-visitor.h | 35

Re: [Qemu-devel] [PATCH v2 03/24] keyval: New keyval_parse()

2017-03-05 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> On 02/28/2017 03:26 PM, Markus Armbruster wrote: >>> keyval_parse() parses KEY=VALUE,... into a QDict. Works like >>> qemu_opts_parse(), except: >>> >>> * Returns a QDict instead of a QemuOpts (d'oh).

[Qemu-devel] [PATCH± SVM I/O permission bitmap for user-level (ring-3) code ignored

2017-03-05 Thread Alexander Boettcher
Hello, the SVM I/O permission bitmap for user-level (ring-3) VM code running in SVM seems to be ignored and causes a GP-fault. (Actual the IO permission was granted by the kernel via the TSS I/O port permission bitmap). After some debugging the GP code originates from target/i386/translate.c

Re: [Qemu-devel] [RFC 0/5] hw: arm: exynos: Bring up secondary CPU + CPUIDLE issue

2017-03-05 Thread Krzysztof Kozlowski
On Thu, Mar 02, 2017 at 04:56:22PM +, Peter Maydell wrote: > On 1 March 2017 at 18:26, Krzysztof Kozlowski wrote: > > Overview of the problem > > === > > On Exynos4210, by default Linux kernel uses cpuidle driver which tries > > to enter low power mode,

[Qemu-devel] [Bug 1670170] [NEW] `qemu-system-sparc64 -M Niagara` Aborted (core dumped)

2017-03-05 Thread Michal Nowak
Public bug reported: > qemu-system-sparc64 -M Niagara qemu: fatal: Trap 0x0064 while trap level (6) >= MAXTL (6), Error state pc: 4c80 npc: 4c84 %g0-3: %g4-7:

[Qemu-devel] [Bug 1670175] [NEW] qemu-system-sparc64 with tribblix-sparc-0m16.iso ends with "panic - kernel: no nucleus hblk8 to allocate"

2017-03-05 Thread Michal Nowak
Public bug reported: > qemu-system-sparc64 -m 1024 -cdrom Downloads/tribblix-sparc-0m16.iso -boot d > -nographic OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: ---- Welcome to OpenBIOS

[Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-05 Thread Alexander Boettcher
Hello, beginning with commit 3bd1d74576bacb120949e13cdeded7a0c792c685 "cputlb: introduce tlb_flush_* async work" using Qemu with SoftMMU+SVM virtualization deadlocks because tb_lock is taken second time in cputlb.c tlb_flush_nocheck() function. The first time tb_lock is taken, according to my

[Qemu-devel] [PATCH] virtio-serial-bus: Delete timer from list before free it

2017-03-05 Thread zhanghailiang
Signed-off-by: zhanghailiang --- hw/char/virtio-serial-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index d544cd9..d797a67 100644 --- a/hw/char/virtio-serial-bus.c +++

Re: [Qemu-devel] [Qemu-arm] [PATCH 2/3] hw/arm/exynos4210: Constify data pointed by few arguments and variables

2017-03-05 Thread Philippe Mathieu-Daudé
On 03/05/2017 06:48 PM, Krzysztof Kozlowski wrote: In few places the function arguments and local variables are not modifying data passed through pointers so this can be made const for code safeness. Also the static array exynos4210_uart_regs is not being modified. Signed-off-by: Krzysztof

[Qemu-devel] [PULL 1/5] ppc/xics: register reset handlers for the ICP and ICS objects

2017-03-05 Thread David Gibson
From: Cédric Le Goater The recent changes on the XICS layer removed the XICSState object to let the sPAPR machine handle the ICP and ICS directly. The reset of these objects was previously handled by XICSState, which was a SysBus device, and to keep the same behavior, the ICP and

[Qemu-devel] [PULL 3/5] target/ppc: fmadd check for excp independently

2017-03-05 Thread David Gibson
From: Nikunj A Dadhania Current order of checking does not confirm with the spec (ISA 3.0: MultiplyAddDP page-469). Change the order and make them independent of each other. For example: a = infinity, b = zero, c = SNaN, this should set both VXIMZ and VXNAN

[Qemu-devel] [PULL 2/5] spapr: ensure that all threads within core are on the same NUMA node

2017-03-05 Thread David Gibson
From: Igor Mammedov Threads within a core shouldn't be on different NUMA nodes, so if user has misconfgured command line, fail QEMU at start up to force user fix it. For now use the first thread on the core as source of core's node-id. Later when cpu-numa refactoring lands

[Qemu-devel] [PULL 0/5] ppc-for-2.9 queue 20170306

2017-03-05 Thread David Gibson
The following changes since commit 17783ac828adc694d986698d2d7014aedfeb48c6: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170303' into staging (2017-03-04 16:31:14 +) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.9-20170306

Re: [Qemu-devel] [PATCH] net/filter-mirror: Follow CODING_STYLE

2017-03-05 Thread Jason Wang
On 2017年03月02日 11:59, Zhang Chen wrote: Signed-off-by: Zhang Chen --- net/filter-mirror.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index aa0aa98..72fa7c2 100644 ---

Re: [Qemu-devel] [PATCH for-2.9 0/6] disas: Fix various coverity nits

2017-03-05 Thread Fam Zheng
On Sat, 03/04 12:44, Peter Maydell wrote: > On 4 March 2017 at 00:00, wrote: > > Hi, > > > > This series failed build test on s390x host. Please find the details below. > > > === TEST BEGIN === > > Using CC: /home/fam/bin/cc > > rm: cannot remove

Re: [Qemu-devel] [PATCH V2] migration: expose qemu_announce_self() via qmp

2017-03-05 Thread Jason Wang
On 2017年03月03日 18:39, Dr. David Alan Gilbert wrote: * Germano Veit Michel (germ...@redhat.com) wrote: qemu_announce_self() is triggered by qemu at the end of migrations to update the network regarding the path to the guest l2addr. however it is also useful when there is a network change such

[Qemu-devel] [PULL 4/5] target/ppc: fmadd: add macro for updating flags

2017-03-05 Thread David Gibson
From: Nikunj A Dadhania Adds FPU_MADDSUB_UPDATE macro, this will be used for other routines having float32/16 Signed-off-by: Nikunj A Dadhania Signed-off-by: David Gibson --- target/ppc/fpu_helper.c | 61

[Qemu-devel] [PULL 5/5] target/ppc: use helper for excp handling

2017-03-05 Thread David Gibson
From: Nikunj A Dadhania Use the helper routine float[32,64]_maddsub_update_excp() in VSX_MADD macro. Signed-off-by: Nikunj A Dadhania Signed-off-by: David Gibson --- target/ppc/fpu_helper.c | 20

Re: [Qemu-devel] [PATCH v2] spapr_pci: allow control of BAR alignment through SLOF

2017-03-05 Thread David Gibson
On Fri, Mar 03, 2017 at 05:32:57PM -0600, Michael Roth wrote: > In certain cases, such as PCI-passthrough with VFIO, we cannot offload > MMIO accesses to KVM unless the BAR alignment matches the host. This > patch, in conjunction with a separately submitted patch for SLOF > which allows for

Re: [Qemu-devel] [PATCH V3 0/3] COLO-compare: Optimize the code and fix some bug

2017-03-05 Thread Jason Wang
On 2017年03月02日 17:54, Zhang Chen wrote: This series we will Optimize the code and fix some bug. Patch1: Rename colo_packet_compare() and remove duplicate check in compare icmp. Patch2: Optimize compare_common and increase compare performance. Patch3: Fix debug info always print bug. Zhang

Re: [Qemu-devel] [PATCH v8 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-03-05 Thread ashish mittal
On Wed, Mar 1, 2017 at 1:18 AM, Daniel P. Berrange wrote: > On Tue, Feb 28, 2017 at 02:51:39PM -0800, ashish mittal wrote: >> On Mon, Feb 27, 2017 at 1:22 AM, Daniel P. Berrange >> wrote: > >> >> +ret = -EINVAL; >> >> +goto out; >> >> +

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-05 Thread Richard Henderson
On 03/06/2017 08:32 AM, Alex Bennée wrote: #5 0x0046ea2e in tlb_flush (cpu=0x164a360) at qemu.git/cputlb.c:121 #6 0x00538987 in cpu_x86_update_cr4 (env=0x16525f0, new_cr4=1784) at qemu.git/target/i386/helper.c:660 #7 0x0055e318 in cpu_vmexit (env=0x16525f0,

Re: [Qemu-devel] [PATCH] ppc/spapr: QOM'ify sPAPRRTCState

2017-03-05 Thread David Gibson
On Fri, Mar 03, 2017 at 06:23:15PM +0100, Cédric Le Goater wrote: > On 03/03/2017 05:54 PM, Thomas Huth wrote: > > On 03.03.2017 15:49, Cédric Le Goater wrote: > >> On 03/03/2017 03:13 PM, Thomas Huth wrote: > >>> On 03.03.2017 14:37, Cédric Le Goater wrote: > Also use an 'Object *' under the

Re: [Qemu-devel] [PATCH] spapr: ensure that all threads within core are on the same NUMA node

2017-03-05 Thread David Gibson
On Fri, Mar 03, 2017 at 06:41:04PM +0100, Igor Mammedov wrote: > On Fri, 24 Feb 2017 10:26:56 +0100 > Igor Mammedov wrote: > > > Threads within a core shouldn't be on different > > NUMA nodes, so if user has misconfgured command > > line, fail QEMU at start up to force user

Re: [Qemu-devel] [PATCH] tests/docker: support proxy / corporate firewall

2017-03-05 Thread Fam Zheng
On Sat, 03/04 16:12, Philippe Mathieu-Daudé wrote: > if FTP_PROXY/HTTP_PROXY/HTTPS_PROXY standard environment variables available, > pass them to the docker daemon to build images. > this is required when building behind corporate proxy/firewall, but also help > when using local cache server (ie:

Re: [Qemu-devel] [Qemu-arm] [PATCH 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability

2017-03-05 Thread Philippe Mathieu-Daudé
Hi Krzysztof, On 03/05/2017 06:48 PM, Krzysztof Kozlowski wrote: Short declaration of 'i' was in the middle of declarations with assignments. Make it a little bit more readable. No functional change. Signed-off-by: Krzysztof Kozlowski --- hw/misc/exynos4210_pmu.c | 4 ++--

[Qemu-devel] [PULL RESEND 09/19] char: remove the right fd been watched in qemu_chr_fe_set_handlers()

2017-03-05 Thread Jason Wang
From: zhanghailiang We can call qemu_chr_fe_set_handlers() to add/remove fd been watched in 'context' which can be either default main context or other explicit context. But the original logic is not correct, we didn't remove the right fd because we call

[Qemu-devel] [PULL RESEND 01/19] net: Remove useless local var pkt

2017-03-05 Thread Jason Wang
From: Fam Zheng This has been pointless since commit 605d52e62, which was a search-and-replace, overlooked the redundancy. Signed-off-by: Fam Zheng Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang ---

[Qemu-devel] [PULL RESEND 00/19] Net patches

2017-03-05 Thread Jason Wang
The following changes since commit 17783ac828adc694d986698d2d7014aedfeb48c6: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170303' into staging (2017-03-04 16:31:14 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request

[Qemu-devel] [PULL RESEND 12/19] vmxnet3: Convert ring values to uint32_t's

2017-03-05 Thread Jason Wang
From: "Dr. David Alan Gilbert" The index's in the Vmxnet3Ring were migrated as 32bit ints yet are declared as size_t's. They appear to be derived from 32bit values loaded from guest memory, so actually store them as that. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL RESEND 15/19] filter-rewriter: skip net_checksum_calculate() while offset = 0

2017-03-05 Thread Jason Wang
From: zhanghailiang While the offset of packets's sequence for primary side and secondary side is zero, it is unnecessary to call net_checksum_calculate() to recalculate the checksume value of packets. Signed-off-by: zhanghailiang

[Qemu-devel] [PULL RESEND 11/19] net/colo-compare: Fix memory free error

2017-03-05 Thread Jason Wang
From: Zhang Chen We use g_queue_init() to init s->conn_list, so we should use g_queue_clear() to instead of g_queue_free(). Signed-off-by: Zhang Chen Reviewed-by: zhanghailiang Signed-off-by: Jason

Re: [Qemu-devel] [PATCH v2] spapr_pci: allow control of BAR alignment through SLOF

2017-03-05 Thread Michael Roth
Quoting David Gibson (2017-03-05 22:16:58) > On Fri, Mar 03, 2017 at 05:32:57PM -0600, Michael Roth wrote: > > In certain cases, such as PCI-passthrough with VFIO, we cannot offload > > MMIO accesses to KVM unless the BAR alignment matches the host. This > > patch, in conjunction with a separately

Re: [Qemu-devel] [PATCH] ppc/spapr: QOM'ify sPAPRRTCState

2017-03-05 Thread Cédric Le Goater
On 03/06/2017 12:23 AM, David Gibson wrote: > On Fri, Mar 03, 2017 at 06:23:15PM +0100, Cédric Le Goater wrote: >> On 03/03/2017 05:54 PM, Thomas Huth wrote: >>> On 03.03.2017 15:49, Cédric Le Goater wrote: On 03/03/2017 03:13 PM, Thomas Huth wrote: > On 03.03.2017 14:37, Cédric Le Goater

Re: [Qemu-devel] [Bug 1670170] [NEW] `qemu-system-sparc64 -M Niagara` Aborted (core dumped)

2017-03-05 Thread Artyom Tarasenko
There was a major rework of the Niagara platform in the upcoming 2.9 release. Please use the new version. On Sun, Mar 5, 2017 at 7:18 PM, Michal Nowak wrote: > Public bug reported: > >> qemu-system-sparc64 -M Niagara > qemu: fatal: Trap 0x0064 while trap level (6) >=

[Qemu-devel] [PULL RESEND 13/19] vmxnet3: VMStatify rx/tx q_descr and int_state

2017-03-05 Thread Jason Wang
From: "Dr. David Alan Gilbert" Fairly simple mechanical conversion of all fields. TODO The problem is vmxnet3-ring size/cell_size/next are declared as size_t but written as 32bit. Signed-off-by: Dr. David Alan Gilbert Acked-by: Dmitry Fleytman

[Qemu-devel] [PULL RESEND 02/19] eth: Extend vlan stripping functions

2017-03-05 Thread Jason Wang
From: Dmitry Fleytman Make VLAN stripping functions return number of bytes copied to given Ethernet header buffer. This information should be used to re-compose packet IOV after VLAN stripping. Cc: qemu-sta...@nongnu.org Signed-off-by: Dmitry Fleytman

[Qemu-devel] [PULL RESEND 03/19] NetRxPkt: Fix memory corruption on VLAN header stripping

2017-03-05 Thread Jason Wang
From: Dmitry Fleytman This patch fixed a problem that was introduced in commit eb700029. When net_rx_pkt_attach_iovec() calls eth_strip_vlan() this can result in pkt->ehdr_buf being overflowed, because ehdr_buf is only sizeof(struct eth_header) bytes large but

[Qemu-devel] [PULL RESEND 04/19] NetRxPkt: Do not try to pull more data than present

2017-03-05 Thread Jason Wang
From: Dmitry Fleytman In case of VLAN stripping, ETH header put into a separate buffer, therefore amont of data copied from original IOV should be smaller. Cc: qemu-sta...@nongnu.org Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang

Re: [Qemu-devel] [PATCH] linux-user: limit number of arguments to execve

2017-03-05 Thread P J P
+-- On Fri, 3 Mar 2017, Jann Horn wrote --+ | On Fri, Mar 3, 2017 at 4:55 PM, Peter Maydell wrote: | >> +if (argc > ARG_MAX || envc > ARG_MAX) { | >> +fprintf(stderr, | >> +"argc(%d), envc(%d) exceed %d\n", argc, envc,

[Qemu-devel] [PULL RESEND 14/19] net/colo: fix memory double free error

2017-03-05 Thread Jason Wang
From: zhanghailiang The 'primary_list' and 'secondary_list' members of struct Connection is not allocated through dynamically g_queue_new(), but we free it by using g_queue_free(), which will lead to a double-free bug. Reviewed-by: Zhang Chen

[Qemu-devel] [PULL RESEND 19/19] net/filter-mirror: Follow CODING_STYLE

2017-03-05 Thread Jason Wang
From: Zhang Chen Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/filter-mirror.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c

Re: [Qemu-devel] [PATCH v3 13/13] ppc: Add SM501 device in config for ppc and ppcemb targets

2017-03-05 Thread Thomas Huth
On 13.12.2016 22:00, BALATON Zoltan wrote: > This is not used by default on any emulated machine yet but it is > still useful to have it compiled so it can be added from the command > line for clients that can use it (e.g. MorphOS has no driver for any > other emulated video cards but can output

[Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments

2017-03-05 Thread P J P
From: Prasad J Pandit Arguments passed to execve(2) call from user program could be large, allocating stack memory for them via alloca(3) call would lead to bad behaviour. Use 'g_malloc0' to allocate memory for such arguments. Signed-off-by: Prasad J Pandit

[Qemu-devel] [PATCH v2 1/2] linux-user: limit number of arguments to execve

2017-03-05 Thread P J P
From: Prasad J Pandit Limit the number of arguments passed to execve(2) call from a user program, as large number of them could lead to a bad guest address error. Reported-by: Jann Horn Signed-off-by: Prasad J Pandit ---

[Qemu-devel] [PATCH v2 0/2] Limit and protect execve arguments

2017-03-05 Thread P J P
From: Prasad J Pandit Hello, A user program could pass large number of 'argv','env' arguments to an execve(2) call. It could lead to bad behaviour as the TARGET_NR_execve: allocates stack memory(via alloca) for these arguments. alloca(3) is better for allocations of upto

[Qemu-devel] [PULL RESEND 07/19] colo-compare: use g_timeout_source_new() to process the stale packets

2017-03-05 Thread Jason Wang
From: zhanghailiang Instead of using qemu timer to process the stale packets, We re-use the colo compare thread to process these packets by creating a new timeout coroutine. Besides, since we process all the same vNIC's net connection/packets in one thread, it is

[Qemu-devel] [PULL RESEND 05/19] NetRxPkt: Account buffer with ETH header in IOV length

2017-03-05 Thread Jason Wang
From: Dmitry Fleytman In case of VLAN stripping ETH header is stored in a separate chunk and length of IOV should take this into account. This patch fixes checksum validation for RX packets with VLAN header. Devices affected by this problem: e1000e and vmxnet3. Cc:

[Qemu-devel] [PULL RESEND 08/19] colo-compare: kick compare thread to exit after some cleanup in finalization

2017-03-05 Thread Jason Wang
From: zhanghailiang We should call g_main_loop_quit() to notify colo compare thread to exit, Or it will run in g_main_loop_run() forever. Besides, the finalizing process can't happen in context of colo thread, it is reasonable to remove the 'if

[Qemu-devel] [PULL RESEND 10/19] colo-compare: Fix removing fds been watched incorrectly in finalization

2017-03-05 Thread Jason Wang
From: zhanghailiang We will catch the bellow error report while try to delete compare object by qmp command: chardev/char-io.c:91: io_watch_poll_finalize: Assertion `iwp->src == ((void *)0)' failed. This is caused by failing to remove the right fd been watched

[Qemu-devel] [PULL RESEND 06/19] NetRxPkt: Remove code duplication in net_rx_pkt_pull_data()

2017-03-05 Thread Jason Wang
From: Dmitry Fleytman This is a refactoring commit that does not change behavior. Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/net_rx_pkt.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PULL RESEND 16/19] COLO-compare: Rename compare function and remove duplicate codes

2017-03-05 Thread Jason Wang
From: Zhang Chen Rename colo_packet_compare() to colo_packet_compare_common() that make tcp_compare udp_compare icmp_compare reuse this function. Remove minimum packet size check in icmp_compare, because we have check this in parse_packet_early(). Signed-off-by:

[Qemu-devel] [PULL RESEND 18/19] COLO-compare: Fix icmp and udp compare different packet always dump bug

2017-03-05 Thread Jason Wang
From: Zhang Chen Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/net/colo-compare.c

[Qemu-devel] [PULL RESEND 17/19] COLO-compare: Optimize compare_common and compare_tcp

2017-03-05 Thread Jason Wang
From: Zhang Chen Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly, this function can get better performance.

Re: [Qemu-devel] [PATCH] linux-user: limit number of arguments to execve

2017-03-05 Thread P J P
Hello Eric, +-- On Fri, 3 Mar 2017, Eric Blake wrote --+ | much smaller, or you should consider using the heap instead of the stack | (alloca should never be used for more than about 4k). And there's still | the possibility that even with your cap, that you are not handling E2BIG | correctly.

Re: [Qemu-devel] [PATCH] virito: unbreak virtio device behinds IOMMU with region cache

2017-03-05 Thread Jason Wang
On 2017年03月03日 20:56, Paolo Bonzini wrote: On 03/03/2017 10:06, Jason Wang wrote: Commit c611c76417f5 ("virtio: add MemoryListener to cache ring translations") registers a memory listener to dma_as. This may not work when IOMMU is enabled: dma_as(bus_master_as) were correctly initialized in

Re: [Qemu-devel] [PATCH] ppc/xics: register reset handlers for the ICP and ICS objects

2017-03-05 Thread David Gibson
On Fri, Mar 03, 2017 at 01:51:03PM +0100, Cédric Le Goater wrote: 1;4601;0c> The recent changes on the XICS layer removed the XICSState object to > let the sPAPR machine handle the ICP and ICS directly. The reset of > these objects was previously handled by XICSState, which was a SysBus > device,

  1   2   >