[Qemu-devel] [PATCH v2 11/20] test-bdrv-drain: Test node deletion in subtree recursion

2018-05-29 Thread Kevin Wolf
If bdrv_do_drained_begin() polls during its subtree recursion, the graph can change and mess up the bs->children iteration. Test that this doesn't happen. Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 38 +- 1 file changed, 29 insertions(+), 9 deleti

[Qemu-devel] [PATCH v2 10/20] block: Drain recursively with a single BDRV_POLL_WHILE()

2018-05-29 Thread Kevin Wolf
Anything can happen inside BDRV_POLL_WHILE(), including graph changes that may interfere with its callers (e.g. child list iteration in recursive callers of bdrv_do_drained_begin). Switch to a single BDRV_POLL_WHILE() call for the whole subtree at the end of bdrv_do_drained_begin() to avoid such e

[Qemu-devel] [PATCH v2 14/20] block: Defer .bdrv_drain_begin callback to polling phase

2018-05-29 Thread Kevin Wolf
We cannot allow aio_poll() in bdrv_drain_invoke(begin=true) until we're done with propagating the drain through the graph and are doing the single final BDRV_POLL_WHILE(). Just schedule the coroutine with the callback and increase bs->in_flight to make sure that the polling phase will wait for it.

[Qemu-devel] [PATCH v2 16/20] block: Allow AIO_WAIT_WHILE with NULL ctx

2018-05-29 Thread Kevin Wolf
bdrv_drain_all() wants to have a single polling loop for draining the in-flight requests of all nodes. This means that the AIO_WAIT_WHILE() condition relies on activity in multiple AioContexts, which is polled from the mainloop context. We must therefore call AIO_WAIT_WHILE() from the mainloop thre

[Qemu-devel] [PATCH v2 15/20] test-bdrv-drain: Test that bdrv_drain_invoke() doesn't poll

2018-05-29 Thread Kevin Wolf
This adds a test case that goes wrong if bdrv_drain_invoke() calls aio_poll(). Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 102 +--- 1 file changed, 88 insertions(+), 14 deletions(-) diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-d

Re: [Qemu-devel] [PATCH v2 00/20] Drain fixes and cleanups, part 3

