Re: [Qemu-devel] [PATCH v8 02/24] migration: new postcopy-pause state

2018-05-08 Thread Juan Quintela
Peter Xu wrote: > On Tue, May 08, 2018 at 05:16:15PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > Introducing a new state "postcopy-paused", which can be used when the >> > postcopy migration is paused. It is targeted for postcopy network >> > failure recovery. >> > >> > Reviewed-by: Dr. D

Re: [Qemu-devel] [RFC PATCH v2 5/7] iscsi: Implement copy offloading

2018-05-08 Thread Fam Zheng
On Thu, 05/03 11:27, Stefan Hajnoczi wrote: > On Wed, Apr 18, 2018 at 11:04:22AM +0800, Fam Zheng wrote: > > +static void iscsi_save_designator(IscsiLun *lun, > > + struct > > scsi_inquiry_device_identification *inq_di) > > +{ > > +struct scsi_inquiry_device_de

Re: [Qemu-devel] [PATCH] net: Silence 'has no peer' messages in testing mode

2018-05-08 Thread Markus Armbruster
Thomas Huth writes: > On 07.05.2018 09:14, Markus Armbruster wrote: > [...] >> Two (possibly confused) questions: >> >> 1. The user can add nics without convenience options: >> >> $ upstream-qemu -display none -nodefaults -device e1000 >> upstream-qemu: warning: nic e1000.0 has no peer

Re: [Qemu-devel] [PATCH 0/5] vmdk: Implement x-blockdev-create

2018-05-08 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180509055802.28423-1-f...@redhat.com Subject: [Qemu-devel] [PATCH 0/5] vmdk: Implement x

[Qemu-devel] [PATCH v2 0/4] SDCard: support UHS-I

2018-05-08 Thread Philippe Mathieu-Daudé
Since v1: - corrected the CRC16 offset - addressed Peter Maydell comments - add Edgar Iglesias S-o-b for Alistair Francis original patch at Xilinx - use SD_FG_MAX to have a clearer loop - rename uhs_enabled/uhs_mode and add documentation - check all functions in group are correct before set

[Qemu-devel] [PATCH v2 1/4] sdcard: Update the SDState documentation

2018-05-08 Thread Philippe Mathieu-Daudé
Add more descriptive comments to keep a clear separation between static property vs runtime changeable. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c ind

[Qemu-devel] [PATCH v2 2/4] sdcard: Correct CRC16 offset in sd_function_switch()

2018-05-08 Thread Philippe Mathieu-Daudé
Per the Physical Layer Simplified Spec. "4.3.10.4 Switch Function Status": The block length is predefined to 512 bits and "4.10.2 SD Status": The SD Status contains status bits that are related to the SD Memory Card proprietary features and may be used for future application-specific usage

[Qemu-devel] [PATCH v2 4/4] sdcard: Add a 'uhs' property, update the OCR register ACCEPT_SWITCH_1V8 bit

2018-05-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/sd.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index d8dd88f872..a0e8a1b46a 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -94,6 +94,10 @@ struct SDState { BlockBackend *bl

[Qemu-devel] [PATCH 5/5] iotests: Add VMDK tests for blockdev-create

2018-05-08 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/214 | 268 +++ tests/qemu-iotests/214.out | 304 + tests/qemu-iotests/group | 1 + 3 files changed, 573 insertions(+) create mode 100755 tests/qemu-iotests/214

[Qemu-devel] [PATCH 4/5] iotests: Filter cid numbers in VMDK extent info

2018-05-08 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/common.filter | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index c5f4bcf578..0debefed18 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @

[Qemu-devel] [PATCH v2 3/4] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3)

2018-05-08 Thread Philippe Mathieu-Daudé
[based on a patch from Alistair Francis from qemu/xilinx tag xilinx-v2015.2] Signed-off-by: Edgar E. Iglesias [PMD: rebased, changed magic by definitions, use stw_be_p, add tracing, check all functions in group are correct before setting the values] Signed-off-by: Philippe Mathieu-Daudé --- h

[Qemu-devel] [PATCH 2/5] vmdk: Refactor vmdk_create_extent

2018-05-08 Thread Fam Zheng
The extracted vmdk_init_extent takes a BlockBackend object and initializes the format metadata. It is the common part between "qemu-img create" and "blockdev-create". Add a "BlockBackend *pbb" parameter to vmdk_create_extent, to return the opened BB to the caller in the next patch. Signed-off-by:

[Qemu-devel] [PATCH 1/5] qapi: Add qapi_enum_parse_full

2018-05-08 Thread Fam Zheng
This variant of qapi_enum_parse can do case insensitive compare. Signed-off-by: Fam Zheng --- include/qapi/util.h | 2 ++ qapi/qapi-util.c| 20 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/qapi/util.h b/include/qapi/util.h index a7c3c64148..2c

[Qemu-devel] [PATCH 0/5] vmdk: Implement x-blockdev-create

2018-05-08 Thread Fam Zheng
This adds vmdk support to x-blockdev-create command. Unlike other formats, several VMDK subformats consists of multiple files (extents). In the QAPI interface we use an array of BlockdevRef to pass in. The management tool need to figure out how many extent files are needed but that is simple enoug

[Qemu-devel] [PATCH 3/5] vmdk: Implement .bdrv_co_create callback

2018-05-08 Thread Fam Zheng
This makes VMDK support x-blockdev-create. The implementation reuses the image creation code in vmdk_co_create_opts which now acceptes a callback pointer to "retrieve" BlockBackend pointers from the caller. This way we separate the logic between file/extent acquisition and initialization. The QAPI

Re: [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test

2018-05-08 Thread Fam Zheng
On Mon, 05/07 13:09, Alistair Francis wrote: > Avocado is not trivial to setup on non-Fedora systems. To simplfying > future testing add a docker test image that runs Avocado tests. > > Signed-off-by: Alistair Francis > --- > tests/docker/dockerfiles/fedora.docker | 12 +-- > tests/docke

Re: [Qemu-devel] [PULL 14/30] opts: don't silently truncate long parameter keys

2018-05-08 Thread Thomas Huth
On 09.05.2018 00:14, Paolo Bonzini wrote: > From: Daniel P. Berrangé Here the accent is right ^ > The existing QemuOpts parsing code uses a fixed size 128 byte buffer > for storing the parameter keys. If a key exceeded this size it was > silently truncate and no error reported to the user. This

Re: [Qemu-devel] [PATCH v1] configure: recognize more rpmbuild macros

2018-05-08 Thread Olaf Hering
Am Wed, 9 May 2018 00:15:42 +0200 schrieb Paolo Bonzini : > Actually, --program-prefix= and --exec-prefix= have a meaning, they > cannot just be ignored. For now I've removed this line; what is the > exact incantation used by SUSE Linux? Like in every other rpm.rpm I guess: /usr/lib/rpm/macros:

Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3)

2018-05-08 Thread Philippe Mathieu-Daudé
Hi Peter, On 03/09/2018 02:03 PM, Peter Maydell wrote: > On 9 March 2018 at 15:36, Philippe Mathieu-Daudé wrote: [...] >> static void sd_function_switch(SDState *sd, uint32_t arg) >> { >> -int i, mode, new_func; >> -mode = !!(arg & 0x8000); >> - >> -sd->data[0] = 0x00;

Re: [Qemu-devel] [PATCH] device_tree: Add qemu_fdt_totalsize function

2018-05-08 Thread David Gibson
On Sun, May 06, 2018 at 04:04:02PM +0100, Peter Maydell wrote: > On 6 May 2018 at 14:39, David Gibson wrote: > > Well, I'm biased of course, but I think we'd be better off just > > ditching the wrapper. In its present form it is so limited as to not > > really add any value. If it was rewritten

[Qemu-devel] [PATCH] MAINTAINERS: Add an entry for qemu-options* files in main directory

2018-05-08 Thread Thomas Huth
The file "qemu-options.h", "qemu-options.hx" and "qemu-options-wrapper.h" in the main directory are currently without maintainer according to our get_maintainers.pl script. Considering that the command line options are a public interface and thus quite important, this is quite a bad state. So I'd l

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add trace-events and qemu-option-trace.texi to tracing section

2018-05-08 Thread Thomas Huth
On 09.05.2018 07:02, Philippe Mathieu-Daudé wrote: > Hi Thomas, > > On 05/09/2018 01:38 AM, Thomas Huth wrote: >> The "trace-events" and "qemu-option-trace.texi" files in the top directory >> are currently "unmaintained" according to scripts/get_maintainer.pl. They >> obviously belong to the Traci

Re: [Qemu-devel] [PATCH] m68k: fix floatx80_mod() (Coverity CID1390568)

2018-05-08 Thread Thomas Huth
On 08.05.2018 22:39, Laurent Vivier wrote: > Update the variable checked by the loop condition (expDiff). > Backport the update from Previous. > > Fixes: 591596b77a ("target/m68k: add fmod/frem") > Signed-off-by: Laurent Vivier > --- > target/m68k/softfloat.c | 1 + > 1 file changed, 1 insertion

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add trace-events and qemu-option-trace.texi to tracing section

2018-05-08 Thread Philippe Mathieu-Daudé
Hi Thomas, On 05/09/2018 01:38 AM, Thomas Huth wrote: > The "trace-events" and "qemu-option-trace.texi" files in the top directory > are currently "unmaintained" according to scripts/get_maintainer.pl. They > obviously belong to the Tracing section, so add an entry for them there. I agree qemu-op

Re: [Qemu-devel] [PATCH 1/1] sandbox: avoid to compile options if CONFIG_SECCOMP undefined

2018-05-08 Thread Yi Min Zhao
在 2018/5/8 下午6:37, Daniel P. Berrangé 写道: On Mon, May 07, 2018 at 01:04:17PM -0500, Eric Blake wrote: On 05/06/2018 10:32 PM, Yi Min Zhao wrote: In the subject line: s/avoid to compile/avoid compiling/ If CONFIG_SECCOMP is undefined, the option 'elevatorprivileges' remains s/elevator/eleva

[Qemu-devel] [PATCH] MAINTAINERS: Add trace-events and qemu-option-trace.texi to tracing section

2018-05-08 Thread Thomas Huth
The "trace-events" and "qemu-option-trace.texi" files in the top directory are currently "unmaintained" according to scripts/get_maintainer.pl. They obviously belong to the Tracing section, so add an entry for them there. Signed-off-by: Thomas Huth --- MAINTAINERS | 2 ++ 1 file changed, 2 inser

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

2018-05-08 Thread Peter Xu
Similar to previous patch, but introduce a new global big lock for mon_fdsets. Take it where needed. Reviewed-by: Stefan Hajnoczi Signed-off-by: Peter Xu --- monitor.c | 64 +-- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/

[Qemu-devel] [PATCH v5 2/4] monitor: protect mon->fds with mon_lock

2018-05-08 Thread Peter Xu
mon->fds were protected by BQL. Now protect it by mon_lock so that it can even be used in monitor iothread. Signed-off-by: Peter Xu --- monitor.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 14c681dc8a..d6c3c08932 100644

[Qemu-devel] [PATCH v5 3/4] monitor: more comments on lock-free fleids/funcs

2018-05-08 Thread Peter Xu
Add some explicit comment for both Readline and cpu_set/cpu_get helpers that they do not need the mon_lock protection. Signed-off-by: Peter Xu --- monitor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index d6c3c08932..ae5bca9d7c 100644 --- a/mo

[Qemu-devel] [PATCH v5 0/4] monitor: let Monitor be thread safe

2018-05-08 Thread Peter Xu
v5: - collect r-bs and rebase - move two close()s outside critical section [Dave] - move comment to end of line [Stefan] v4: - fix a s/cur_mon/mon/ typo v3: - add comment for fields that are protected by monitor lock [Stefan] - drop most of patch 2, only keep the protections for mon->fds [Stefan]

[Qemu-devel] [PATCH v5 1/4] monitor: rename out_lock to mon_lock

2018-05-08 Thread Peter Xu
The out_lock was only protecting a few Monitor fields. In the future the monitor code will start to run in multiple threads. We turn it into a bigger lock to protect not only the out buffer but also all the rest. For now we share the lock. We can split the lock when needed. Since at it, arrange

Re: [Qemu-devel] [PATCH 1/2] migration: implement io_set_aio_fd_handler function for RDMA QIOChannel

2018-05-08 Thread 858585 jemmy
On Wed, May 9, 2018 at 1:10 AM, Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Lidong Chen wrote: >> > if qio_channel_rdma_readv return QIO_CHANNEL_ERR_BLOCK, the destination >> > qemu >> > crash. >> > >> > The backtrace is: >> > (gdb) bt >> > #0 0x0

Re: [Qemu-devel] [PATCH v8 02/24] migration: new postcopy-pause state

2018-05-08 Thread Peter Xu
On Tue, May 08, 2018 at 05:16:15PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > Introducing a new state "postcopy-paused", which can be used when the > > postcopy migration is paused. It is targeted for postcopy network > > failure recovery. > > > > Reviewed-by: Dr. David Alan Gilbert > > Si

[Qemu-devel] [PATCH v2 13/14] sdcard: Add a "validate-crc" property

2018-05-08 Thread Philippe Mathieu-Daudé
Since not all modelled controllers use the CRC verification (which is somehow expensive), let the controller have a configurable property to enable verification. So far only the Milkymist controller uses it. This silent the Coverity warning: "Code block is unreachable because of the syntactic

Re: [Qemu-devel] [PATCH v4] loader: Fix misaligned member access

2018-05-08 Thread Philippe Mathieu-Daudé
Hi Peter, Paolo, On 04/24/2018 07:21 PM, Philippe Mathieu-Daudé wrote: > The libfdt does not guarantee than fdt_getprop() returns a pointer > aligned to the property size. > > Assuming the base of the fdt is aligned, a 32-bit property returns > a 32-bit aligned pointer. This is however not guaran

Re: [Qemu-devel] [PATCH for-2.12?] m25p80: Correct the at25128a/at25256a eeproms size

2018-05-08 Thread Philippe Mathieu-Daudé
Hi Peter, Kevin, On 04/16/2018 05:52 PM, Alistair Francis wrote: > On Mon, Apr 16, 2018 at 9:05 AM, mar.krzeminski > wrote: >> W dniu 15.04.2018 o 22:31, Philippe Mathieu-Daudé pisze: >>> >>> >From the datasheet (3368J–SEEPR) description: >>> The AT25128A/256A provides 131,072/262,144 bits o

[Qemu-devel] [PATCH v2 08/14] sdcard: Extract sd_frame48_verify_checksum() out for qtesting

2018-05-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sd.h | 10 ++ hw/sd/sd.c | 2 +- hw/sd/sdmmc-internal.c | 6 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h index c854ed6a14..752d8edd6c 100644 --- a/in

Re: [Qemu-devel] [PATCH] elf-loader: Avoid calling qsort(NULL, 0, ...) call

2018-05-08 Thread Philippe Mathieu-Daudé
Hi Paolo, On 04/22/2018 04:22 PM, Richard Henderson wrote: > On 04/21/2018 01:21 PM, Philippe Mathieu-Daudé wrote: >> This fixes the following ASan warning: >> >> $ qemu-system-xtensa -M kc705 -m 128M -semihosting -nographic -monitor >> null -kernel Image.elf >> include/hw/elf_ops.h:179:5: ru

[Qemu-devel] [PATCH v2 09/14] sdcard: Add sd_frame136_verify_checksum()

2018-05-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sd.h | 10 ++ hw/sd/sdmmc-internal.c | 6 ++ tests/sdcard-test.c| 12 3 files changed, 28 insertions(+) diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h index 752d8edd6c..83399cd42d 100644 --- a/include

[Qemu-devel] [PATCH v2 10/14] sdcard: Remove the SDRequest argument from internal functions

2018-05-08 Thread Philippe Mathieu-Daudé
Replace the SDRequest argument using directly {uint8_t cmd, uint32_t arg}, it will be easier to remove the SDRequest struct in the next commit. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 104 +++-- 1 file changed, 53 insertions(+), 51 d

[Qemu-devel] [PATCH v2 07/14] sdcard: Invert the sd_req_crc_is_valid() logic

2018-05-08 Thread Philippe Mathieu-Daudé
Let's return TRUE when the CRC is valid. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index d8dad94fc4..6fc8daa5b8 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -467,13 +467,13 @@ static voi

[Qemu-devel] [RFC PATCH v2 14/14] hw/sd/ssi-sd: Enable CRC validation

2018-05-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/ssi-sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c index 77e446bb94..0375f0b959 100644 --- a/hw/sd/ssi-sd.c +++ b/hw/sd/ssi-sd.c @@ -95,11 +95,11 @@ static uint32_t ssi_sd_transfer(SSISlave

[Qemu-devel] [PATCH v2 06/14] sdcard: Add test_sd_verify_cksum_frame136()

2018-05-08 Thread Philippe Mathieu-Daudé
Per the Physical Layer Simplified Spec. "3.6 Bus Protocol": There are two types of Data packet format for the SD card. (1) Usual data (8-bit width): The usual data (8-bit width) are sent in LSB (Least Significant Byte) first, MSB (Most Significant Byte) last sequence. But in the i

[Qemu-devel] [PATCH v2 05/14] sdcard: Move sd_crc7() and calc_checksum() out for qtesting

2018-05-08 Thread Philippe Mathieu-Daudé
Move the calc_checksum() functions out so we will able to write qtests for them. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sd.h | 20 hw/sd/sd.c | 33 - hw/sd/sdmmc-internal.c | 35

[Qemu-devel] [PATCH v2 12/14] sdcard: Add tests to validate the 7-bit CRC checksum of 48-bit SD frame

2018-05-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- tests/sdcard-test.c | 74 + 1 file changed, 74 insertions(+) diff --git a/tests/sdcard-test.c b/tests/sdcard-test.c index 81789d1f88..2288a05cdf 100644 --- a/tests/sdcard-test.c +++ b/tests/sdcard-test.c @@ -14

[Qemu-devel] [PATCH v2 04/14] sdcard: Extract sd_frame48/136_calc_checksum()

2018-05-08 Thread Philippe Mathieu-Daudé
It will help when moving this around for qtesting in the next commit. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 27a70896cd..06607115a7 100644 --- a/hw/sd/sd.c +++ b

[Qemu-devel] [PATCH v2 03/14] sdcard: Fix sd_crc*() style

2018-05-08 Thread Philippe Mathieu-Daudé
Fix style to keep patchew/checkpatch happy when moving this code in the next patch. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/sd.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index eb6dd5482e..

[Qemu-devel] [PATCH v2 02/14] sdcard: Constify sd_crc*()'s message argument

2018-05-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 235e0518d6..eb6dd5482e 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -236,11 +236,11 @@ static const int sd_cmd_class[SDMMC_CMD_MAX] = {

[Qemu-devel] [PATCH v2 11/14] sdcard: Add sd_frame48_init(), replace SDRequest by a raw buffer

2018-05-08 Thread Philippe Mathieu-Daudé
Using sd_frame48_init() we silent the Coverity warning: "Use of an uninitialized variable (CWE-457)" and fixes the following issues (all "Uninitialized scalar variable"): - CID1386072 (hw/sd/sdhci.c::sdhci_end_transfer) - CID1386074 (hw/sd/bcm2835_sdhost.c::bcm2835_sdhost_send_command) - CID13

Re: [Qemu-devel] [PATCH v5 6/6] MAINTAINERS: add entries for AP

2018-05-08 Thread Alexey Kardashevskiy
On 8/5/18 10:46 pm, Cornelia Huck wrote: > On Tue, 8 May 2018 08:25:03 -0400 > Tony Krowiak wrote: > >> Added entries for the s390 adjunct processor (AP) support. >> >> Signed-off-by: Tony Krowiak >> --- >> MAINTAINERS | 14 ++ >> 1 files changed, 14 insertions(+), 0 deletions(-)

[Qemu-devel] [PATCH v2 00/14] sdcard: Proper implementation of CRC7

2018-05-08 Thread Philippe Mathieu-Daudé
Hi, This series emerged after last Coverity scan and Peter suggestion in: http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg05046.html (3) "proper" implementation of CRC, so that an sd controller can either (a) mark the SDRequest as "no CRC" and have sd_req_crc_validate() alw

[Qemu-devel] [PATCH v2 01/14] sdcard: Use the ldst API

2018-05-08 Thread Philippe Mathieu-Daudé
The load/store API will ease further code movement. Per the Physical Layer Simplified Spec. "3.6 Bus Protocol": "In the CMD line the Most Significant Bit (MSB) is transmitted first, the Least Significant Bit (LSB) is the last." Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/bcm2835_sdhos

Re: [Qemu-devel] [PATCH 2/2] migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect

2018-05-08 Thread 858585 jemmy
On Wed, May 9, 2018 at 2:40 AM, Dr. David Alan Gilbert wrote: > * Lidong Chen (jemmy858...@gmail.com) wrote: >> When cancel migration during RDMA precopy, the source qemu main thread hangs >> sometime. >> >> The backtrace is: >> (gdb) bt >> #0 0x7f249eabd43d in write () from /lib64/l

Re: [Qemu-devel] [PATCH 1/2] migration: update index field when delete or qsort RDMALocalBlock

2018-05-08 Thread 858585 jemmy
On Wed, May 9, 2018 at 1:19 AM, Dr. David Alan Gilbert wrote: > * Lidong Chen (jemmy858...@gmail.com) wrote: >> rdma_delete_block function deletes RDMALocalBlock base on index field, >> but not update the index field. So when next time invoke rdma_delete_block, >> it will not work correctly. >> >>

Re: [Qemu-devel] [PATCH v3 3/6] migration: remove unnecessary variables len in QIOChannelRDMA

2018-05-08 Thread 858585 jemmy
On Tue, May 8, 2018 at 10:19 PM, Dr. David Alan Gilbert wrote: > * Lidong Chen (jemmy858...@gmail.com) wrote: >> Because qio_channel_rdma_writev and qio_channel_rdma_readv maybe invoked >> by different threads concurrently, this patch removes unnecessary variables >> len in QIOChannelRDMA and use

Re: [Qemu-devel] [PATCH] docker: Fix trivial typo

2018-05-08 Thread Fam Zheng
On Tue, 05/08 11:43, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/docker/Makefile.include | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include > index de87341528..ef1a3e62eb 1

Re: [Qemu-devel] [PATCH] blockjob: expose error string via query

2018-05-08 Thread Eric Blake
On 05/08/2018 06:36 PM, John Snow wrote: When we've reached the concluded state, we need to expose the error state if applicable. Add the new field. This should be sufficient for determining if a job completed successfully or not after concluding; if we want to discriminate based on how it faile

Re: [Qemu-devel] [PATCH 00/10] Avoid integer overflow in next_page_start

2018-05-08 Thread Michael Clark
On Thu, Apr 12, 2018 at 11:56 AM, Richard Henderson < richard.hender...@linaro.org> wrote: > On 04/12/2018 01:29 AM, Emilio G. Cota wrote: > > To ease an eventual merge I'll be updating the patches' R-b tags as > > they come in this branch: > > https://github.com/cota/qemu/tree/next_page_overflo

[Qemu-devel] [PATCH] blockjob: expose error string via query

2018-05-08 Thread John Snow
When we've reached the concluded state, we need to expose the error state if applicable. Add the new field. This should be sufficient for determining if a job completed successfully or not after concluding; if we want to discriminate based on how it failed more mechanically, we can always add an e

Re: [Qemu-devel] [PULL 00/20] RISC-V: QEMU 2.13 Privileged ISA emulation updates

2018-05-08 Thread Michael Clark
On Wed, May 9, 2018 at 1:22 AM, Peter Maydell wrote: > On 6 May 2018 at 00:35, Michael Clark wrote: > > The following changes since commit c8b7e627b4269a3bc3ae41d9f42054 > 7a47e6d9b9: > > > > Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2018-05-04' > into staging (2018-05-04 14:42

Re: [Qemu-devel] [RFC PATCH 3/4] hw/ssi: Remove SSIBus from qemu/typedefs.h

2018-05-08 Thread Alistair Francis
On Tue, May 8, 2018 at 8:10 AM, Philippe Mathieu-Daudé wrote: > There are only two files requiring this typedef (strongarm.h > and hw/arm/pxa.h), let them include "hw/pcmcia.h" directly to > simplify qemu/typedefs.h. > > Signed-off-by: Philippe Mathieu-Daudé I think this is heading in the right

Re: [Qemu-devel] [PATCH] tcg: Limit the number of ops in a TB

2018-05-08 Thread Philippe Mathieu-Daudé
On 05/08/2018 04:36 PM, Richard Henderson wrote: > In 6001f7729e12 we partially attempt to address the branch > displacement overflow caused by 15fa08f845. > > However, gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vqtbX.c > is a testcase that contains a TB so large as to overflow anyway. >

[Qemu-devel] [PULL 27/30] shippable: Remove Debian 8 libfdt kludge

2018-05-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This kludge was added in a825ca06137, but a cleaner and more generic fix is now available (see ##COMMIT_CONFIGURE_LIBFDT_LDFLAGS_SHA##). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180415230522.24404-4-f4...@amsat.org> Signed-off-by: Paolo Bonzini --- .sh

[Qemu-devel] [PULL 25/30] configure: Really use local libfdt if the system one is too old

2018-05-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé QEMU requires libfdt version >= 1.4.2. If the host has an older libfdt installed, the configure script will use a (git cloned) local version. Example with Debian 8: $ dpkg-query --showformat='${Version}\n' --show libfdt-dev 1.4.0+dfsg-1 $ ./configure

[Qemu-devel] [PULL 21/30] qemu-options: Remove deprecated -no-kvm-irqchip

2018-05-08 Thread Paolo Bonzini
From: Thomas Huth We've never documented this option in our qemu-doc, so apart from the users that already used the old qemu-kvm fork before, most users should not be aware of this option at all. It's been marked as deprecated in the source code for a long time already, and officially marked as d

[Qemu-devel] [PULL 20/30] qemu-options: Remove deprecated -no-kvm-pit-reinjection

2018-05-08 Thread Paolo Bonzini
From: Thomas Huth Deprecated since the beginning when it was added for compatibility with the ancient qemu-kvm fork of QEMU, and it even printed out the deprecation warning since right from the start (i.e. QEMU v1.3.0), so it's really time to remove this now. Reviewed-by: Markus Armbruster Sign

Re: [Qemu-devel] [PATCH] hw/ide/ahci: Keep ALLWINNER_AHCI() macro internal

2018-05-08 Thread John Snow
On 05/08/2018 10:49 AM, Philippe Mathieu-Daudé wrote: > The ALLWINNER_AHCI() macro is only used in ahci-allwinner.c. > extra internal! > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: John Snow Feel free to stage in trivial, thanks.

Re: [Qemu-devel] [PATCH] RISC-V: Remove unnecessary header include

2018-05-08 Thread Alistair Francis
On Tue, May 8, 2018 at 7:42 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/riscv/riscv_htif.c | 1 - > hw/riscv/sifive_e.c | 1 - > hw/riscv/sifive_u.c | 1 - > hw/riscv/spike.c | 1 - > hw/riscv/virt.c

[Qemu-devel] [PULL 14/30] opts: don't silently truncate long parameter keys

2018-05-08 Thread Paolo Bonzini
From: Daniel P. Berrangé The existing QemuOpts parsing code uses a fixed size 128 byte buffer for storing the parameter keys. If a key exceeded this size it was silently truncate and no error reported to the user. This behaviour was reasonable & harmless because traditionally the key names are al

Re: [Qemu-devel] [RFC PATCH 4/4] hw/ide/ahci: Remove AllwinnerAHCIState from qemu/typedefs.h

2018-05-08 Thread John Snow
On 05/08/2018 11:10 AM, Philippe Mathieu-Daudé wrote: > Files requiring AllwinnerAHCIState already include "hw/ide/ahci.h". > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/ide/ahci.h | 4 ++-- > include/qemu/typedefs.h | 1 - > 2 files changed, 2 insertions(+), 3 deletions(-) >

[Qemu-devel] [PULL 13/30] accel: use g_strsplit for parsing accelerator names

2018-05-08 Thread Paolo Bonzini
From: Daniel P. Berrangé Instead of re-using the get_opt_name() method from QemuOpts to split a string on ':', just use g_strsplit(). Signed-off-by: Daniel P. Berrangé Message-Id: <20180416111743.8473-2-berra...@redhat.com> Signed-off-by: Paolo Bonzini Signed-off-by: Daniel P. Berrangé ---

[Qemu-devel] [PULL 29/30] pc-dimm: fix error messages if no slots were defined

2018-05-08 Thread Paolo Bonzini
From: David Hildenbrand If no slots were defined we try to allocate an empty bitmap, which fails. Signed-off-by: David Hildenbrand Reviewed-by: Marcel Apfelbaum Reviewed-by: Thomas Huth Message-Id: <20180427120515.24067-1-da...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/mem/pc-dimm.c |

[Qemu-devel] [PULL 07/30] exec: move memory access declarations to a common header, inline *_phys functions

2018-05-08 Thread Paolo Bonzini
For now, this reduces the text size very slightly due to the newly-added inlining: text size before: 9301965 text size after: 9300645 Later, however, the declarations in include/exec/memory_ldst.inc.h will be reused for the MemoryRegionCache slow path functions. Signed-off-by: Paolo Bonzin

Re: [Qemu-devel] [PATCH v1] configure: recognize more rpmbuild macros

2018-05-08 Thread Paolo Bonzini
On 18/04/2018 11:23, Paolo Bonzini wrote: > On 18/04/2018 09:50, Olaf Hering wrote: >> Extend the list of recognized, but ignored options from rpms %configure >> macro. This fixes build on hosts running SUSE Linux. >> >> Signed-off-by: Olaf Hering >> --- >> configure | 3 +++ >> 1 file changed, 3

[Qemu-devel] [PULL 28/30] build: Silence dtc directory creation

2018-05-08 Thread Paolo Bonzini
From: Jan Kiszka Align with other mkdir calls. Signed-off-by: Jan Kiszka Reviewed-by: Philippe Mathieu-Daudé Message-Id: <0dd4c8f5-d60e-e564-652f-cd0101f6e...@web.de> Message-Id: <20180415230522.24404-5-f4...@amsat.org> Signed-off-by: Paolo Bonzini --- Makefile | 2 +- 1 file changed, 1 ins

[Qemu-devel] [PULL 11/30] qemu-thread: always keep the posix wrapper layer

2018-05-08 Thread Paolo Bonzini
From: Peter Xu We will conditionally have a wrapper layer depending on whether the host has the PTHREAD_SETNAME capability. It complicates stuff. Let's keep the wrapper there; we opt out the pthread_setname_np() call only. Signed-off-by: Peter Xu Message-Id: <20180412053444.17801-1-pet...@red

[Qemu-devel] [PULL 30/30] rename included C files to foo.inc.c, remove osdep.h

2018-05-08 Thread Paolo Bonzini
osdep.h is only needed for files that are compiled directly. Remove it from included C source files, and rename them to *.inc.c so that scripts/clean-includes knows to skip them. Cc: Eric Blake Cc: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- target/cris/tr

[Qemu-devel] [PULL 26/30] configure: Display if libfdt is from system or git

2018-05-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The configure script outputs "yes" regardless which libfdt is used: ./configure [...] fdt support yes Sometimes you can have both system and local git version available, change the configure script to display which library got selected: debian8$ dpkg-

[Qemu-devel] [PULL 09/30] exec: extract address_space_translate_iommu, fix page_mask corner case

2018-05-08 Thread Paolo Bonzini
This will be used to process IOMMUs in a MemoryRegionCache. This includes a small bugfix, in that the returned page_mask is now correctly -1 if the IOMMU memory region maps the entire address space directly. Previously, address_space_get_iotlb_entry would return ~TARGET_PAGE_MASK. Reviewed-by: P

[Qemu-devel] [PULL 15/30] opts: don't silently truncate long option values

2018-05-08 Thread Paolo Bonzini
From: Daniel P. Berrangé The existing QemuOpts parsing code uses a fixed size 1024 byte buffer for storing the option values. If a value exceeded this size it was silently truncated and no error reported to the user. Long option values is not a common scenario, but it is conceivable that they wil

[Qemu-devel] [PULL 23/30] glib: bump min required glib library version to 2.42

2018-05-08 Thread Paolo Bonzini
From: Daniel P. Berrangé Per supported platforms doc, the various min glib on relevant distros is: RHEL-7: 2.50.3 Debian (Stretch): 2.50.3 Debian (Jessie): 2.42.1 OpenBSD (Ports): 2.54.3 FreeBSD (Ports): 2.50.3 OpenSUSE Leap 15: 2.54.3 Ubuntu (Xenial): 2.48.0 macOS (Homebrew): 2.

[Qemu-devel] [PULL 16/30] target/i386: sev: fix memory leaks

2018-05-08 Thread Paolo Bonzini
Reported by Coverity. Signed-off-by: Paolo Bonzini --- target/i386/sev.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index c011671..2395171 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -

[Qemu-devel] [PULL 06/30] memdev: remove "id" property

2018-05-08 Thread Paolo Bonzini
The "id" property is unnecessary and can be replaced simply with object_get_canonical_path_component. This patch mostly undoes commit e1ff3c67e8 ("monitor: fix qmp/hmp query-memdev not reporting IDs of memory backends", 2017-01-12). Signed-off-by: Paolo Bonzini --- backends/hostmem.c | 26

[Qemu-devel] [PULL 24/30] i386/kvm: add support for Hyper-V reenlightenment MSRs

2018-05-08 Thread Paolo Bonzini
From: Vitaly Kuznetsov KVM recently gained support for Hyper-V Reenlightenment MSRs which are required to make KVM-on-Hyper-V enable TSC page clocksource to its guests when INVTSC is not passed to it (and it is not passed by default in Qemu as it effectively blocks migration). Signed-off-by: Vit

[Qemu-devel] [PULL 19/30] qemu-options: Bail out on unsupported options instead of silently ignoring them

2018-05-08 Thread Paolo Bonzini
From: Thomas Huth The dangling remainder of the -tdf option revealed a deficiency in our option parsing: Options that have been declared, but are not supported in the switch-case statement in vl.c and not handled in the OS-specifc os_parse_cmd_args() functions are currently silently ignored. We s

[Qemu-devel] [PULL 02/30] cpus: Fix event order on resume of stopped guest

2018-05-08 Thread Paolo Bonzini
From: Markus Armbruster When resume of a stopped guest immediately runs into block device errors, the BLOCK_IO_ERROR event is sent before the RESUME event. Reproducer: 1. Create a scratch image $ dd if=/dev/zero of=scratch.img bs=1M count=100 Size doesn't actually matter. 2. Prepare blk

[Qemu-devel] [PULL 17/30] qemu-options: Mark -virtioconsole as deprecated

2018-05-08 Thread Paolo Bonzini
From: Thomas Huth The qemu-doc already states that this option is only maintained for backward compatibility and "-device virtconsole" should be used instead. So let's take the next step and mark this option officially as deprecated. Reviewed-by: Markus Armbruster Signed-off-by: Thomas Huth Me

[Qemu-devel] [PULL 22/30] qemu-doc: provide details of supported build platforms

2018-05-08 Thread Paolo Bonzini
From: Daniel P. Berrangé Describe the policy the project uses to decide which OS are supported as build platforms. This will: - Allow maintainers to determine when the minimum version of a 3rd party piece of software can be increased without negatively impacting supported platforms.

[Qemu-devel] [PULL 12/30] update-linux-headers: drop hyperv.h

2018-05-08 Thread Paolo Bonzini
From: Roman Kagan As of mainline linux commit 5a485803221777013944cbd1a7cd5c62efba3ffa "x86/hyper-v: move hyperv.h out of uapi" by Vitaly Kuznetsov, no linux uapi header includes it, so we no longer need to create a stub for it. Cc: Vitaly Kuznetsov Signed-off-by: Roman Kagan Message-Id: <2018

[Qemu-devel] [PULL 00/30] Misc patches for 2018-05-09

2018-05-08 Thread Paolo Bonzini
The following changes since commit cc8f8ba754bba17eea9791d67b572eb26e30b4ce: Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-05-08 15:25:17 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream

[Qemu-devel] [PULL 05/30] qom: allow object_get_canonical_path_component without parent

2018-05-08 Thread Paolo Bonzini
Just return NULL; any callers that cause a change in behavior would have caused an assertion failure before, so this is safe. Signed-off-by: Paolo Bonzini --- include/qom/object.h | 1 + qom/object.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/qom/ob

[Qemu-devel] [PULL 18/30] qemu-options: Remove remainders of the -tdf option

2018-05-08 Thread Paolo Bonzini
From: Thomas Huth The -tdf options has been removed with d07aa197c5a1556449361a0cbb5108e2, but apparently I forgot to remove the corresponding two lines from qemu-options.hx, so this option is still "available" and just silently ignored. Kill it now for good. Reviewed-by: Markus Armbruster Sign

[Qemu-devel] [PULL 08/30] exec: small changes to flatview_do_translate

2018-05-08 Thread Paolo Bonzini
Prepare for extracting the IOMMU part to a separate function. Mostly cosmetic; the only semantic change is that, if there is more than one cascaded IOMMU and the second one fails to translate, *plen_out is now adjusted according to the page mask of the first IOMMU. Reviewed-by: Peter Xu Signed-o

[Qemu-devel] [PULL 01/30] configure: recognize more rpmbuild macros

2018-05-08 Thread Paolo Bonzini
From: Olaf Hering Extend the list of recognized, but ignored options from rpms %configure macro. This fixes build on hosts running SUSE Linux. Cc: qemu-sta...@nongnu.org Signed-off-by: Olaf Hering Message-Id: <20180418075045.27393-1-o...@aepfle.de> Signed-off-by: Paolo Bonzini --- configure |

[Qemu-devel] [PULL 10/30] exec: reintroduce MemoryRegion caching

2018-05-08 Thread Paolo Bonzini
MemoryRegionCache was reverted to "normal" address_space_* operations for 2.9, due to lack of support for IOMMUs. Reinstate the optimizations, caching only the IOMMU translation at address_cache_init but not the IOMMU lookup and target AddressSpace translation are not cached; now that MemoryRegion

[Qemu-devel] [PULL 03/30] cpus: tcg: fix never exiting loop on unplug

2018-05-08 Thread Paolo Bonzini
From: Cédric Le Goater Commit 9b0605f9837b ("cpus: tcg: unregister thread with RCU, fix exiting of loop on unplug") changed the exit condition of the loop in the vCPU thread function but forgot to remove the beginning 'while (1)' statement. The resulting code : while (1) { ...

[Qemu-devel] [PULL 04/30] checkpatch.pl: add common glib defines to typelist

2018-05-08 Thread Paolo Bonzini
From: Peter Xu Otherwise it can warn this: ERROR: space prohibited between function name and open parenthesis '(' When with things like this: typedef gboolean (*it_tree_iterator)(ITValue start, ITValue end); CC: Paolo Bonzini CC: "Daniel P. Berrangé" CC: Vladimir Sementsov-Ogievskiy C

Re: [Qemu-devel] [PATCH] RISC-V: Remove unnecessary header include

2018-05-08 Thread Michael Clark
On Wed, May 9, 2018 at 2:42 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Michael Clark --- > hw/riscv/riscv_htif.c | 1 - > hw/riscv/sifive_e.c | 1 - > hw/riscv/sifive_u.c | 1 - > hw/riscv/spike.c | 1 - > hw/riscv/virt.c | 1 - >

Re: [Qemu-devel] [PULL 0/3] RISC-V: QEMU 2.13 Minor Fixes

2018-05-08 Thread Michael Clark
On Wed, May 9, 2018 at 8:49 AM, Peter Maydell wrote: > On 8 May 2018 at 21:07, Michael Clark wrote: > > The following changes since commit c8b7e627b4269a3bc3ae41d9f42054 > 7a47e6d9b9: > > > > Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2018-05-04' > into staging (2018-05-04 14:42

[Qemu-devel] [RFC PATCH 1/1] SPARC64: add icount support

2018-05-08 Thread Mark Cave-Ayland
This patch adds gen_io_start()/gen_io_end() to various instructions as required in order to boot my OpenBIOS test images on qemu-system-sparc64 with icount enabled. Signed-off-by: Mark Cave-Ayland --- target/sparc/translate.c | 97 1 file changed,

  1   2   3   4   >