Re: [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-24 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, May 23, 2018 at 05:53:34PM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > On Wed, May 23, 2018 at 11:17:55AM +0200, Markus Armbruster wrote: >> >> Eduardo Habkost writes: >> >> > On Mon, May 21, 2018 at 04:46:36PM -0300, Daniel Henrique Bar

[Qemu-devel] [PATCH] RISC-V: Correct typo in RV32 perf counters

2018-05-24 Thread Michael Clark
This patch enables mhpmcounter3h through mhpmcounter31h on RV32. Previously the RV32 h versions (high 32-bits of 64-bit counters) of these counters would trap with an illegal instruction instead of returning 0 as intended. Reported-by: Richard Henderson Signed-off-by: Michael Clark --- target/r

Re: [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Fam Zheng
On Fri, 05/25 07:47, Markus Armbruster wrote: > Fam Zheng writes: > > > On Thu, 05/24 19:16, Paolo Bonzini wrote: > >> On 21/05/2018 08:35, Fam Zheng wrote: > >> > Coverity doesn't like the tests under fail label (report CID 1385847). > >> > Reset the fields so the clean up order is more apparent

Re: [Qemu-devel] [RISC-V] Coverity 1390849, Logically dead code

2018-05-24 Thread Michael Clark
On Fri, May 25, 2018 at 9:54 AM, Richard Henderson wrote: > In the latest Coverity scan, it reports > > 405if (csrno >= CSR_MHPMCOUNTER3 && csrno <= CSR_MHPMCOUNTER31) { > 406return 0; > 407} > 408#if defined(TARGET_RISCV32) > 409if (csrno >= CSR_MHPMCOUNTER3 && csrno <= CSR_M

Re: [Qemu-devel] [PATCH v4 2/3] libqtest: fail if child coredumps

2018-05-24 Thread Thomas Huth
On 24.05.2018 20:25, Michael S. Tsirkin wrote: > Right now tests report OK status if QEMU crashes during cleanup. > Let's catch that case and fail the test. > > Signed-off-by: Michael S. Tsirkin > --- > tests/libqtest.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --

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

2018-05-24 Thread Fam Zheng
On Thu, 05/24 20:58, Cleber Rosa wrote: > 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

Re: [Qemu-devel] [PATCH v7 04/11] hmp: disable monitor in preconfig state

2018-05-24 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, May 24, 2018 at 08:16:20PM +0200, Markus Armbruster wrote: >> Markus Armbruster writes: >> >> > Igor Mammedov writes: >> > >> >> Ban it for now, if someone would need it to work early, >> >> one would have to implement checks if HMP command is valid >> >> at p

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

2018-05-24 Thread Fam Zheng
On Thu, 05/24 20:58, Cleber Rosa wrote: > The set_console() method is intended to ease higher level use cases > that require a console device. > > The amount of inteligence is limited on purpose, requiring either the > device type explicitly, or the existence of a machine (pattern) > definition. >

Re: [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Markus Armbruster
Fam Zheng writes: > On Thu, 05/24 19:16, Paolo Bonzini wrote: >> On 21/05/2018 08:35, Fam Zheng wrote: >> > Coverity doesn't like the tests under fail label (report CID 1385847). >> > Reset the fields so the clean up order is more apparent. >> > >> > Signed-off-by: Fam Zheng >> > --- >> > bloc

Re: [Qemu-devel] [PATCH v2 2/1] libqtest: add more exit status checks

2018-05-24 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Thu, May 24, 2018 at 01:16:24PM -0500, Eric Blake wrote: >> On 05/24/2018 11:01 AM, Michael S. Tsirkin wrote: >> > On Thu, May 24, 2018 at 11:00:19AM -0500, Eric Blake wrote: >> > > On 05/24/2018 10:52 AM, Eric Blake wrote: >> > > >> > > > Also, since waitpid()

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

2018-05-24 Thread Fam Zheng
On Thu, 05/24 20:58, Cleber Rosa wrote: > This patch adds a few simple behavior tests for VNC. These tests > introduce manipulation of the QEMUMachine arguments, by setting > the arguments, instead of adding to the existing ones. I'm confused by this. The code uses 'add_args', so it does add to t

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

2018-05-24 Thread Fam Zheng
On Thu, 05/24 20:58, Cleber Rosa wrote: > 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 functionali

Re: [Qemu-devel] Questions about vNVDIMM on qemu/KVM

2018-05-24 Thread Yasunori Goto
> > > > But ,I would like understand one more thing. > > In the following mail, it seems that e820 bus will be used for fake DAX. > > > > https://lists.01.org/pipermail/linux-nvdimm/2018-January/013926.html > > > > Could you tell me what is relationship between "fake DAX" in this mail > > and Gues

[Qemu-devel] [PATCH] bochs-display: add missing break

2018-05-24 Thread Gerd Hoffmann
Fixes: CID 1391291 Signed-off-by: Gerd Hoffmann --- hw/display/bochs-display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c index c33524b558..1187d77576 100644 --- a/hw/display/bochs-display.c +++ b/hw/display/bochs-display.c @@ -158,

Re: [Qemu-devel] [PATCH v2 1/1] sandbox: disable -sandbox if CONFIG_SECCOMP undefined

2018-05-24 Thread Yi Min Zhao
在 2018/5/24 下午9:40, Paolo Bonzini 写道: On 24/05/2018 09:53, Eduardo Otubo wrote: Thanks! But I have not got response from Paolo.  I have added him to CC list.  I'll just wait one more ACK and will send a pull request on the seccomp queue. Thanks for the contribution. So... what I should d

Re: [Qemu-devel] [PATCH] gdbstub: Prevent fd leakage

2018-05-24 Thread Thomas Huth
On 25.05.2018 00:34, Philippe Mathieu-Daudé wrote: > Since 2f652224f7, we now check if socket_set_nodelay() errored, > but forgot to close the socket before reporting an error. > > Fixes: Coverity CID 1391290 (RESOURCE_LEAK) > Signed-off-by: Philippe Mathieu-Daudé > --- > gdbstub.c | 1 + > 1 fi

Re: [Qemu-devel] [PATCH v7 4/4] monitor: add lock to protect mon_fdsets

2018-05-24 Thread Peter Xu
On Thu, May 24, 2018 at 10:28:37AM +0100, Stefan Hajnoczi wrote: > On Thu, May 24, 2018 at 12:39:52PM +0800, Peter Xu wrote: > > int monitor_fdset_get_fd(int64_t fdset_id, int flags) > > { > > -#ifndef _WIN32 > > +#ifdef _WIN32 > > +return -ENOENT; > > stubs/fdset.c:monitor_fdset_get_fd() sh

Re: [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API

2018-05-24 Thread Peter Xu
On Thu, May 24, 2018 at 11:54:17AM +0100, Peter Maydell wrote: > On 24 May 2018 at 07:23, Peter Xu wrote: > > On Wed, May 23, 2018 at 12:47:16PM +0100, Peter Maydell wrote: > >> On 23 May 2018 at 02:06, Peter Xu wrote: > >> > Could you elaborate a bit more on why IOMMU notifier failed to > >> > c

Re: [Qemu-devel] [PULL 1/2] Implement .hex file loader

2018-05-24 Thread Su Hang
You are right. I'm shocked by my mistakes... > The hex format is used mainly by Cortex-M boards. This code doesn't > support them, because armv7m uses its own load function. Could you add > support for armv7m? > > Best regards, Julia Suvorova. Julia indeed have mentioned me about this. But at th

Re: [Qemu-devel] [PULL 2/2] Add QTest testcase for the Intel Hexadecimal

2018-05-24 Thread Su Hang
Sure, I will list other involved files. Thanks for you suggestion. SU Hang "Eric Blake" wrote: > On 05/24/2018 06:29 AM, Su Hang wrote: > > 'test.hex' file is a bare metal ARM software stored in Hexadecimal > > Object Format. When it's loaded by QEMU, it will print "Hello world!\n" > > on console

Re: [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Fam Zheng
On Thu, 05/24 19:16, Paolo Bonzini wrote: > On 21/05/2018 08:35, Fam Zheng wrote: > > Coverity doesn't like the tests under fail label (report CID 1385847). > > Reset the fields so the clean up order is more apparent. > > > > Signed-off-by: Fam Zheng > > --- > > block/nvme.c | 7 +++ > > 1 f

[Qemu-devel] [PATCH] migration: use g_free for ram load bitmap

2018-05-24 Thread Peter Xu
Buffers allocated with bitmap_new() should be freed with g_free(). Both reported by Coverity: *** CID 1391300: API usage errors (ALLOC_FREE_MISMATCH) /migration/ram.c: 3517 in ram_dirty_bitmap_reload() 3511 * the last one to sync, we need to notify the main send thread. 3512 *

[Qemu-devel] [Bug 1769189] Re: Issue with qemu 2.12.0 + SATA

2018-05-24 Thread John Snow
I tried bisecting as well, and I wound up at: 1a423896 -- five out of five boot attempts succeeded. d759c951 -- five out of five boot attempts failed. d759c951f3287fad04210a52f2dc93f94cf58c7f is the first bad commit commit d759c951f3287fad04210a52f2dc93f94cf58c7f Author: Alex Bennée Date: Tue

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

2018-05-24 Thread Cleber Rosa
On 05/24/2018 08:58 PM, Cleber Rosa wrote: > 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

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

2018-05-24 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 2/5] scripts/qemu.py: allow adding to the list of extra arguments

2018-05-24 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..7813dd45ad 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py

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

2018-05-24 Thread Cleber Rosa
The set_console() method is intended to ease higher level use cases that require a console device. The amount of inteligence 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 criteri

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

2018-05-24 Thread Cleber Rosa
This patch adds a few simple behavior tests for VNC. These tests introduce manipulation of the QEMUMachine arguments, by setting the arguments, instead of adding to the existing ones. Signed-off-by: Cleber Rosa --- tests/acceptance/test_vnc.py | 50 1 file c

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

2018-05-24 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 0/5] Acceptance/functional tests

2018-05-24 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[

Re: [Qemu-devel] QEMU: Multiple PCI domains for x86 PCI Express Machine (Q35)

2018-05-24 Thread Zihan Yang
2018-05-24 19:54 GMT+08:00 Marcel Apfelbaum : > Hi Aaron > > On 05/24/2018 12:31 PM, Wei, Aaron wrote: >> >> >> Hi, Marcel >> >> It's my pleasure to write to you on behalf of a team who is developing the >> Intel VMD virtualization base on QEMU in Dell EMC. >> >> From https://www.outreachy.org. we

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

2018-05-24 Thread Greg Kurz
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) ... qemu_coroutine_yield() and let the HMP command to run, free bl

Re: [Qemu-devel] [PATCH v1 15/30] RISC-V: Add hartid and \n to interrupt logging

2018-05-24 Thread Alistair Francis
On Wed, May 23, 2018 at 5:33 AM, Philippe Mathieu-Daudé wrote: > Hi Michael, > > On 05/22/2018 09:15 PM, Michael Clark wrote: >> Add carriage return that was erroneously removed >> when converting to qemu_log. Change hard coded >> core number to the actual hartid. > > I think it makes more sens to

Re: [Qemu-devel] [PATCH v1 26/30] RISC-V: Remove unnecessary disassembler constraints

2018-05-24 Thread Alistair Francis
On Tue, May 22, 2018 at 5:15 PM, Michael Clark wrote: > Remove machine generated constraints that are not > referenced by the pseudo-instruction constraints. > > Cc: Palmer Dabbelt > Cc: Sagar Karandikar > Cc: Bastian Koppelmann > Cc: Alistair Francis > Signed-off-by: Michael Clark Acked-by:

Re: [Qemu-devel] [PATCH v1 18/30] RISC-V: Add missing free for plic_hart_config

2018-05-24 Thread Alistair Francis
On Wed, May 23, 2018 at 5:40 AM, Philippe Mathieu-Daudé wrote: > On 05/22/2018 09:15 PM, Michael Clark wrote: >> Cc: Palmer Dabbelt >> Cc: Sagar Karandikar >> Cc: Bastian Koppelmann >> Cc: Alistair Francis >> Signed-off-by: Michael Clark > > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by:

[Qemu-devel] [PATCH] gdbstub: Prevent fd leakage

2018-05-24 Thread Philippe Mathieu-Daudé
Since 2f652224f7, we now check if socket_set_nodelay() errored, but forgot to close the socket before reporting an error. Fixes: Coverity CID 1391290 (RESOURCE_LEAK) Signed-off-by: Philippe Mathieu-Daudé --- gdbstub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdbstub.c b/gdbstub.c inde

Re: [Qemu-devel] [Qemu-trivial] [PULL 20/22] gdbstub: Handle errors in gdb_accept()

2018-05-24 Thread Philippe Mathieu-Daudé
On 05/24/2018 06:35 PM, Paolo Bonzini wrote: > On 20/05/2018 08:15, Michael Tokarev wrote: >> From: Peter Maydell >> >> In gdb_accept(), we both fail to check all errors (notably >> that from socket_set_nodelay(), as Coverity notes in CID 1005666), >> and fail to return an error status back to our

Re: [Qemu-devel] [Qemu-arm] [PATCH] arm: fix malloc type mismatch

2018-05-24 Thread Philippe Mathieu-Daudé
Cc'ing qemu-devel for patchew and co On 05/24/2018 06:37 PM, Paolo Bonzini wrote: > cpregs_keys is an uint32_t* so the allocation should use uint32_t. > g_new is even better because it is type-safe. > > Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé > --- > target/arm/gdbst

[Qemu-devel] [RISC-V] Coverity 1390849, Logically dead code

2018-05-24 Thread Richard Henderson
In the latest Coverity scan, it reports 405if (csrno >= CSR_MHPMCOUNTER3 && csrno <= CSR_MHPMCOUNTER31) { 406return 0; 407} 408#if defined(TARGET_RISCV32) 409if (csrno >= CSR_MHPMCOUNTER3 && csrno <= CSR_MHPMCOUNTER31) { CID 1390849 (#1 of 1): Logically dead code (DEAD

Re: [Qemu-devel] [PULL 20/22] gdbstub: Handle errors in gdb_accept()

2018-05-24 Thread Paolo Bonzini
On 20/05/2018 08:15, Michael Tokarev wrote: > From: Peter Maydell > > In gdb_accept(), we both fail to check all errors (notably > that from socket_set_nodelay(), as Coverity notes in CID 1005666), > and fail to return an error status back to our caller. Correct > both of these things, so that er

Re: [Qemu-devel] [Qemu-block] Problem with data miscompare using scsi-hd, cache=none and io=threads

2018-05-24 Thread Daniel Henrique Barboza
On 05/24/2018 11:04 AM, Stefan Hajnoczi wrote: On Tue, May 15, 2018 at 06:25:46PM -0300, Daniel Henrique Barboza wrote: This means that the test executed a write at  LBA 0x94fa and, after confirming that the write was completed, issue 2 reads in the same LBA to assert the written contents and

Re: [Qemu-devel] [PATCH 17/27] exec.c: Handle IOMMUs in address_space_translate_for_iotlb()

2018-05-24 Thread Auger Eric
Hi Peter, On 05/23/2018 11:51 AM, Alex Bennée wrote: > > Peter Maydell writes: > >> Currently we don't support board configurations that put an IOMMU >> in the path of the CPU's memory transactions, and instead just >> assert() if the memory region fonud in address_space_translate_for_iotlb() f

Re: [Qemu-devel] [PATCH v11 1/5] i386: Clean up cache CPUID code

2018-05-24 Thread Eduardo Habkost
On Thu, May 24, 2018 at 11:43:30AM -0400, Babu Moger wrote: > From: Eduardo Habkost > > Always initialize CPUCaches structs with cache information, even > if legacy_cache=true. Use different CPUCaches struct for > CPUID[2], CPUID[4], and the AMD CPUID leaves. > > This will simplify a lot the lo

Re: [Qemu-devel] [RFC 0/2] ARM virt: Support up to 256 PCIe buses

2018-05-24 Thread Auger Eric
On 05/24/2018 07:20 PM, Laszlo Ersek wrote: > On 05/24/18 16:14, Ard Biesheuvel wrote: >> On 24 May 2018 at 15:59, Laszlo Ersek wrote: >>> On 05/24/18 15:07, Peter Maydell wrote: On 24 May 2018 at 13:59, Laszlo Ersek wrote: > On 05/24/18 11:11, Peter Maydell wrote: >> Won't it also

Re: [Qemu-devel] [PATCH v11 0/5] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-05-24 Thread Eduardo Habkost
On Thu, May 24, 2018 at 11:51:29AM -0400, Kash Pande wrote: > Tested-by: Kash Pande > > > Hopefully we can get this merged because it's taken a ridiculously long > time with many back-and-forths for small issues that could have been put > off til later. I understand this is frustrating, and thi

Re: [Qemu-devel] [PATCH 15/27] iommu: Add IOMMU index argument to notifier APIs

2018-05-24 Thread Auger Eric
Hi Peter, On 05/24/2018 07:03 PM, Peter Maydell wrote: > On 24 May 2018 at 16:29, Auger Eric wrote: >> On 05/21/2018 04:03 PM, Peter Maydell wrote: >>> diff --git a/include/exec/memory.h b/include/exec/memory.h >>> index f6226fb263..4e6b125add 100644 >>> --- a/include/exec/memory.h >>> +++ b/inclu

Re: [Qemu-devel] [PATCH] tcg: Fix helper function vs host abi for float16

2018-05-24 Thread Richard Henderson
On 05/24/2018 06:21 AM, Peter Maydell wrote: > Applied to target-arm.next, thanks. Is it worth marking this as > cc:stable? Probably, since we've marked most of the other f16 patches for stable. r~

Re: [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-24 Thread Eduardo Habkost
On Wed, May 23, 2018 at 05:53:34PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Wed, May 23, 2018 at 11:17:55AM +0200, Markus Armbruster wrote: > >> Eduardo Habkost writes: > >> > On Mon, May 21, 2018 at 04:46:36PM -0300, Daniel Henrique Barboza wrote: > > [...] > >> >> Sin

Re: [Qemu-devel] [PATCH] migration: fix exec/fd migrations

2018-05-24 Thread Juan Quintela
John Snow wrote: > On 05/23/2018 05:14 AM, Juan Quintela wrote: >> Commit: >> >> commit 36c2f8be2c4eb0003ac77a14910842b7ddd7337e >> Author: Juan Quintela >> Date: Wed Mar 7 08:40:52 2018 +0100 >> >> migration: Delay start of migration main routines >> >> Missed tcp and fd transports. Th

Re: [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event

2018-05-24 Thread John Snow
On 05/24/2018 02:22 PM, Eric Blake wrote: > On 05/24/2018 12:36 PM, John Snow wrote: > On 05/18/2018 09:21 AM, Kevin Wolf wrote: > This adds a QMP event that is emitted whenever a job transitions from > one status to another. > > Signed-off-by: Kevin Wolf > >>> >>> The que

[Qemu-devel] [PATCH v4 3/3] libqtest: add more exit status checks

2018-05-24 Thread Michael S. Tsirkin
Add more checks on how did QEMU exit. Legal ways to exit right now: - exit(0) or return from main - kill(SIGTERM) - sent by testing infrastructure Signed-off-by: Michael S. Tsirkin --- tests/libqtest.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/libqte

Re: [Qemu-devel] [PATCH v7 04/11] hmp: disable monitor in preconfig state

2018-05-24 Thread Eduardo Habkost
On Thu, May 24, 2018 at 08:16:20PM +0200, Markus Armbruster wrote: > Markus Armbruster writes: > > > Igor Mammedov writes: > > > >> Ban it for now, if someone would need it to work early, > >> one would have to implement checks if HMP command is valid > >> at preconfig state. > >> > >> Signed-of

[Qemu-devel] [PATCH v4 2/3] libqtest: fail if child coredumps

2018-05-24 Thread Michael S. Tsirkin
Right now tests report OK status if QEMU crashes during cleanup. Let's catch that case and fail the test. Signed-off-by: Michael S. Tsirkin --- tests/libqtest.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 43fb97e..f869854

[Qemu-devel] [PATCH v4 0/3] libqtest: verify QEMU exit status

2018-05-24 Thread Michael S. Tsirkin
Whenever QEMU coredumps, the test would previously succeed. With this patchset applied, one sees: assertion failed: !WCOREDUMP(wstatus) Changes from v3: - add osdep stubs for non-linux platforms, suggested by Thomas Changes from v2: - bugfix - assert returned pid - rework complex asserts for

[Qemu-devel] [PATCH v4 1/3] osdep: add wait.h compat macros

2018-05-24 Thread Michael S. Tsirkin
Man page for WCOREDUMP says: WCOREDUMP(wstatus) returns true if the child produced a core dump. This macro should be employed only if WIFSIGNALED returned true. This macro is not specified in POSIX.1-2001 and is not available on some UNIX implementations (e.g., AIX, SunOS). Therefor

Re: [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event

2018-05-24 Thread Eric Blake
On 05/24/2018 12:36 PM, John Snow wrote: On 05/18/2018 09:21 AM, Kevin Wolf wrote: This adds a QMP event that is emitted whenever a job transitions from one status to another. Signed-off-by: Kevin Wolf The question that I was asking myself was just whether I'd literally duplicate the exis

Re: [Qemu-devel] [PATCH v2 2/1] libqtest: add more exit status checks

2018-05-24 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 01:16:24PM -0500, Eric Blake wrote: > On 05/24/2018 11:01 AM, Michael S. Tsirkin wrote: > > On Thu, May 24, 2018 at 11:00:19AM -0500, Eric Blake wrote: > > > On 05/24/2018 10:52 AM, Eric Blake wrote: > > > > > > > Also, since waitpid() can only return either s->qemu_pid or

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

2018-05-24 Thread Laurent Vivier
Le 16/05/2018 à 16:47, Steve Mcpolin a écrit : > When a guest mmap()'d a file, a transient MAP_ANONYMOUS mapping was > created, which required the kernel to reserve this memory, then > subsequently released by applying a mapping with just the requested > flags and fd. > This transient mapping cause

Re: [Qemu-devel] [PATCH v2 2/1] libqtest: add more exit status checks

2018-05-24 Thread Eric Blake
On 05/24/2018 11:01 AM, Michael S. Tsirkin wrote: On Thu, May 24, 2018 at 11:00:19AM -0500, Eric Blake wrote: On 05/24/2018 10:52 AM, Eric Blake wrote: Also, since waitpid() can only return either s->qemu_pid or -1 as we aren't using WNOHANG, it may also be worth asserting that if pid == -1, w

Re: [Qemu-devel] [PATCH v7 04/11] hmp: disable monitor in preconfig state

2018-05-24 Thread Markus Armbruster
Markus Armbruster writes: > Igor Mammedov writes: > >> Ban it for now, if someone would need it to work early, >> one would have to implement checks if HMP command is valid >> at preconfig state. >> >> Signed-off-by: Igor Mammedov >> Reviewed-by: Eric Blake >> --- >> v5: >> * add 'use QMP in

Re: [Qemu-devel] [PATCH v3 2/1] libqtest: add more exit status checks

2018-05-24 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 07:58:06PM +0200, Thomas Huth wrote: > On 24.05.2018 19:33, Michael S. Tsirkin wrote: > > On Thu, May 24, 2018 at 07:26:16PM +0200, Thomas Huth wrote: > >> On 24.05.2018 18:11, Michael S. Tsirkin wrote: > >>> Add more checks on how did QEMU exit. > >>> > >>> Legal ways to ex

Re: [Qemu-devel] [PATCH] prep: fix keyboard for the 40p machine

2018-05-24 Thread Hervé Poussineau
Le 24/05/2018 à 07:39, Mark Cave-Ayland a écrit : Commit 72d3d8f052 "hw/isa/superio: Add a keyboard/mouse controller (8042)" added an 8042 keyboard device to the PC87312 superio device to replace that being used by the prep machine. Unfortunately this commit didn't do the same for the 40p machin

Re: [Qemu-devel] [Qemu-ppc] [PATCH] prep: fix keyboard for the 40p machine

2018-05-24 Thread Thomas Huth
On 24.05.2018 18:20, Philippe Mathieu-Daudé wrote: > On 05/24/2018 02:39 AM, Mark Cave-Ayland wrote: >> Commit 72d3d8f052 "hw/isa/superio: Add a keyboard/mouse controller (8042)" >> added an 8042 keyboard device to the PC87312 superio device to replace that >> being used by the prep machine. >> >>

[Qemu-devel] [PATCH v3 2/2] vfio-ccw: remove orb.c64 (64 bit data addresses) check

2018-05-24 Thread Halil Pasic
The vfio-ccw module does the check too, and there is actually no technical obstacle for supporting fmt 1 idaws. Let us be ready for the beautiful day when fmt 1 idaws become supported by the vfio-ccw kernel module. QEMU does not have to do a thing for that, except not insisting on this check. Sign

[Qemu-devel] [PATCH v3 1/2] vfio-ccw: add force unlimited prefetch property

2018-05-24 Thread Halil Pasic
There is at least one guest (OS) such that although it does not rely on the guarantees provided by ORB 1 word 9 bit (aka unlimited prefetch, aka P bit) not being set, it fails to tell this to the machine. Usually this ain't a big deal, as the original purpose of the P bit is to allow for performan

[Qemu-devel] [PATCH v3 0/2] vfio-ccw: loosen orb flags checks

2018-05-24 Thread Halil Pasic
See the individual patches (inclusive change log). Halil Pasic (2): vfio-ccw: add force unlimited prefetch property vfio-ccw: remove orb.c64 (64 bit data addresses) check hw/s390x/css.c | 12 hw/vfio/ccw.c | 35 +++ 2 files changed, 35 insertions

Re: [Qemu-devel] [PATCH v3 2/1] libqtest: add more exit status checks

2018-05-24 Thread Thomas Huth
On 24.05.2018 19:33, Michael S. Tsirkin wrote: > On Thu, May 24, 2018 at 07:26:16PM +0200, Thomas Huth wrote: >> On 24.05.2018 18:11, Michael S. Tsirkin wrote: >>> Add more checks on how did QEMU exit. >>> >>> Legal ways to exit right now: >>> - exit(0) or return from main >>> - kill(SIGTERM) - sen

Re: [Qemu-devel] [PATCH] migration: fix exec/fd migrations

2018-05-24 Thread John Snow
On 05/23/2018 05:14 AM, Juan Quintela wrote: > Commit: > > commit 36c2f8be2c4eb0003ac77a14910842b7ddd7337e > Author: Juan Quintela > Date: Wed Mar 7 08:40:52 2018 +0100 > > migration: Delay start of migration main routines > > Missed tcp and fd transports. This fix its. > > Reported-b

Re: [Qemu-devel] [PATCH v2 17/40] job: Move BlockJobCreateFlags to Job

2018-05-24 Thread John Snow
On 05/24/2018 04:17 AM, Kevin Wolf wrote: > Am 24.05.2018 um 00:24 hat John Snow geschrieben: >> >> >> On 05/18/2018 09:20 AM, Kevin Wolf wrote: >>> +job->auto_finalize = !(flags & JOB_MANUAL_FINALIZE); >>> +job->auto_dismiss = !(flags & JOB_MANUAL_DISMISS); >> >> Job API might be a good

Re: [Qemu-devel] [PATCH v2 21/40] job: Convert block_job_cancel_async() to Job

2018-05-24 Thread John Snow
On 05/24/2018 04:24 AM, Kevin Wolf wrote: > Am 24.05.2018 um 01:18 hat John Snow geschrieben: >>> diff --git a/include/qemu/job.h b/include/qemu/job.h >>> index 3e817beee9..2648c74281 100644 >>> --- a/include/qemu/job.h >>> +++ b/include/qemu/job.h >>> @@ -97,6 +97,12 @@ typedef struct Job { >>>

Re: [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event

2018-05-24 Thread John Snow
On 05/24/2018 04:36 AM, Kevin Wolf wrote: > Am 24.05.2018 um 02:02 hat John Snow geschrieben: >> >> >> On 05/18/2018 09:21 AM, Kevin Wolf wrote: >>> This adds a QMP event that is emitted whenever a job transitions from >>> one status to another. >>> >>> Signed-off-by: Kevin Wolf >> >> That's a l

Re: [Qemu-devel] [PATCH v3 2/1] libqtest: add more exit status checks

2018-05-24 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 07:26:16PM +0200, Thomas Huth wrote: > On 24.05.2018 18:11, Michael S. Tsirkin wrote: > > Add more checks on how did QEMU exit. > > > > Legal ways to exit right now: > > - exit(0) or return from main > > - kill(SIGTERM) - sent by testing infrastructure > > > > Anything els

Re: [Qemu-devel] [PULL 0/7] Vga 20180524 patches

2018-05-24 Thread Peter Maydell
ble in the git repository at: > > git://git.kraxel.org/qemu tags/vga-20180524-pull-request > > for you to fetch changes up to dbb2e4726c76dbffb39efe6623bf75d2ec1db8bc: > > MAINTAINERS: add vga entries (2018-05-24 10:42:13 +0200) > > --

Re: [Qemu-devel] [qemu PATCH v2] docs/interop: add "firmware.json"

2018-05-24 Thread Laszlo Ersek
On 05/24/18 18:23, Paolo Bonzini wrote: > On 24/05/2018 18:21, Laszlo Ersek wrote: >> On 05/15/18 11:49, Gerd Hoffmann wrote: >>> On Wed, May 09, 2018 at 05:26:08PM +0200, Laszlo Ersek wrote: Add a schema that describes the different uses and properties of virtual machine firmware. >

Re: [Qemu-devel] [PATCH v3 2/1] libqtest: add more exit status checks

2018-05-24 Thread Thomas Huth
On 24.05.2018 18:11, Michael S. Tsirkin wrote: > Add more checks on how did QEMU exit. > > Legal ways to exit right now: > - exit(0) or return from main > - kill(SIGTERM) - sent by testing infrastructure > > Anything else is illegal. [...] > -if (pid == s->qemu_pid && WIFSIGNALED(wstatus)

Re: [Qemu-devel] [PATCH v2 31/40] job: Add job_is_ready()

2018-05-24 Thread John Snow
On 05/24/2018 04:30 AM, Kevin Wolf wrote: > Am 24.05.2018 um 01:42 hat John Snow geschrieben: >> On 05/18/2018 09:21 AM, Kevin Wolf wrote: >>> Instead of having a 'bool ready' in BlockJob, add a function that >>> derives its value from the job status. >>> >>> At the same time, this fixes the beha

Re: [Qemu-devel] [RFC 0/2] ARM virt: Support up to 256 PCIe buses

2018-05-24 Thread Laszlo Ersek
On 05/24/18 16:14, Ard Biesheuvel wrote: > On 24 May 2018 at 15:59, Laszlo Ersek wrote: >> On 05/24/18 15:07, Peter Maydell wrote: >>> On 24 May 2018 at 13:59, Laszlo Ersek wrote: On 05/24/18 11:11, Peter Maydell wrote: > Won't it also break a guest which is just Linux loaded not via >>>

Re: [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Paolo Bonzini
On 21/05/2018 08:35, Fam Zheng wrote: > Coverity doesn't like the tests under fail label (report CID 1385847). > Reset the fields so the clean up order is more apparent. > > Signed-off-by: Fam Zheng > --- > block/nvme.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/block/nvme.

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

2018-05-24 Thread Greg Kurz
On Thu, 24 May 2018 17:52:56 +0100 Stefan Hajnoczi wrote: > On Thu, May 24, 2018 at 11:09:47AM +0200, Greg Kurz wrote: > > diff --git a/block.c b/block.c > > index 676e57f5623a..fc9379439883 100644 > > --- a/block.c > > +++ b/block.c > > @@ -2127,12 +2127,16 @@ BdrvChild *bdrv_attach_child(BlockD

Re: [Qemu-devel] [PATCH 15/27] iommu: Add IOMMU index argument to notifier APIs

2018-05-24 Thread Peter Maydell
On 24 May 2018 at 16:29, Auger Eric wrote: > On 05/21/2018 04:03 PM, Peter Maydell wrote: >> diff --git a/include/exec/memory.h b/include/exec/memory.h >> index f6226fb263..4e6b125add 100644 >> --- a/include/exec/memory.h >> +++ b/include/exec/memory.h >> @@ -71,6 +71,7 @@ struct IOMMUTLBEntry { >

Re: [Qemu-devel] [RFC 0/2] ARM virt: Support up to 256 PCIe buses

2018-05-24 Thread Laszlo Ersek
On 05/24/18 16:09, Auger Eric wrote: > Hi Laszlo, > > On 05/24/2018 03:59 PM, Laszlo Ersek wrote: >> On 05/24/18 15:07, Peter Maydell wrote: >>> On 24 May 2018 at 13:59, Laszlo Ersek wrote: On 05/24/18 11:11, Peter Maydell wrote: > Won't it also break a guest which is just Linux loaded n

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

2018-05-24 Thread Stefan Hajnoczi
On Thu, May 24, 2018 at 11:09:47AM +0200, Greg Kurz wrote: > diff --git a/block.c b/block.c > index 676e57f5623a..fc9379439883 100644 > --- a/block.c > +++ b/block.c > @@ -2127,12 +2127,16 @@ BdrvChild *bdrv_attach_child(BlockDriverState > *parent_bs, > > static void bdrv_detach_child(BdrvChild

[Qemu-devel] [PULL v3 4/4] test: Add test cases that use the external swtpm with CRB interface

2018-05-24 Thread Stefan Berger
Add a test program for testing the CRB with the external swtpm. The 1st test case extends a PCR and reads back the value and compares it against an expected return packet. The 2nd test case repeats the 1st test case and then migrates the external swtpm's state along with the VM state to a destina

[Qemu-devel] [PULL v3 3/4] docs: tpm: add VM save/restore example and troubleshooting guide

2018-05-24 Thread Stefan Berger
Extend the docs related to TPM with specs related to VM save and restore and a troubleshooting guide for TPM migration. Signed-off-by: Stefan Berger Reviewed-by: Dr. David Alan Gilbert --- docs/specs/tpm.txt | 106 + 1 file changed, 106 insert

[Qemu-devel] [PULL v3 2/4] tpm: extend TPM TIS with state migration support

2018-05-24 Thread Stefan Berger
Extend the TPM TIS interface with state migration support. We need to synchronize with the backend thread to make sure that a command being processed by the external TPM emulator has completed and its response been received. Signed-off-by: Stefan Berger Reviewed-by: Dr. David Alan Gilbert Revie

[Qemu-devel] [PULL v3 1/4] tpm: extend TPM emulator with state migration support

2018-05-24 Thread Stefan Berger
Extend the TPM emulator backend device with state migration support. The external TPM emulator 'swtpm' provides a protocol over its control channel to retrieve its state blobs. We implement functions for getting and setting the different state blobs. In case the setting of the state blobs fails, w

[Qemu-devel] [PULL v3 0/4] Merge tpm 2018/05/23

2018-05-24 Thread Stefan Berger
This series of patches adds TPM emulator state migration support and a test case for testing (local) migration. Stefan The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018

Re: [Qemu-devel] [PATCH v3 6/8] linux-user: update ARCH_HAS_SOCKET_TYPES use

2018-05-24 Thread Peter Maydell
On 24 May 2018 at 16:50, Laurent Vivier wrote: > Le 24/05/2018 à 17:29, Laurent Vivier a écrit : >> Le 21/05/2018 à 11:19, Peter Maydell a écrit : >>> On 19 May 2018 at 10:29, Laurent Vivier wrote: to be like in the kernel and rename it TARGET_ARCH_HAS_SOCKET_TYPES >>> >>> You could note in

Re: [Qemu-devel] [PULL v2 0/4] Merge tpm 2018/05/23

2018-05-24 Thread Stefan Berger
On 05/24/2018 12:14 PM, Stefan Berger wrote: This series of patches adds TPM emulator state migration support and a test case for testing (local) migration. Stefan The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d: Merge remote-tracking branch 'remotes/ehabkost

Re: [Qemu-devel] [PATCH 4/6] vhost-user: support registering external host notifiers

2018-05-24 Thread Tiwei Bie
On Thu, May 24, 2018 at 07:15:24PM +0300, Michael S. Tsirkin wrote: > On Fri, May 25, 2018 at 12:05:50AM +0800, Tiwei Bie wrote: > > On Thu, May 24, 2018 at 06:49:47PM +0300, Michael S. Tsirkin wrote: > > > On Thu, May 24, 2018 at 06:33:34PM +0800, Tiwei Bie wrote: > > > > This patch introduces VHO

Re: [Qemu-devel] [qemu PATCH v2] docs/interop: add "firmware.json"

2018-05-24 Thread Laszlo Ersek
On 05/15/18 11:49, Gerd Hoffmann wrote: > On Wed, May 09, 2018 at 05:26:08PM +0200, Laszlo Ersek wrote: >> Add a schema that describes the different uses and properties of virtual >> machine firmware. >> >> Each firmware executable installed on a host system should come with at >> least one JSON fi

Re: [Qemu-devel] [PATCH] prep: fix keyboard for the 40p machine

2018-05-24 Thread Philippe Mathieu-Daudé
On 05/24/2018 02:39 AM, Mark Cave-Ayland wrote: > Commit 72d3d8f052 "hw/isa/superio: Add a keyboard/mouse controller (8042)" > added an 8042 keyboard device to the PC87312 superio device to replace that > being used by the prep machine. > > Unfortunately this commit didn't do the same for the 40p

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Markus Armbruster
"Richard W.M. Jones" writes: > On Thu, May 24, 2018 at 05:08:17PM +0200, Kevin Wolf wrote: >> Am 24.05.2018 um 16:56 hat Michael S. Tsirkin geschrieben: >> > On Thu, May 24, 2018 at 12:32:51PM +0100, Richard W.M. Jones wrote: >> > > There is however a seed of a good idea in the thread: >> > > >>

Re: [Qemu-devel] [PATCH] pnv: add a physical mapping array describing MMIO ranges in each chip

2018-05-24 Thread Cédric Le Goater
On 05/23/2018 04:04 PM, Greg Kurz wrote: > On Wed, 23 May 2018 14:37:30 +0200 > Cédric Le Goater wrote: > >> On 05/18/2018 11:00 AM, Greg Kurz wrote: >>> On Thu, 17 May 2018 15:18:14 +0200 >>> Cédric Le Goater wrote: >>> Based on previous work done in skiboot, the physical mapping array

Re: [Qemu-devel] [qemu PATCH v2] docs/interop: add "firmware.json"

2018-05-24 Thread Paolo Bonzini
On 24/05/2018 18:21, Laszlo Ersek wrote: > On 05/15/18 11:49, Gerd Hoffmann wrote: >> On Wed, May 09, 2018 at 05:26:08PM +0200, Laszlo Ersek wrote: >>> Add a schema that describes the different uses and properties of virtual >>> machine firmware. >>> >>> Each firmware executable installed on a host

[Qemu-devel] [PULL v2 2/4] tpm: extend TPM TIS with state migration support

2018-05-24 Thread Stefan Berger
Extend the TPM TIS interface with state migration support. We need to synchronize with the backend thread to make sure that a command being processed by the external TPM emulator has completed and its response been received. Signed-off-by: Stefan Berger Reviewed-by: Dr. David Alan Gilbert Revie

[Qemu-devel] [PULL v2 1/4] tpm: extend TPM emulator with state migration support

2018-05-24 Thread Stefan Berger
Extend the TPM emulator backend device with state migration support. The external TPM emulator 'swtpm' provides a protocol over its control channel to retrieve its state blobs. We implement functions for getting and setting the different state blobs. In case the setting of the state blobs fails, w

Re: [Qemu-devel] About the TCG code in arm64!

2018-05-24 Thread Richard Henderson
On 05/24/2018 07:53 AM, Zhong, Yang wrote: > Hello Richard, > > I am coming from intel and ready to disable TCG code in arm64, there are some > unclear issue in the target/arm directory > > (The TCG code in x86 was disabled by Paolo and me) > [Identifying some files that are indeed TCG related.]

Re: [Qemu-devel] [PATCH 4/6] vhost-user: support registering external host notifiers

2018-05-24 Thread Michael S. Tsirkin
On Fri, May 25, 2018 at 12:05:50AM +0800, Tiwei Bie wrote: > On Thu, May 24, 2018 at 06:49:47PM +0300, Michael S. Tsirkin wrote: > > On Thu, May 24, 2018 at 06:33:34PM +0800, Tiwei Bie wrote: > > > This patch introduces VHOST_USER_PROTOCOL_F_HOST_NOTIFIER. > > > With this feature negotiated, vhost-

[Qemu-devel] [PULL v2 0/4] Merge tpm 2018/05/23

2018-05-24 Thread Stefan Berger
This series of patches adds TPM emulator state migration support and a test case for testing (local) migration. Stefan The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-

  1   2   3   >