[Qemu-devel] [PULL] qemu-doc: Rework the network options chapter to make "-net" less prominent

2018-03-29 Thread Jason Wang
From: Thomas Huth "-net" is clearly a legacy option. Yet we still use it in almost all examples in the qemu documentation, and many other spots in the network chapter. We should make it less prominent that users are not lured into using it so often anymore. So instead of

[Qemu-devel] [PULL] Net patches

2018-03-29 Thread Jason Wang
The following changes since commit 47d3b60858d90ac8a0cc3a72af7f95c96781125a: Merge remote-tracking branch 'remotes/riscv/tags/riscv-qemu-2.12-important-fixes' into staging (2018-03-28 22:13:38 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git

Re: [Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk

2018-03-29 Thread Michael S. Tsirkin
On Fri, Mar 30, 2018 at 10:46:17AM +0800, Changpeng Liu wrote: > This patch reports the protocol feature that is only advertised by > QEMU if the device implements the config ops. > > Signed-off-by: Changpeng Liu OK but pls just send a single patch next time. People

Re: [Qemu-devel] [PATCH v2 04/10] migration: detect compression and decompression errors

2018-03-29 Thread Xiao Guangrong
On 03/29/2018 12:25 PM, Peter Xu wrote: On Thu, Mar 29, 2018 at 11:51:03AM +0800, Xiao Guangrong wrote: On 03/28/2018 05:59 PM, Peter Xu wrote: On Tue, Mar 27, 2018 at 05:10:37PM +0800, guangrong.x...@gmail.com wrote: [...] -static int compress_threads_load_setup(void) +static int

Re: [Qemu-devel] [PATCH 1/2] contrib/libvhost-user: add the protocol feature used for SET/GET message

2018-03-29 Thread Liu, Changpeng
The patch serials depend on Maxime's patch "vhost-user: back SET/GET_CONFIG requests with a protocol feature", which adding the protocol feature bit for SET/GET messages. > -Original Message- > From: Liu, Changpeng > Sent: Friday, March 30, 2018 10:46 AM > To: Liu, Changpeng

[Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk

2018-03-29 Thread Changpeng Liu
This patch reports the protocol feature that is only advertised by QEMU if the device implements the config ops. Signed-off-by: Changpeng Liu --- contrib/vhost-user-blk/vhost-user-blk.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[Qemu-devel] [PATCH 1/2] contrib/libvhost-user: add the protocol feature used for SET/GET message

2018-03-29 Thread Changpeng Liu
Signed-off-by: Changpeng Liu --- contrib/libvhost-user/libvhost-user.h | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h index 79f7a53..b27075e 100644 ---

Re: [Qemu-devel] [PATCH v2 0/6] e1000 migration changes for 2.12

2018-03-29 Thread Jason Wang
On 2018年03月29日 00:36, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Hi, This set of patches change the e1000 migration code to make it easier to keep with compatibility with older versions in backwards migration. I think the first 3 patches are

Re: [Qemu-devel] [PATCH v2 5/6] e1000: Choose which set of props to migrate

2018-03-29 Thread Jason Wang
On 2018年03月29日 16:44, Dr. David Alan Gilbert wrote: * Jason Wang (jasow...@redhat.com) wrote: On 2018年03月29日 16:08, Dr. David Alan Gilbert wrote: * Jason Wang (jasow...@redhat.com) wrote: On 2018年03月29日 00:36, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert"

[Qemu-devel] [PULL v1 3/4] tpm: CRB: Enforce locality is requested before processing buffer

2018-03-29 Thread Stefan Berger
Section 5.5.3.2.2 of the CRB specs states that use of the TPM through the localty control method must first be requested, otherwise the command will be dropped. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau ---

[Qemu-devel] [PULL v1 4/4] tests: Tests more flags of the CRB interface

2018-03-29 Thread Stefan Berger
Test and modify more flags of the CRB interface. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau --- tests/tpm-crb-test.c | 74 ++-- 1 file changed, 72 insertions(+), 2

[Qemu-devel] [PULL v1 0/4] Merge tpm 2018/03/29 v1

2018-03-29 Thread Stefan Berger
The following patches fix the handling of some more flags of the TPM CRB interface and extend the existing TPM CRB test program with tests of more flags. Stefan The following changes since commit 043289bef4d9c0d277c45695c676a6cc9fca48a0: Merge remote-tracking branch

[Qemu-devel] [PULL v1 2/4] tpm: CRB: Reset Granted flag when relinquishing locality

2018-03-29 Thread Stefan Berger
Reset the Granted flag when relinquishing a locality. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau --- hw/tpm/tpm_crb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index

[Qemu-devel] [PULL v1 1/4] tpm: CRB: set the Idle flag by default

2018-03-29 Thread Stefan Berger
Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau --- hw/tpm/tpm_crb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index ef8b80e..e728b55 100644 --- a/hw/tpm/tpm_crb.c +++

[Qemu-devel] [PATCH for-2.12] nbd/client: Correctly handle bad server REP_META_CONTEXT

2018-03-29 Thread Eric Blake
It's never a good idea to blindly read for size bytes as returned by the server without first validating that the size is within bounds; a malicious or buggy server could cause us to hang or get out of sync from reading further messages. It may be smarter to try and teach the client to cope with

[Qemu-devel] [RFC 18/18] Collection of validator.py test cases

2018-03-29 Thread Eduardo Habkost
These test case specifications demonstrate what kind of tests can be specified using validator.py. Most of them can replace existing unit tests written in C, and device-crash-test.yaml can replace most of the functionality of scripts/device-crash-test. Signed-off-by: Eduardo Habkost

[Qemu-devel] [RFC 15/18] qemu.py: qmp_obj() method

2018-03-29 Thread Eduardo Habkost
A wrapper for the QEMUMonitorProtocol.cmd_obj() method. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index 00b44ea0f4..d25fe030bb 100644 --- a/scripts/qemu.py +++

[Qemu-devel] [RFC 13/18] qemu.py: 'force' parameter on shutdown()

2018-03-29 Thread Eduardo Habkost
This will allow test code to shut down the VM without trying to run a 'quit' QMP command. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index

[Qemu-devel] [RFC 10/18] qemu.py: Set _launched = False on _post_shutdown

2018-03-29 Thread Eduardo Habkost
This will allow a sequence like: vm.launch() vm.cmd('quit') vm.wait() # triggers post-shutdown code vm.launch() to work. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qemu.py

[Qemu-devel] [RFC 16/18] qemu.py: is_launched() method

2018-03-29 Thread Eduardo Habkost
Useful if some code gets a QEMUMachine object in unknown state, and wants to launch it only if necessary. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index d25fe030bb..d32b923a15

[Qemu-devel] [RFC 11/18] qemu.py: Log crashes inside _post_shutdown()

2018-03-29 Thread Eduardo Habkost
This will allow us to log QEMU crashes even if the test code uses .wait() instead of .shutdown(). Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py

[Qemu-devel] [RFC 08/18] qemu.py: Close _qmp inside _post_shutdown()

2018-03-29 Thread Eduardo Habkost
This way all shutdown-related cleanup is kept in a single place. While at it, set _qmp to None after closing the socket, to avoid trying to reuse it by mistake later. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 5 - 1 file changed, 4 insertions(+), 1

[Qemu-devel] [RFC 17/18] validator.py script

2018-03-29 Thread Eduardo Habkost
See cover letter for a description of the new test system. TODO: code clean up TODO: write description. Signed-off-by: Eduardo Habkost --- scripts/validator.py | 724 +++ 1 file changed, 724 insertions(+) create mode 100755

[Qemu-devel] [RFC 14/18] qemu.py: Don't try to quit cleanly on exceptions

2018-03-29 Thread Eduardo Habkost
Exceptions when starting a VM probably mean QEMU exited and the monitor won't work. It's better to simply terminate the process instead of trying to communicate using QMP. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [RFC 03/18] qmp.py: Cleanly handle unexpectedly closed socket

2018-03-29 Thread Eduardo Habkost
QEMUMonitorProtocol.cmd() returns None if the socket was closed, so callers must handle this case explicltly. Signed-off-by: Eduardo Habkost --- scripts/qmp/qmp.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/qmp/qmp.py b/scripts/qmp/qmp.py index

[Qemu-devel] [RFC 05/18] qemu.py: Split _base_args()

2018-03-29 Thread Eduardo Habkost
Split it into _monitor_args() and _display_args(), so we can make monitor args optional later. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index

[Qemu-devel] [RFC 12/18] qemu.py: Only wait for process if it's still running

2018-03-29 Thread Eduardo Habkost
TODO: explain why Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index e19e4b34d0..aaba04b3c1 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -275,7 +275,8 @@

[Qemu-devel] [RFC 07/18] qemu.py: Use wait() logic inside shutdown()

2018-03-29 Thread Eduardo Habkost
This way we will have a single method where we wait for the QEMU process to finish. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index 84bb3da613..4a71542c6b

[Qemu-devel] [RFC 04/18] qemu.py: Make _vm_monitor a method

2018-03-29 Thread Eduardo Habkost
Use a function instead of a data field. Less state to keep track of, less chance of bugs. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py

[Qemu-devel] [RFC 02/18] qmp.py: Fix error handling for Python 3

2018-03-29 Thread Eduardo Habkost
socket.error doesn't behave like a tuple in Python 3, but we can use error.args on both Python 2.7 and 3. Signed-off-by: Eduardo Habkost --- scripts/qmp/qmp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qmp/qmp.py b/scripts/qmp/qmp.py

[Qemu-devel] [RFC 09/18] qemu.py: Make monitor optional

2018-03-29 Thread Eduardo Habkost
This will allow us to use the QEMUMachine class on test cases that don't use QMP at all. Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index

[Qemu-devel] [RFC 06/18] qemu.py: Move _load_io_log() call to _post_shutdown()

2018-03-29 Thread Eduardo Habkost
All callers of _post_shutdown() call _load_io_log(), so it's easier to simply call it inside _post_shutdown(). Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index

[Qemu-devel] [RFC 00/18] QEMU validator: A method to specify QEMU crash-test cases

2018-03-29 Thread Eduardo Habkost
Rationale - Today we have a few test cases in the QEMU tree that just run QEMU with a few command-line options, run some QMP or HMP commands, and check if QEMU didn't crash. Some examples: * scripts/device-crash-test * The test case suggested by Thomas at: Subject: [RFC PATCH] tests:

[Qemu-devel] [RFC 01/18] qmp.py: Make it safe to call close() any time

2018-03-29 Thread Eduardo Habkost
This will allow us to simplify the error handling and shutdown logic in qemu.py. Signed-off-by: Eduardo Habkost --- scripts/qmp/qmp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qmp/qmp.py b/scripts/qmp/qmp.py index 5c8cf6a056..078ce65f3b

Re: [Qemu-devel] [PATCH v2 0/6] postcopy block time calculation + ppc32 build fix

2018-03-29 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > V1-V2 > accidentally appeared __nocheck after rebase > this patch set also rebased after latest pull request > > This patch set includes patches which were reverted by commit > ee86981bd, due to build problem on 32 powerpc/arm

Re: [Qemu-devel] [PATCH v4 0/8] nvdimm: guarantee persistence of QEMU writes to persistent memory

2018-03-29 Thread Dr. David Alan Gilbert
* Haozhong Zhang (haozhong.zh...@intel.com) wrote: > Post-copy with NVDIMM currently fails with message "Postcopy on shared > RAM (...) is not yet supported". Is it enough? What does it say now that postcopy-shared support is in? Dave -- Dr. David Alan Gilbert / dgilb...@redhat.com /

Re: [Qemu-devel] [PATCH v4 5/8] migration/ram: ensure write persistence on loading zero pages to PMEM

2018-03-29 Thread Dr. David Alan Gilbert
* Haozhong Zhang (haozhong.zh...@intel.com) wrote: > When loading a zero page, check whether it will be loaded to > persistent memory If yes, load it by libpmem function > pmem_memset_nodrain(). Combined with a call to pmem_drain() at the > end of RAM loading, we can guarantee all those zero

Re: [Qemu-devel] [PATCH v2 0/3] Add new CD-ROM related qtests

2018-03-29 Thread John Snow
On 03/16/2018 01:39 AM, Thomas Huth wrote: > With one of my clean-up patches (see commit 1454509726719e0933c800), I > recently accidentially broke the "-cdrom" parameter (more precisely > "-drive if=scsi") on a couple of boards, since there was no error > detected during the "make check"

Re: [Qemu-devel] linux-user: missing synchronization in CPU object realization

2018-03-29 Thread Max Filippov
On Thu, Mar 29, 2018 at 7:15 AM, Max Filippov wrote: > I'm running xtensa linux-user application that rapidly creates > a lot of threads and I observe the following assertion failure: > > (process:26953): GLib-CRITICAL **: g_hash_table_iter_next: assertion > 'ri->version ==

Re: [Qemu-devel] linux-user: missing synchronization in CPU object realization

2018-03-29 Thread Laurent Vivier
Hi, I think multi-threading and locking questions are more for Alex Bennée. Alex, any comment? Thanks, Laurent Le 29/03/2018 à 16:15, Max Filippov a écrit : > Hello, > > I'm running xtensa linux-user application that rapidly creates > a lot of threads and I observe the following assertion

[Qemu-devel] [PULL 0/1] RISC-V: Critical fixes for QEMU 2.12

2018-03-29 Thread Michael Clark
The following changes since commit 47d3b60858d90ac8a0cc3a72af7f95c96781125a: Merge remote-tracking branch 'remotes/riscv/tags/riscv-qemu-2.12-important-fixes' into staging (2018-03-28 22:13:38 +0100) are available in the git repository at: https://github.com/riscv/riscv-qemu.git

[Qemu-devel] [PULL 1/1] RISC-V: Workaround for critical mstatus.FS bug

2018-03-29 Thread Michael Clark
This change is a workaround for a bug where mstatus.FS is not correctly reporting dirty after operations that modify floating point registers. This a critical bug or RISC-V in QEMU as it results in floating point register file corruption when running SMP Linux due to task migration and possibly

Re: [Qemu-devel] [PATCH v4 2/2] tpm: extend TPM TIS with state migration support

2018-03-29 Thread Marc-André Lureau
Hi On Thu, Mar 29, 2018 at 1:56 AM, Stefan Berger wrote: > On 03/28/2018 11:41 AM, Marc-André Lureau wrote: >> >> Hi >> >> On Thu, Mar 1, 2018 at 8:59 PM, Stefan Berger >> wrote: >>> >>> + >>> +static const VMStateDescription vmstate_locty

Re: [Qemu-devel] [PATCH v4 3/9] cli: add -preconfig option

2018-03-29 Thread Eduardo Habkost
On Thu, Mar 29, 2018 at 03:01:12PM +0200, Igor Mammedov wrote: > On Wed, 28 Mar 2018 16:17:32 -0300 > Eduardo Habkost wrote: > > > On Tue, Mar 27, 2018 at 05:05:41PM +0200, Igor Mammedov wrote: > > > On Fri, 23 Mar 2018 18:25:08 -0300 > > > Eduardo Habkost

Re: [Qemu-devel] [PATCH] tcg: fix 16-byte vector operations detection

2018-03-29 Thread Laurent Vivier
Hi, I think it would be good to have this fix (or something similar) in -rc2. Without this we can't build QEMU 2.12 PPC64LE for RHEL7 [1] Any comment? Thanks, Laurent [1] we have bugzilla for RHEL7 GCC, https://bugzilla.redhat.com/show_bug.cgi?id=1546728 but as configure provides a

Re: [Qemu-devel] [PATCH v4 2/9] numa: split out NumaOptions parsing into parse_NumaOptions()

2018-03-29 Thread Eduardo Habkost
On Thu, Mar 29, 2018 at 03:05:09PM +0200, Igor Mammedov wrote: > On Wed, 28 Mar 2018 15:54:28 -0300 > Eduardo Habkost wrote: > > > On Tue, Mar 27, 2018 at 03:08:27PM +0200, Igor Mammedov wrote: > > > On Fri, 23 Mar 2018 17:42:18 -0300 > > > Eduardo Habkost

Re: [Qemu-devel] [PATCH v4 3/9] cli: add -preconfig option

2018-03-29 Thread Eduardo Habkost
On Thu, Mar 29, 2018 at 01:43:03PM +0200, Igor Mammedov wrote: > On Wed, 28 Mar 2018 16:21:48 -0300 > Eduardo Habkost wrote: > > > On Wed, Mar 28, 2018 at 01:48:35PM +0200, Igor Mammedov wrote: > > > On Tue, 27 Mar 2018 17:05:41 +0200 > > > Igor Mammedov

Re: [Qemu-devel] [PATCH v3 3/4] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF

2018-03-29 Thread Eric Blake
On 03/29/2018 10:48 AM, Marc-André Lureau wrote: Now that we can safely call QOBJECT() on QObject * and children types, we can have a single macro to ref/unref the object. Change the incref/decref prefix name for the more common ref/unref. Note that before the patch, "QDECREF(obj)" was

Re: [Qemu-devel] [PATCH v3 2/4] qobject: introduce QObjectCommon

2018-03-29 Thread Eric Blake
On 03/29/2018 10:48 AM, Marc-André Lureau wrote: By moving the common fields to a QObjectCommon, QObject can be a type which also has a 'base' QObjectCommon field. This allows to write a generic QOBJECT() macro that will work with any QObject type, including QObject itself. The container_of()

Re: [Qemu-devel] [PATCH 16/16] tcg: remove tb_lock

2018-03-29 Thread Alex Bennée
Emilio G. Cota writes: > Use mmap_lock in user-mode to protect TCG state and the page > descriptors. > In !user-mode, each vCPU has its own TCG state, so no locks > needed. Per-page locks are used to protect the page descriptors. > > Per-TB locks are used in both modes to

Re: [Qemu-devel] [PATCH v3 4/4] qobject: modify qobject_ref() to assert on NULL and return obj

2018-03-29 Thread Eric Blake
On 03/29/2018 10:48 AM, Marc-André Lureau wrote: Following a discussion on the mailing list: while it may be convenient to accept NULL value in qobject_unref() (for similar reasons as free() accepts NULL), it is a probably a bad idea to accept NULL argument in qobject_ref(). Furthermore, it is

Re: [Qemu-devel] [PATCH qemu] vfio: Print address space address when cannot map MMIO for DMA

2018-03-29 Thread Alex Williamson
On Thu, 29 Mar 2018 12:55:51 +1100 Alexey Kardashevskiy wrote: > On 29/3/18 8:03 am, Auger Eric wrote: > > Hi Alexey, Alex, > > On 22/03/18 09:18, Alexey Kardashevskiy wrote: > >> The 567b5b309abe ("vfio/pci: Relax DMA map errors for MMIO regions") added > >> an error message

Re: [Qemu-devel] [PATCH 15/16] translate-all: remove tb_lock mention from cpu_restore_state_from_tb

2018-03-29 Thread Alex Bennée
Emilio G. Cota writes: > tb_lock was needed when the function did retranslation. However, > since fca8a500d519 ("tcg: Save insn data and use it in > cpu_restore_state_from_tb") we don't do retranslation. > > Get rid of the comment. I think we need to modify the comment in

Re: [Qemu-devel] [PATCH for-2.12 v5] iotests: Test abnormally large size in compressed cluster descriptor

2018-03-29 Thread Max Reitz
On 2018-03-29 14:07, Alberto Garcia wrote: > L2 entries for compressed clusters have a field that indicates the > number of sectors used to store the data in the image. > > That's however not the size of the compressed data itself, just the > number of sectors where that data is located. The

Re: [Qemu-devel] [PATCH qemu] vfio: Print address space address when cannot map MMIO for DMA

2018-03-29 Thread Alex Williamson
On Thu, 29 Mar 2018 16:42:12 +0200 Auger Eric wrote: > Hi Alex, > > On 29/03/18 00:13, Alex Williamson wrote: > > On Wed, 28 Mar 2018 23:03:23 +0200 > > Auger Eric wrote: > > > >> Hi Alexey, Alex, > >> On 22/03/18 09:18, Alexey Kardashevskiy

[Qemu-devel] [PATCH v3 4/4] qobject: modify qobject_ref() to assert on NULL and return obj

2018-03-29 Thread Marc-André Lureau
Following a discussion on the mailing list: while it may be convenient to accept NULL value in qobject_unref() (for similar reasons as free() accepts NULL), it is a probably a bad idea to accept NULL argument in qobject_ref(). Furthermore, it is convenient and more clear to call qobject_ref() at

[Qemu-devel] [PATCH v3 0/4] RFC: simplify qobject refcount

2018-03-29 Thread Marc-André Lureau
Hi, This series aims to get rid of the distinction between QObject, that must use qobject_incref/qobject_decref and its various derived types that have to use QINCREF/QDECREF. Instead, replace it with qobject_ref/qobject_unref for all types. v3: after v2 review with Eric and Paolo - fix clang

[Qemu-devel] [PATCH v3 2/4] qobject: introduce QObjectCommon

2018-03-29 Thread Marc-André Lureau
By moving the common fields to a QObjectCommon, QObject can be a type which also has a 'base' QObjectCommon field. This allows to write a generic QOBJECT() macro that will work with any QObject type, including QObject itself. The container_of() macro ensures that the object to cast has a

[Qemu-devel] [PATCH v3 1/4] qobject: ensure base is at offset 0

2018-03-29 Thread Marc-André Lureau
All QObject types have the base QObject as first field. This allows to simplify qobject_to() and will allow further simplification in following patch. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qobject.h | 5 ++--- qobject/qobject.c | 9 +

Re: [Qemu-devel] [PATCH 14/16] cputlb: remove tb_lock from tlb_flush functions

2018-03-29 Thread Alex Bennée
Emilio G. Cota writes: > The acquisition of tb_lock was added when the async tlb_flush > was introduced in e3b9ca810 ("cputlb: introduce tlb_flush_* async work.") > > tb_lock was there to allow us to do memset() on the tb_jmp_cache's. > However, since f3ced3c5928 ("tcg:

Re: [Qemu-devel] [PATCH 12/16] translate-all: discard TB when tb_link_page returns an existing matching TB

2018-03-29 Thread Alex Bennée
Emilio G. Cota writes: > Use the recently-gained QHT feature of returning the matching TB if it > already exists. This allows us to get rid of the lookup we perform > right after acquiring tb_lock. > > Suggested-by: Richard Henderson > Signed-off-by: Emilio G.

[Qemu-devel] [PATCH] sys_membarrier: fix up include directives

2018-03-29 Thread Bruce Rogers
Our rule right now is to use <> for external headers only. util/sys_membarrier.c violates that. Fix it up. Signed-off-by: Bruce Rogers --- util/sys_membarrier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/sys_membarrier.c

Re: [Qemu-devel] [PATCH v4 for 2.12 0/3] fix bitmaps migration through shared storage

2018-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2018 17:03, Max Reitz wrote: On 2018-03-29 10:08, Vladimir Sementsov-Ogievskiy wrote: 28.03.2018 17:53, Max Reitz wrote: On 2018-03-27 12:11, Vladimir Sementsov-Ogievskiy wrote: [...] isn't it because a lot of cat processes? will check, update loop to i=0; while check -qcow2 169; do

Re: [Qemu-devel] [PATCH 11/16] translate-all: add page_collection assertions

2018-03-29 Thread Alex Bennée
Emilio G. Cota writes: > The appended adds assertions to make sure we do not longjmp with page > locks held. Some notes: > > - user-mode has nothing to check, since page_locks are !user-mode only. > > - The checks only apply to page collections, since these have relatively >

Re: [Qemu-devel] [PATCH 10/16] translate-all: use per-page locking in !user-mode

2018-03-29 Thread Alex Bennée
Emilio G. Cota writes: > Groundwork for supporting parallel TCG generation. > > Instead of using a global lock (tb_lock) to protect changes > to pages, use fine-grained, per-page locks in !user-mode. > User-mode stays with mmap_lock. > > Sometimes changes need to happen

Re: [Qemu-devel] [PATCH qemu] vfio: Print address space address when cannot map MMIO for DMA

2018-03-29 Thread Auger Eric
Hi Alex, On 29/03/18 00:13, Alex Williamson wrote: > On Wed, 28 Mar 2018 23:03:23 +0200 > Auger Eric wrote: > >> Hi Alexey, Alex, >> On 22/03/18 09:18, Alexey Kardashevskiy wrote: >>> The 567b5b309abe ("vfio/pci: Relax DMA map errors for MMIO regions") added >>> an error

Re: [Qemu-devel] [PATCH for-2.12 v5] iotests: Test abnormally large size in compressed cluster descriptor

2018-03-29 Thread Eric Blake
On 03/29/2018 07:07 AM, Alberto Garcia wrote: L2 entries for compressed clusters have a field that indicates the number of sectors used to store the data in the image. That's however not the size of the compressed data itself, just the number of sectors where that data is located. The actual

Re: [Qemu-devel] [PATCH for-2.13] pc-bios/s390-ccw: Increase virtio timeout to 30 seconds

2018-03-29 Thread Cornelia Huck
On Thu, 29 Mar 2018 11:37:31 +0200 Thomas Huth wrote: > The current timeout is set to only three seconds - and considering that > vring_wait_reply() or rather get_second() is not doing any rounding, > the real timeout is likely rather 2 seconds in most cases. When the > host is

Re: [Qemu-devel] [PATCH for-2.12 v4] iotests: Test abnormally large size in compressed cluster descriptor

2018-03-29 Thread Max Reitz
On 2018-03-29 11:39, Alberto Garcia wrote: > On Wed 28 Mar 2018 07:34:15 PM CEST, Max Reitz wrote: >>> diff --git a/tests/qemu-iotests/122 b/tests/qemu-iotests/122 >>> index 45b359c2ba..5b9593016c 100755 >>> --- a/tests/qemu-iotests/122 >>> +++ b/tests/qemu-iotests/122 >> >> Not sure if 122 is the

[Qemu-devel] [PATCH v3 0/4] RFC: simplify qobject refcount

2018-03-29 Thread Marc-André Lureau
Hi, This series aims to get rid of the distinction between QObject, that must use qobject_incref/qobject_decref and its various derived types that have to use QINCREF/QDECREF. Instead, replace it with qobject_ref/qobject_unref for all types. v3: after v2 review with Eric and Paolo - fix clang

[Qemu-devel] linux-user: missing synchronization in CPU object realization

2018-03-29 Thread Max Filippov
Hello, I'm running xtensa linux-user application that rapidly creates a lot of threads and I observe the following assertion failure: (process:26953): GLib-CRITICAL **: g_hash_table_iter_next: assertion 'ri->version == ri->hash_table->version' failed **

Re: [Qemu-devel] [PATCH for-2.12 v4] iotests: Test abnormally large size in compressed cluster descriptor

2018-03-29 Thread Max Reitz
On 2018-03-28 19:58, Eric Blake wrote: > On 03/28/2018 12:34 PM, Max Reitz wrote: [...] >> The OFLAG_COPIED repair looks a bit interesting, but, er, well. >> >> Max >> >> (Since a compressed cluster does not correspond 1:1 to a host cluster, >> you cannot say that a compressed cluster has a

Re: [Qemu-devel] [PATCH v4 for 2.12 0/3] fix bitmaps migration through shared storage

2018-03-29 Thread Max Reitz
On 2018-03-29 10:08, Vladimir Sementsov-Ogievskiy wrote: > 28.03.2018 17:53, Max Reitz wrote: >> On 2018-03-27 12:11, Vladimir Sementsov-Ogievskiy wrote: [...] >>> isn't it because a lot of cat processes? will check, update loop to >>> i=0; while check -qcow2 169; do ((i++)); echo $i OK; killall

[Qemu-devel] [PULL 1/2] migration: fix pfd leak

2018-03-29 Thread Dr. David Alan Gilbert (git)
From: Marc-André Lureau Fix leak spotted by ASAN: Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fe1abb80a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38) #1 0x7fe1aaf1bf75 in g_malloc0 ../glib/gmem.c:124 #2 0x7fe1aaf1c249 in

[Qemu-devel] [PULL 2/2] migration: Don't activate block devices if using -S

2018-03-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Activating the block devices causes the locks to be taken on the backing file. If we're running with -S and the destination libvirt hasn't started the destination with 'cont', it's expecting the locks are still untaken. Don't activate the

[Qemu-devel] [PULL 0/2] migration queue

2018-03-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 47d3b60858d90ac8a0cc3a72af7f95c96781125a: Merge remote-tracking branch 'remotes/riscv/tags/riscv-qemu-2.12-important-fixes' into staging (2018-03-28 22:13:38 +0100) are available in the Git repository

Re: [Qemu-devel] [PATCH for-2.13] pc-bios/s390-ccw: Increase virtio timeout to 30 seconds

2018-03-29 Thread Thomas Huth
On 29.03.2018 15:15, Cornelia Huck wrote: > On Thu, 29 Mar 2018 11:37:31 +0200 > Thomas Huth wrote: > >> The current timeout is set to only three seconds - and considering that >> vring_wait_reply() or rather get_second() is not doing any rounding, >> the real timeout is likely

Re: [Qemu-devel] [PATCH for-2.13] pc-bios/s390-ccw: Increase virtio timeout to 30 seconds

2018-03-29 Thread Cornelia Huck
On Thu, 29 Mar 2018 11:37:31 +0200 Thomas Huth wrote: > The current timeout is set to only three seconds - and considering that > vring_wait_reply() or rather get_second() is not doing any rounding, > the real timeout is likely rather 2 seconds in most cases. When the > host is

Re: [Qemu-devel] [PATCH v4 2/9] numa: split out NumaOptions parsing into parse_NumaOptions()

2018-03-29 Thread Igor Mammedov
On Wed, 28 Mar 2018 15:54:28 -0300 Eduardo Habkost wrote: > On Tue, Mar 27, 2018 at 03:08:27PM +0200, Igor Mammedov wrote: > > On Fri, 23 Mar 2018 17:42:18 -0300 > > Eduardo Habkost wrote: > > > > > On Mon, Mar 12, 2018 at 02:11:08PM +0100, Igor

Re: [Qemu-devel] [PATCH v4 3/9] cli: add -preconfig option

2018-03-29 Thread Igor Mammedov
On Wed, 28 Mar 2018 16:17:32 -0300 Eduardo Habkost wrote: > On Tue, Mar 27, 2018 at 05:05:41PM +0200, Igor Mammedov wrote: > > On Fri, 23 Mar 2018 18:25:08 -0300 > > Eduardo Habkost wrote: > > > > > On Mon, Mar 12, 2018 at 02:11:09PM +0100, Igor

[Qemu-devel] [PATCH] hw/i386: Fix IVHD entry length for AMD IOMMU

2018-03-29 Thread Jan Kiszka
From: Jan Kiszka Counting from the IVHD ID field to the all-devices entry, we have 28 bytes, not 36. Signed-off-by: Jan Kiszka --- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c

Re: [Qemu-devel] [PATCH 4/4] tests: Tests more flags of the CRB interface

2018-03-29 Thread Marc-André Lureau
On Wed, Mar 28, 2018 at 10:59 PM, Stefan Berger wrote: > Test and modify more flags of the CRB interface. > > Signed-off-by: Stefan Berger > --- Reviewed-by: Marc-André Lureau > tests/tpm-crb-test.c | 74 >

Re: [Qemu-devel] [PATCH v4 5/9] qapi: introduce new cmd option "allowed-in-preconfig"

2018-03-29 Thread Eduardo Habkost
On Thu, Mar 29, 2018 at 11:53:55AM +0200, Igor Mammedov wrote: > On Wed, 28 Mar 2018 16:30:16 -0300 > Eduardo Habkost wrote: > > > On Wed, Mar 28, 2018 at 02:29:57PM +0200, Igor Mammedov wrote: > > > On Fri, 23 Mar 2018 18:28:37 -0300 > > > Eduardo Habkost

Re: [Qemu-devel] [PATCH for-2.12 v2 2/2] i386/hyperv: error out if features requested but unsupported

2018-03-29 Thread Eduardo Habkost
On Thu, Mar 29, 2018 at 12:47:42PM +0300, Roman Kagan wrote: > On Wed, Mar 28, 2018 at 03:53:31PM -0300, Eduardo Habkost wrote: > > On Wed, Mar 28, 2018 at 06:30:24PM +0300, Roman Kagan wrote: > > > In order to guarantee compatibility on migration, QEMU should have > > > complete control over the

Re: [Qemu-devel] [PATCH 2/3] hw/s390x: fix memory leak in s390_init_ipl_dev()

2018-03-29 Thread Cornelia Huck
On Thu, 29 Mar 2018 11:10:06 +0200 Greg Kurz wrote: > The string returned by object_property_get_str() is dynamically allocated. > > Fixes: 3c4e9baacf4d9 > Signed-off-by: Greg Kurz > --- > hw/s390x/s390-virtio-ccw.c |5 - > 1 file changed, 4

[Qemu-devel] [PATCH for-2.12 v5] iotests: Test abnormally large size in compressed cluster descriptor

2018-03-29 Thread Alberto Garcia
L2 entries for compressed clusters have a field that indicates the number of sectors used to store the data in the image. That's however not the size of the compressed data itself, just the number of sectors where that data is located. The actual data size is usually not a multiple of the sector

Re: [Qemu-devel] [qemu-s390x] [PATCH 3/3] sev/i386: fix memory leak in sev_guest_init()

2018-03-29 Thread Thomas Huth
On 29.03.2018 11:24, Cornelia Huck wrote: > On Thu, 29 Mar 2018 11:10:21 +0200 > Greg Kurz wrote: > >> The string returned by object_property_get_str() is dynamically allocated. >> >> Fixes: d8575c6c0242b >> Signed-off-by: Greg Kurz >> --- >> target/i386/sev.c |

Re: [Qemu-devel] [qemu-s390x] [PATCH 2/3] hw/s390x: fix memory leak in s390_init_ipl_dev()

2018-03-29 Thread Thomas Huth
On 29.03.2018 11:10, Greg Kurz wrote: > The string returned by object_property_get_str() is dynamically allocated. > > Fixes: 3c4e9baacf4d9 > Signed-off-by: Greg Kurz > --- > hw/s390x/s390-virtio-ccw.c |5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff

Re: [Qemu-devel] [qemu-s390x] [PATCH 1/3] exec: fix memory leak in find_max_supported_pagesize()

2018-03-29 Thread Thomas Huth
On 29.03.2018 11:09, Greg Kurz wrote: > The string returned by object_property_get_str() is dynamically allocated. > > Signed-off-by: Greg Kurz > --- > exec.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/exec.c b/exec.c > index c09bd93df31e..02b1efebb7c3 100644 >

Re: [Qemu-devel] [qemu-s390x] [PATCH 2/3] hw/s390x: fix memory leak in s390_init_ipl_dev()

2018-03-29 Thread Thomas Huth
On 29.03.2018 12:31, Cornelia Huck wrote: > On Thu, 29 Mar 2018 11:39:41 +0200 > Greg Kurz wrote: > >> On Thu, 29 Mar 2018 11:27:21 +0200 >> Igor Mammedov wrote: >> >>> On Thu, 29 Mar 2018 11:10:06 +0200 >>> Greg Kurz wrote: >>> The

Re: [Qemu-devel] [PATCH for-2.13] pc-bios/s390-ccw: Increase virtio timeout to 30 seconds

2018-03-29 Thread Christian Borntraeger
On 03/29/2018 11:37 AM, Thomas Huth wrote: > The current timeout is set to only three seconds - and considering that > vring_wait_reply() or rather get_second() is not doing any rounding, > the real timeout is likely rather 2 seconds in most cases. When the > host is really badly loaded and we

Re: [Qemu-devel] [PATCH v4 3/9] cli: add -preconfig option

2018-03-29 Thread Igor Mammedov
On Wed, 28 Mar 2018 16:21:48 -0300 Eduardo Habkost wrote: > On Wed, Mar 28, 2018 at 01:48:35PM +0200, Igor Mammedov wrote: > > On Tue, 27 Mar 2018 17:05:41 +0200 > > Igor Mammedov wrote: > > > > > On Fri, 23 Mar 2018 18:25:08 -0300 > > > Eduardo

[Qemu-devel] [PATCH for-2.13] s390x: introduce 2.13 compat machine

2018-03-29 Thread Cornelia Huck
Signed-off-by: Cornelia Huck --- Yes, it's that time again :) --- hw/s390x/s390-virtio-ccw.c | 17 - include/hw/compat.h| 3 +++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c

Re: [Qemu-devel] [PATCH for-2.13] s390x: introduce 2.13 compat machine

2018-03-29 Thread Thomas Huth
On 29.03.2018 13:33, Cornelia Huck wrote: > Signed-off-by: Cornelia Huck > --- > Yes, it's that time again :) Can't we do v3.0 next ;-) ? Anyway: Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH for-2.13] pc-bios/s390-ccw: Increase virtio timeout to 30 seconds

2018-03-29 Thread Thomas Huth
On 29.03.2018 12:03, Christian Borntraeger wrote: > > > On 03/29/2018 11:37 AM, Thomas Huth wrote: >> The current timeout is set to only three seconds - and considering that >> vring_wait_reply() or rather get_second() is not doing any rounding, >> the real timeout is likely rather 2 seconds in

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-03-29 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 23 March 2018 at 12:08, Peter Maydell wrote: > > On 21 March 2018 at 08:00, Shannon Zhao wrote: > >> On 2018/3/20 19:54, Peter Maydell wrote: > >>> Can you still successfully migrate a VM

[Qemu-devel] [RFC PATCH 7/8] block-backend: Add blk_co_copy_range

2018-03-29 Thread Fam Zheng
It's a BlockBackend wrapper of bdrv_co_copy_range. Signed-off-by: Fam Zheng --- block/block-backend.c | 8 include/sysemu/block-backend.h | 4 2 files changed, 12 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index

[Qemu-devel] [RFC PATCH 6/8] raw: Implement raw_co_map_range

2018-03-29 Thread Fam Zheng
Because raw can be seen as a "passthrough" format, its implementation of bdrv_co_map_range is exactly the same as bdrv_co_block_status. The BDRV_REQ_ALLOCATE flag can be ignored because no metadata update is necessary. Signed-off-by: Fam Zheng --- block/raw-format.c | 9

[Qemu-devel] [RFC PATCH 8/8] qemu-img: Convert with copy offloading

2018-03-29 Thread Fam Zheng
The new blk_co_copy_range interface offers a more efficient way in the case of network based storage. Make use of it to allow faster convert operation. Since copy offloading cannot do zero detection ('-S') and compression (-c), only try it when these options are not used. Signed-off-by: Fam

[Qemu-devel] [RFC PATCH 4/8] file-posix: Implement bdrv_co_copy_range

2018-03-29 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng --- block/file-posix.c | 77 +++-- include/block/raw-aio.h | 10 +-- 2 files changed, 82 insertions(+), 5 deletions(-) diff

  1   2   >