2018-05-29 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180529172156.29311-1-kw...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/20] Drain fixes and cleanups, part 3 === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(g

[Qemu-devel] [PATCH 2/4] hw/ppc/spapr_drc: Replace error_setg(&error_abort) by error_report() + abort()

2018-05-29 Thread Philippe Mathieu-Daudé
Use error_report() + abort() instead of error_setg(&error_abort), as suggested by the "qapi/error.h" documentation: Please don't error_setg(&error_fatal, ...), use error_report() and exit(), because that's more obvious. Likewise, don't error_setg(&error_abort, ...), use assert(). Use

[Qemu-devel] [PATCH 0/4] qapi/error: converts error_setg(&error_fatal) to error_report() + exit()

2018-05-29 Thread Philippe Mathieu-Daudé
Hi, This series converts error_setg(&error_fatal) to error_report() + exit() as suggested by the "qapi/error.h" documentation. This reduce Coverity and Clang static analyzer positive falses. See http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg07585.html: On 07/24/2017 04:52 PM, E

[Qemu-devel] [PATCH 1/4] hw/block/fdc: Replace error_setg(&error_abort) by error_report() + abort()

2018-05-29 Thread Philippe Mathieu-Daudé
Use error_report() + abort() instead of error_setg(&error_abort), as suggested by the "qapi/error.h" documentation: Please don't error_setg(&error_fatal, ...), use error_report() and exit(), because that's more obvious. Likewise, don't error_setg(&error_abort, ...), use assert(). Use

[Qemu-devel] [PATCH 4/4] device_tree: Replace error_setg(&error_fatal) by error_report() + exit()

2018-05-29 Thread Philippe Mathieu-Daudé
Use error_report() + exit() instead of error_setg(&error_fatal), as suggested by the "qapi/error.h" documentation: Please don't error_setg(&error_fatal, ...), use error_report() and exit(), because that's more obvious. Suggested-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé --- de

[Qemu-devel] [PATCH 3/4] hw/arm/sysbus-fdt: Replace error_setg(&error_fatal) by error_report() + exit()

2018-05-29 Thread Philippe Mathieu-Daudé
Use error_report() + exit() instead of error_setg(&error_fatal), as suggested by the "qapi/error.h" documentation: Please don't error_setg(&error_fatal, ...), use error_report() and exit(), because that's more obvious. This fixes CID 1352173: "Passing null pointer dt_name to qemu_fdt_no

Re: [Qemu-devel] [PATCH 3/5] Acceptance tests: add quick VNC tests

2018-05-29 Thread Eduardo Habkost
On Tue, May 29, 2018 at 10:59:37AM -0400, Cleber Rosa wrote: > > > On 05/29/2018 10:32 AM, Eduardo Habkost wrote: > > On Fri, May 25, 2018 at 12:27:46PM -0400, Cleber Rosa wrote: > >> > >> > >> On 05/25/2018 01:37 AM, Fam Zheng wrote: > >>> On Thu, 05/24 20:58, Cleber Rosa wrote: > This patc

Re: [Qemu-devel] [Qemu-block] [PATCH 09/14] qemu-iotests: Rewrite 207 for blockdev-create job

2018-05-29 Thread Jeff Cody
On Fri, May 25, 2018 at 06:33:22PM +0200, Kevin Wolf wrote: > This rewrites the test case 207 to work with the new x-blockdev-create > job rather than the old synchronous version of the command. > > Most of the test cases stay the same as before (the exception being some > improved 'size' options

Re: [Qemu-devel] [PATCH] ui/cocoa: Suppress NSFileHandlingPanelOKButton deprecation warning

2018-05-29 Thread Programmingkid
> On May 25, 2018, at 6:26 AM, Peter Maydell wrote: > > OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and > would rather you use NSModalResponseOK, which was introduced in OS 10.9. > Use the recommended new constant name, with a backward compatibility > define if we're building

[Qemu-devel] [PATCH] ui/cocoa.m: Suppress NSFileHandlingPanelOKButton depreciation warning

2018-05-29 Thread John Arbuckle
OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and would rather you use NSModalResponseOK, which was introduced in OS 10.9. Use the recommended new constant name, with a backward compatibility define if we're building on an older OSX. Signed-off-by: John Arbuckle --- ui/cocoa.m |

Re: [Qemu-devel] Cortex M0 emulation tasks

2018-05-29 Thread Peter Maydell
On 28 May 2018 at 15:26, Stefan Hajnoczi wrote: > Hi, > I took a look at what's required for ARM Cortex M0 emulation that we > need for the micro:bit ARM board. The following notes are based on > Appendix D3 of the ARMv6-M Architecture Reference Manual that Peter > Maydell recommended. > > Severa

Re: [Qemu-devel] [PATCH] ui/cocoa: Suppress NSFileHandlingPanelOKButton deprecation warning

2018-05-29 Thread Peter Maydell
On 29 May 2018 at 18:52, Programmingkid wrote: > >> On May 25, 2018, at 6:26 AM, Peter Maydell wrote: >> >> OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and >> would rather you use NSModalResponseOK, which was introduced in OS 10.9. >> Use the recommended new constant name, with

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Suppress NSFileHandlingPanelOKButton depreciation warning

2018-05-29 Thread Peter Maydell
On 29 May 2018 at 19:08, John Arbuckle wrote: > OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and > would rather you use NSModalResponseOK, which was introduced in OS 10.9. > Use the recommended new constant name, with a backward compatibility > define if we're building on an olde

Re: [Qemu-devel] [PATCH] qcow2: Fix Coverity warning when calculating the refcount cache size

2018-05-29 Thread Kevin Wolf
Am 28.05.2018 um 17:01 hat Alberto Garcia geschrieben: > MIN_REFCOUNT_CACHE_SIZE is 4 and the cluster size is guaranteed to be > at most 2MB, so the minimum refcount cache size (in bytes) is always > going to fit in a 32-bit integer. > > Coverity doesn't know that, and since we're storing the resu

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Suppress NSFileHandlingPanelOKButton depreciation warning

2018-05-29 Thread Programmingkid
> On May 29, 2018, at 2:11 PM, Peter Maydell wrote: > > On 29 May 2018 at 19:08, John Arbuckle wrote: >> OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and >> would rather you use NSModalResponseOK, which was introduced in OS 10.9. >> Use the recommended new constant name, with

[Qemu-devel] [PATCH v2] ui/cocoa: Suppress NSFileHandlingPanelOKButton deprecation warning

2018-05-29 Thread Peter Maydell
OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and would rather you use NSModalResponseOK, which was introduced in OS 10.9. Use the recommended new constant name, with a backward compatibility define if we're building on an older OSX. Signed-off-by: Peter Maydell --- v1->v2: defin

Re: [Qemu-devel] [PATCH v4] block: fix QEMU crash with scsi-hd and drive_del

2018-05-29 Thread Kevin Wolf
Am 28.05.2018 um 14:03 hat Greg Kurz geschrieben: > Removing a drive with drive_del while it is being used to run an I/O > intensive workload can cause QEMU to crash. > > An AIO flush can yield at some point: > > blk_aio_flush_entry() > blk_co_flush(blk) > bdrv_co_flush(blk->root->bs) >...

Re: [Qemu-devel] [Qemu-block] [PATCH 10/14] qemu-iotests: Rewrite 210 for blockdev-create job

2018-05-29 Thread Jeff Cody
On Fri, May 25, 2018 at 06:33:23PM +0200, Kevin Wolf wrote: > This rewrites the test case 210 to work with the new x-blockdev-create > job rather than the old synchronous version of the command. > > All of the test cases stay the same as before, but in order to be able > to implement proper job ha

Re: [Qemu-devel] [PATCH v2] ui/cocoa: Suppress NSFileHandlingPanelOKButton deprecation warning

2018-05-29 Thread Programmingkid
> On May 29, 2018, at 2:15 PM, Peter Maydell wrote: > > OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and > would rather you use NSModalResponseOK, which was introduced in OS 10.9. > Use the recommended new constant name, with a backward compatibility > define if we're building

Re: [Qemu-devel] [Qemu-block] [PATCH 14/14] block/create: Mark blockdev-create stable

2018-05-29 Thread Jeff Cody
On Fri, May 25, 2018 at 06:33:27PM +0200, Kevin Wolf wrote: > We're ready to declare the blockdev-create job stable. This renames the > corresponding QMP command from x-blockdev-create to blockdev-create. > > Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody > --- > qapi/block-core.json

Re: [Qemu-devel] [Qemu-block] [PATCH 06/14] qemu-iotests: Add VM.qmp_log()

2018-05-29 Thread Jeff Cody
On Fri, May 25, 2018 at 06:33:19PM +0200, Kevin Wolf wrote: > This adds a helper function that logs both the QMP request and the > received response before returning it. > > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/iotests.py | 11 +++ > 1 file changed, 11 insertions(+) > >

Re: [Qemu-devel] [PATCH 03/13] 9p: Move a couple xattr functions to 9p-util

2018-05-29 Thread Greg Kurz
On Sat, 26 May 2018 01:23:05 -0400 k...@juliacomputing.com wrote: > From: Keno Fischer > > These functions will need custom implementations on Darwin. Since the > implementation is very similar among all of them, and 9p-util already > has the _nofollow version of fgetxattrat, let's move them all

Re: [Qemu-devel] [PATCH 08/14] qemu-iotests: Rewrite 206 for blockdev-create job

2018-05-29 Thread Kevin Wolf
Am 29.05.2018 um 14:27 hat Max Reitz geschrieben: > On 2018-05-25 18:33, Kevin Wolf wrote: > > This rewrites the test case 206 to work with the new x-blockdev-create > > job rather than the old synchronous version of the command. > > > > All of the test cases stay the same as before, but in order

[Qemu-devel] [PATCH v3] linux-user: Remove extra mapping

2018-05-29 Thread Steve Mcpolin
When a guest mmap()'d a file, an anonymous mapping was created to align different host and client page granularity and provide for beyond EOF mappings. The file was then mapped ontop of this mapping, releasing the memory reserved by it. A file based mmap does not reserve memory, but the anonymous

Re: [Qemu-devel] [RFC] monitor: turn on Out-Of-Band by default again

2018-05-29 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, May 24, 2018 at 09:08:58AM +0200, Markus Armbruster wrote: > > Peter Xu writes: > > > > > On Mon, May 21, 2018 at 09:13:06AM -0500, Eric Blake wrote: > > >> On 05/21/2018 03:42 AM, Peter Xu wrote: > > >> > We turned Out-Of-Band feature of monitors o

Re: [Qemu-devel] [PATCH 4/5] scripts/qemu.py: introduce set_console() method

2018-05-29 Thread Eduardo Habkost
On Fri, May 25, 2018 at 12:57:54PM -0400, Cleber Rosa wrote: > On 05/25/2018 01:47 AM, Fam Zheng wrote: [...] > >> +class QEMU(unittest.TestCase): > > > > 'QEMU' is too generic, what is the intended tests to do here? It seems to be > > more about exercising the set_console() method. > > > > Yes,

Re: [Qemu-devel] [PATCH v3] linux-user: Remove extra mapping

2018-05-29 Thread Laurent Vivier
Le 29/05/2018 à 20:15, Steve Mcpolin a écrit : > When a guest mmap()'d a file, an anonymous mapping was created to > align different host and client page granularity and provide for > beyond EOF mappings. The file was then mapped ontop of this mapping, > releasing the memory reserved by it. A fil

Re: [Qemu-devel] [PATCH 4/5] scripts/qemu.py: introduce set_console() method

2018-05-29 Thread Cleber Rosa
On 05/29/2018 03:06 PM, Eduardo Habkost wrote: > On Fri, May 25, 2018 at 12:57:54PM -0400, Cleber Rosa wrote: >> On 05/25/2018 01:47 AM, Fam Zheng wrote: > [...] +class QEMU(unittest.TestCase): >>> >>> 'QEMU' is too generic, what is the intended tests to do here? It seems to be >>> more abou

Re: [Qemu-devel] [PATCH] socket: dont't free msgfds if error equals EAGAIN

2018-05-29 Thread Eric Blake
On 05/29/2018 04:33 AM, linzhecheng wrote: I think this patch doesn't fix my issue. For more details, please see Gonglei's reply. https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg06296.html Your mailer is not honoring threading (it failed to include 'In-Reply-To:' and 'References:' he

Re: [Qemu-devel] [PATCH 3/5] Acceptance tests: add quick VNC tests

2018-05-29 Thread Cleber Rosa
On 05/29/2018 01:52 PM, Eduardo Habkost wrote: > On Tue, May 29, 2018 at 10:59:37AM -0400, Cleber Rosa wrote: >> >> >> On 05/29/2018 10:32 AM, Eduardo Habkost wrote: >>> On Fri, May 25, 2018 at 12:27:46PM -0400, Cleber Rosa wrote: On 05/25/2018 01:37 AM, Fam Zheng wrote: > On

[Qemu-devel] [PATCH v3 3/5] Acceptance tests: add quick VNC tests

2018-05-29 Thread Cleber Rosa
This patch adds a few simple behavior tests for VNC. Signed-off-by: Cleber Rosa --- tests/acceptance/vnc.py | 60 + 1 file changed, 60 insertions(+) create mode 100644 tests/acceptance/vnc.py diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py

[Qemu-devel] [PATCH v3 5/5] Acceptance tests: add Linux kernel boot and console checking test

2018-05-29 Thread Cleber Rosa
This test boots a Linux kernel, and checks that the given command line was effective in two ways: * It makes the kernel use the set "console device" as a console * The kernel records the command line as expected in the console Given that way too many error conditions may occur, and detecting th

[Qemu-devel] [PATCH v3 2/5] scripts/qemu.py: allow adding to the list of extra arguments

2018-05-29 Thread Cleber Rosa
Tests will often need to add extra arguments to QEMU command line arguments. Signed-off-by: Cleber Rosa --- scripts/qemu.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index 08a3e9af5a..7cd8193df8 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py

Re: [Qemu-devel] [PATCH 0/4] qapi/error: converts error_setg(&error_fatal) to error_report() + exit()

2018-05-29 Thread Auger Eric
Hi, On 05/29/2018 07:48 PM, Philippe Mathieu-Daudé wrote: > Hi, > > This series converts error_setg(&error_fatal) to error_report() + exit() as > suggested by the "qapi/error.h" documentation. > > This reduce Coverity and Clang static analyzer positive falses. > > See http://lists.nongnu.org/ar

[Qemu-devel] [PATCH v3 1/5] Add functional/acceptance tests infrastructure

2018-05-29 Thread Cleber Rosa
This patch adds the very minimum infrastructure necessary for writing and running functional/acceptance tests, including: * Documentation * The avocado_qemu.Test base test class * One example tests (test_version.py) Additional functionality is expected to be added along the tests that require

[Qemu-devel] [PATCH v3 4/5] scripts/qemu.py: introduce set_console() method

2018-05-29 Thread Cleber Rosa
The set_console() method is intended to ease higher level use cases that require a console device. The amount of intelligence is limited on purpose, requiring either the device type explicitly, or the existence of a machine (pattern) definition. Because of the console device type selection criter

[Qemu-devel] [PATCH 00/15] linux-user: move more definitions out of syscall_defs.h

2018-05-29 Thread Laurent Vivier
Move fcntl.h definitions to target directories. Introduce a generic header for the targets without specific definitions. Move more signal.h definitions to target directories. Laurent Vivier (15): linux-user: move generic fcntl definitions to generic/fcntl.h linux-user: move alpha fcntl definit

[Qemu-devel] [PATCH v3 0/5] Acceptance/functional tests

2018-05-29 Thread Cleber Rosa
TL;DR = Another version, with a minimalist approach, to the acceptance tests infrastructure for QEMU, based on the Avocado Testing Framework. Background == The previous version, still considered an RFC, was sent to the list by Eduardo[1] was based on the work held in Amador's branch[

[Qemu-devel] [PATCH 06/15] linux-user: move ppc fcntl definitions to ppc/target_fcntl.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/ppc/target_fcntl.h | 6 ++ linux-user/syscall_defs.h | 7 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/linux-user/ppc/target_fcntl.h b/linux-user/ppc/target_fcntl.h index 627d547289..d74ab710cf 100644

[Qemu-devel] [PATCH 02/15] linux-user: move alpha fcntl definitions to alpha/target_fcntl.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/alpha/target_fcntl.h | 29 + linux-user/syscall_defs.h | 32 ++-- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/linux-user/alpha/target_fcntl.h b/linux-us

[Qemu-devel] [PATCH 12/15] linux-user: move openrisc signal definitions to openrisc/target_signal.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/openrisc/target_signal.h | 8 linux-user/syscall_defs.h | 10 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/linux-user/openrisc/target_signal.h b/linux-user/openrisc/target_signal.h inde

[Qemu-devel] [PATCH 07/15] linux-user: move sparc/sparc64 fcntl definitions to sparc/target_fcntl.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/sparc/target_fcntl.h | 34 ++ linux-user/syscall_defs.h | 39 --- 2 files changed, 34 insertions(+), 39 deletions(-) diff --git a/linux-user/sparc/target_fcntl.

[Qemu-devel] [PATCH 03/15] linux-user: move hppa fcntl definitions to hppa/target_fcntl.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/hppa/target_fcntl.h | 31 +++ linux-user/syscall_defs.h | 34 +- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/linux-user/hppa/target_fcntl.h b/linux-u

[Qemu-devel] [PATCH 04/15] linux-user: move arm/aarch64/m68k fcntl definitions to [arm|aarch64|m68k]/target_fcntl.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/aarch64/target_fcntl.h | 5 + linux-user/arm/target_fcntl.h | 6 ++ linux-user/m68k/target_fcntl.h| 6 ++ linux-user/syscall_defs.h | 7 +-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH 09/15] linux-user: move generic signal definitions to generic/signal.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/aarch64/target_signal.h| 2 ++ linux-user/arm/target_signal.h| 2 ++ linux-user/cris/target_signal.h | 2 ++ linux-user/generic/signal.h | 57 +++ linux-user/i386/target_si

[Qemu-devel] [PATCH 13/15] linux-user: move alpha signal definitions to alpha/target_signal.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/alpha/target_signal.h | 45 +++ linux-user/syscall_defs.h| 51 ++-- 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/linux-user/alpha/target_si

[Qemu-devel] [PATCH 10/15] linux-user: move sparc signal definitions to sparc/target_signal.h

2018-05-29 Thread Laurent Vivier
Remove sparc64/target_signal.h, use sparc/target_signal.h instead. Signed-off-by: Laurent Vivier --- linux-user/sparc/target_signal.h | 48 +++ linux-user/sparc64/signal.c| 1 - linux-user/sparc64/target_signal.h | 24 +- linux-user/sysc

[Qemu-devel] [PATCH 05/15] linux-user: move mips/mips64 fcntl definitions to mips/target_fcntl.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/mips/target_fcntl.h | 27 +++ linux-user/syscall_defs.h | 31 ++- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/linux-user/mips/target_fcntl.h b/linux-user/mip

[Qemu-devel] [PATCH 15/15] linux-user: remove useless #if

2018-05-29 Thread Laurent Vivier
Remove a "#if defined(XX) || defined(YY) || ..." with all available targets Signed-off-by: Laurent Vivier --- linux-user/syscall_defs.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index e2896ae1b3..40bb60ef4c 100644 --- a/l

[Qemu-devel] [PATCH 01/15] linux-user: move generic fcntl definitions to generic/fcntl.h

2018-05-29 Thread Laurent Vivier
add a per target target_fcntl.h and include the generic one from them No code change. Signed-off-by: Laurent Vivier --- linux-user/aarch64/target_fcntl.h| 11 +++ linux-user/alpha/target_fcntl.h | 11 +++ linux-user/arm/target_fcntl.h| 11 +++ linux-user/cris/target_fcntl.h

Re: [Qemu-devel] [PATCH v2] ARM: ACPI: Fix use-after-free due to memory realloc

2018-05-29 Thread Auger Eric
Hi Shannon, On 05/29/2018 04:09 PM, Shannon Zhao wrote: > > >> 在 2018年5月29日,21:53,Peter Maydell 写道: >> >>> On 29 May 2018 at 04:08, Shannon Zhao wrote: >>> acpi_data_push uses g_array_set_size to resize the memory size. If there >>> is no enough contiguous memory, the address will be changed.

[Qemu-devel] [PATCH 14/15] linux-user: move hppa signal definitions to hppa/target_signal.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/hppa/target_signal.h | 46 linux-user/syscall_defs.h | 52 - 2 files changed, 46 insertions(+), 52 deletions(-) diff --git a/linux-user/hppa/target_sig

[Qemu-devel] [PATCH 11/15] linux-user: move mips signal definitions to mips/target_signal.h

2018-05-29 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier --- linux-user/mips/target_signal.h | 50 ++ linux-user/mips64/target_signal.h | 49 ++ linux-user/syscall_defs.h | 56 +-- 3 files changed,

Re: [Qemu-devel] [Qemu-block] [PATCH 03/14] job: Add error message for failing jobs

2018-05-29 Thread Kevin Wolf
Am 29.05.2018 um 16:43 hat Jeff Cody geschrieben: > On Fri, May 25, 2018 at 06:33:16PM +0200, Kevin Wolf wrote: > > So far we relied on job->ret and strerror() to produce an error message > > for failed jobs. Not surprisingly, this tends to result in completely > > useless messages. > > > > This a

[Qemu-devel] [PATCH 08/15] linux-user: move get_sp_from_cpustate() to target_cpu.h

2018-05-29 Thread Laurent Vivier
Remove useless includes Fix HPPA include guard. Signed-off-by: Laurent Vivier --- linux-user/aarch64/signal.c | 1 - linux-user/aarch64/target_cpu.h | 4 linux-user/aarch64/target_signal.h| 7 --- linux-user/alpha/signal.c | 1 - linux-user/alpha/targ

Re: [Qemu-devel] [qemu PATCH v4 0/4] support NFIT platform capabilities

2018-05-29 Thread Ross Zwisler
Ping on this series. Rob, I think I've addressed all your feedback. Can you please verify? Thanks, - Ross On Mon, May 21, 2018 at 10:31:59AM -0600, Ross Zwisler wrote: > Changes since v3: > * Updated the text in docs/nvdimm.txt to make it clear that the value >being passed in on the comman

Re: [Qemu-devel] Live viewing qemu running image

2018-05-29 Thread Eric Blake
On 05/29/2018 07:33 AM, Olga Levy wrote: Hi, Nice to meet you. I'm a new security engineer and working on a prototype using QEMU. What I need is to collect running image internal data (like running processes, netstat, files modification, etc.) but without running any process inside. I mean, doi

Re: [Qemu-devel] [PATCH 00/15] linux-user: move more definitions out of syscall_defs.h

2018-05-29 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180529194207.31503-1-laur...@vivier.eu Subject: [Qemu-devel] [PATCH 00/15] linux-user: move more definitions out of syscall_defs.h === TEST SCRIPT BEGIN === #!/bin/bash B

Re: [Qemu-devel] [PATCH v4] block: fix QEMU crash with scsi-hd and drive_del

2018-05-29 Thread Kevin Wolf
Am 28.05.2018 um 14:03 hat Greg Kurz geschrieben: > Removing a drive with drive_del while it is being used to run an I/O > intensive workload can cause QEMU to crash. > > An AIO flush can yield at some point: > > blk_aio_flush_entry() > blk_co_flush(blk) > bdrv_co_flush(blk->root->bs) >...

Re: [Qemu-devel] [PATCH] qemu: Emit RESET event with -no-reboot option

2018-05-29 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 20180529055312.29633-1-christian_lud...@genua.de Subject: [Qemu-devel] [PATCH] qemu: Emit RESET event with -no-reboot option === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be inv

Re: [Qemu-devel] [PATCH 05/13] 9p: darwin: Handle struct dirent differences

2018-05-29 Thread Greg Kurz
On Sat, 26 May 2018 01:23:07 -0400 k...@juliacomputing.com wrote: > From: Keno Fischer > > Signed-off-by: Keno Fischer > --- > hw/9pfs/9p-synth.c | 4 > hw/9pfs/9p.c | 18 -- > 2 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/hw/9pfs/9p-synth.c b/

[Qemu-devel] [PATCH v2 03/16] job: Add error message for failing jobs

2018-05-29 Thread Kevin Wolf
So far we relied on job->ret and strerror() to produce an error message for failed jobs. Not surprisingly, this tends to result in completely useless messages. This adds a Job.error field that can contain an error string for a failing job, and a parameter to job_completed() that sets the field. As

[Qemu-devel] [PATCH v2 01/16] vdi: Fix vdi_co_do_create() return value

2018-05-29 Thread Kevin Wolf
.bdrv_co_create() is supposed to return 0 on success, but vdi could return a positive value instead. Fix this. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- block/vdi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/vdi.c b/block/vdi.c index 96a22b8e83.

[Qemu-devel] [PATCH v2 10/16] qemu-iotests: Rewrite 206 for blockdev-create job

2018-05-29 Thread Kevin Wolf
This rewrites the test case 206 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wo

[Qemu-devel] [PATCH v2 02/16] vhdx: Fix vhdx_co_create() return value

2018-05-29 Thread Kevin Wolf
.bdrv_co_create() is supposed to return 0 on success, but vhdx could return a positive value instead. Fix this. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- block/vhdx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vhdx.c b/block/vhdx

[Qemu-devel] [PATCH v2 00/16] block: Make blockdev-create a job and stable API

2018-05-29 Thread Kevin Wolf
This changes the x-blockdev-create QMP command so that it doesn't block the monitor and the main loop any more, but starts a background job that performs the image creation. The basic job as implemented here is all that is necessary to make image creation asynchronous and to provide a QMP interfac

[Qemu-devel] [PATCH v2 08/16] qemu-iotests: Add VM.run_job()

2018-05-29 Thread Kevin Wolf
Add an iotests.py function that runs a job and only returns when it is destroyed. An error is logged when the job failed and job-finalize and job-dismiss commands are issued if necessary. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 19 +++ 1 file changed, 19 ins

[Qemu-devel] [PATCH v2 06/16] qemu-iotests: Add VM.qmp_log()

2018-05-29 Thread Kevin Wolf
This adds a helper function that logs both the QMP request and the received response before returning it. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody --- tests/qemu-iotests/iotests.py | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qem

[Qemu-devel] [PATCH v2 04/16] block/create: Make x-blockdev-create a job

2018-05-29 Thread Kevin Wolf
This changes the x-blockdev-create QMP command so that it doesn't block the monitor and the main loop any more, but starts a background job that performs the image creation. The basic job as implemented here is all that is necessary to make image creation asynchronous and to provide a QMP interfac

[Qemu-devel] [PATCH v2 07/16] qemu-iotests: Add iotests.img_info_log()

2018-05-29 Thread Kevin Wolf
This adds a filter function to postprocess 'qemu-img info' input (similar to what _img_info does), and an img_info_log() function that calls 'qemu-img info' and logs the filtered output. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 18 ++ 1 file changed, 18 inser

[Qemu-devel] [PATCH v2 14/16] qemu-iotests: Rewrite 212 for blockdev-create job

2018-05-29 Thread Kevin Wolf
This rewrites the test case 212 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wo

[Qemu-devel] [PATCH v2 05/16] qemu-iotests: Add VM.get_qmp_events_filtered()

2018-05-29 Thread Kevin Wolf
This adds a helper function that returns a list of QMP events that are already filtered through filter_qmp_event(). Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/q

[Qemu-devel] [PATCH v2 16/16] block/create: Mark blockdev-create stable

2018-05-29 Thread Kevin Wolf
We're ready to declare the blockdev-create job stable. This renames the corresponding QMP command from x-blockdev-create to blockdev-create. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- qapi/block-core.json | 4 ++-- qapi/job.json | 2 +- blo

[Qemu-devel] [PATCH v2 13/16] qemu-iotests: Rewrite 211 for blockdev-create job

2018-05-29 Thread Kevin Wolf
This rewrites the test case 211 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wo

[Qemu-devel] [PATCH v2 09/16] qemu-iotests: iotests.py helper for non-file protocols

2018-05-29 Thread Kevin Wolf
This adds two helper functions that are useful for test cases that make use of a non-file protocol (specifically ssh). Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iot

[Qemu-devel] [PATCH v2 11/16] qemu-iotests: Rewrite 207 for blockdev-create job

2018-05-29 Thread Kevin Wolf
This rewrites the test case 207 to work with the new x-blockdev-create job rather than the old synchronous version of the command. Most of the test cases stay the same as before (the exception being some improved 'size' options that allow distinguishing which command created the image), but in ord

Re: [Qemu-devel] [PATCH 07/13] 9p: darwin: Properly translate AT_REMOVEDIR flag

2018-05-29 Thread Greg Kurz
On Sat, 26 May 2018 01:23:09 -0400 k...@juliacomputing.com wrote: > From: Keno Fischer > > This code relied on P9_DOTL_AT_REMOVEDIR and AT_REMOVEDIR having the same > numerical value, but on Darwin, they do not. > > Signed-off-by: Keno Fischer > --- > hw/9pfs/9p-local.c | 12 +++- > 1

[Qemu-devel] [PATCH v2 12/16] qemu-iotests: Rewrite 210 for blockdev-create job

2018-05-29 Thread Kevin Wolf
This rewrites the test case 210 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wo

Re: [Qemu-devel] [PATCH v2 2/2] qapi: remove empty flat union branches and types

2018-05-29 Thread Eric Blake
On 05/29/2018 11:41 AM, Anton Nefedov wrote: Flat unions may now have uncovered branches, so it is possible to get rid of empty types defined for that purpose only. Signed-off-by: Anton Nefedov --- qapi/block-core.json | 55 qapi/crypto.js

[Qemu-devel] [PATCH v2 15/16] qemu-iotests: Rewrite 213 for blockdev-create job

2018-05-29 Thread Kevin Wolf
This rewrites the test case 213 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wo

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Suppress NSFileHandlingPanelOKButton depreciation warning

2018-05-29 Thread Eric Blake
On 05/29/2018 01:08 PM, John Arbuckle wrote: In the subject: s/depreciation/deprecation/ OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and would rather you use NSModalResponseOK, which was introduced in OS 10.9. Use the recommended new constant name, with a backward compatibili

Re: [Qemu-devel] [PATCH v2 1/2] qapi: allow empty branches in flat unions

2018-05-29 Thread Eric Blake
On 05/29/2018 11:41 AM, Anton Nefedov wrote: It often happens that just a few discriminator values imply extra data in a flat union. Existing checks did not make possible to leave other values uncovered. Such cases had to be worked around by either stating a dummy (empty) type or introducing anot

Re: [Qemu-devel] [PATCH 06/13] 9p: darwin: Address minor differences

2018-05-29 Thread Greg Kurz
On Sat, 26 May 2018 01:23:08 -0400 k...@juliacomputing.com wrote: > From: Keno Fischer > > - Darwin doesn't have strchrnul > - Comparisons of mode_t with -1 require an explicit cast, since mode_t > is unsigned on Darwin. > > Signed-off-by: Keno Fischer > --- > hw/9pfs/9p-local.c | 9 ++-

Re: [Qemu-devel] [PATCH 08/13] 9p: darwin: Ignore O_{NOATIME, DIRECT}

2018-05-29 Thread Greg Kurz
On Sat, 26 May 2018 01:23:10 -0400 k...@juliacomputing.com wrote: > From: Keno Fischer > > Signed-off-by: Keno Fischer > --- > hw/9pfs/9p.c | 37 +++-- > 1 file changed, 23 insertions(+), 14 deletions(-) > > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > index 4965

Re: [Qemu-devel] [PATCH v4] block: fix QEMU crash with scsi-hd and drive_del

2018-05-29 Thread Greg Kurz
On Tue, 29 May 2018 22:19:17 +0200 Kevin Wolf wrote: > Am 28.05.2018 um 14:03 hat Greg Kurz geschrieben: > > Removing a drive with drive_del while it is being used to run an I/O > > intensive workload can cause QEMU to crash. > > > > An AIO flush can yield at some point: > > > > blk_aio_flush_e

[Qemu-devel] [RFC 2/3] hw/char/nrf51_uart: Implement nRF51 SoC UART

2018-05-29 Thread Julia Suvorova via Qemu-devel
Basic implementation of nRF51 SoC UART. Description could be found here: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.1.pdf The following features are not yet implemented: Control with SUSPEND/START*/STOP* CTS/NCTS flow control Mapping registers to pins Signed-off-by: Julia Suvo

[Qemu-devel] [RFC 1/3] hw/arm/nrf51_soc: Fix compilation and memory regions

2018-05-29 Thread Julia Suvorova via Qemu-devel
nRF51 SoC implementation is intended for the BBC Micro:bit board, which has 256 KB flash and 16 KB RAM. Added FICR defines. Signed-off-by: Julia Suvorova --- hw/arm/nrf51_soc.c | 12 +++- include/hw/arm/nrf51_soc.h | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --

[Qemu-devel] [RFC 0/3] nRF51 SoC: Add UART support

2018-05-29 Thread Julia Suvorova via Qemu-devel
This series adds basic support for the nRF51 SoC UART, that used in BBC Micro:bit board, and QTest for it. Based-on: <20180503090532.3113-1-j...@jms.id.au> Julia Suvorova (3): hw/arm/nrf51_soc: Fix compilation and memory regions hw/char/nrf51_uart: Implement nRF51 SoC UART tests/boot-serial

[Qemu-devel] [RFC 3/3] tests/boot-serial-test: Add support for the microbit board

2018-05-29 Thread Julia Suvorova via Qemu-devel
New mini-kernel test for nRF51 SoC UART. Signed-off-by: Julia Suvorova --- tests/boot-serial-test.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c index 4d6815c3e0..e6dbc8a293 100644 --- a/tests/boot-serial-test.c +++ b/tests/

Re: [Qemu-devel] cmdline: How to connect a SD card to a specific SD controller?

2018-05-29 Thread Philippe Mathieu-Daudé
On 05/28/2018 01:30 AM, Philippe Mathieu-Daudé wrote: > Hi, > > I'd like to connect a specific SD card to a specific SDHCI from command > line, and I'm getting a bit lost with command line options. > > I'm using an updated version of this patch, but this is not relevant to > this thread: > http:/

Re: [Qemu-devel] [PATCH] target/ppc: Use proper logging function for possible guest errors

2018-05-29 Thread Alistair Francis
On Mon, May 28, 2018 at 11:11 AM, Thomas Huth wrote: > fprintf() and qemu_log_separate() are frowned upon these days for printing > logging information in QEMU. Accessing the wrong SPRs indicates wrong guest > behaviour in most cases, and we've got a proper way to log such situations, > which is t

Re: [Qemu-devel] [PATCH v1 03/30] RISC-V: Use atomic_cmpxchg to update PLIC bitmaps

2018-05-29 Thread Alistair Francis
On Tue, May 22, 2018 at 5:14 PM, Michael Clark wrote: > The PLIC previously used a mutex to protect against concurrent > access to the claimed and pending bitfields. Instead of using > a mutex, we update the bitfields using atomic_cmpxchg. > > Rename sifive_plic_num_irqs_pending to sifive_plic_irq

Re: [Qemu-devel] [PATCH v1 09/30] RISC-V: Implement atomic mip/sip CSR updates

2018-05-29 Thread Alistair Francis
On Tue, May 22, 2018 at 5:14 PM, Michael Clark wrote: > Use the new CSR read/modify/write interface to implement > atomic updates to mip/sip. > > Cc: Sagar Karandikar > Cc: Bastian Koppelmann > Cc: Palmer Dabbelt > Cc: Alistair Francis > Signed-off-by: Michael Clark Acked-by: Alistair Franci

Re: [Qemu-devel] [PATCH v1 12/30] RISC-V: Mark mstatus.fs dirty

2018-05-29 Thread Alistair Francis
On Tue, May 22, 2018 at 5:14 PM, Michael Clark wrote: > From: Richard Henderson > > Modifed from Richard Henderson's patch [1] to integrate > with the new control and status register implementation. > > [1] https://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg07034.html > > Note: the f* CS

Re: [Qemu-devel] [PATCH v1 11/30] RISC-V: Split out mstatus_fs from tb_flags

2018-05-29 Thread Alistair Francis
On Tue, May 22, 2018 at 5:14 PM, Michael Clark wrote: > From: Richard Henderson > > Cc: Sagar Karandikar > Cc: Bastian Koppelmann > Cc: Palmer Dabbelt > Cc: Alistair Francis > Cc: Richard Henderson > Signed-off-by: Michael Clark > Reviewed-by: Michael Clark Shouldn't this also have Richar

<    1   2   3   4   >