Re: [Qemu-devel] About live migration rollback

2019-01-03 Thread Dr. David Alan Gilbert
* Gonglei (Arei) (arei.gong...@huawei.com) wrote: > Hi, > > > > > * Gonglei (Arei) (arei.gong...@huawei.com) wrote: > > > Hi Dave, > > > > > > We discussed some live migration fallback scenarios in this year's KVM > > > forum, > > > and now I can provide another scenario, perhaps the upstream

[Qemu-devel] [PATCH v2] qemu-io: Reinitialize optind to 1 (not 0) before parsing inner command.

2019-01-03 Thread Richard W.M. Jones
On FreeBSD 11.2: $ nbdkit memory size=1M --run './qemu-io -f raw -c "aio_write 0 512" $nbd' Parsing error: non-numeric argument, or extraneous/unrecognized suffix -- aio_write After main option parsing, we reinitialize optind so we can parse each command. However reinitializing optind to 0

[Qemu-devel] [PATCH v3 2/3] dmg: use enumeration type instead of hard coding number

2019-01-03 Thread yuchenlin
Signed-off-by: yuchenlin Reviewed-by: Julio Faracco Reviewed-by: Stefan Hajnoczi --- block/dmg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/dmg.c b/block/dmg.c index 65a0140487..9758482131 100644 --- a/block/dmg.c +++ b/block/dmg.c @@ -267,7 +267,7 @@ static

[Qemu-devel] [PATCH 08/11] hw/timer/nrf51_timer: Add nRF51 Timer peripheral

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz This patch adds the model for the nRF51 timer peripheral. Currently, only the TIMER mode is implemented. Signed-off-by: Steffen Görtz Signed-off-by: Stefan Hajnoczi --- hw/timer/Makefile.objs | 1 + include/hw/timer/nrf51_timer.h | 80 +++

[Qemu-devel] [PATCH 04/11] arm: Instantiate NRF51 random number generator

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz Use RNG in SOC. Signed-off-by: Steffen Görtz Reviewed-by: Stefan Hajnoczi Reviewed-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- include/hw/arm/nrf51_soc.h | 2 ++ hw/arm/nrf51_soc.c | 16 2 files changed, 18 insertions(+) diff --git

[Qemu-devel] [PATCH v3 for-4.0 5/7] vhost-user-blk: Add support to provide shared memory to backend

2019-01-03 Thread elohimes
From: Xie Yongji This patch add supports for vhost-user-blk device to provide shared memory to backend. Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu --- hw/block/vhost-user-blk.c | 26 ++ include/hw/virtio/vhost-user-blk.h | 1 + 2 files changed, 27

[Qemu-devel] [PATCH v3 for-4.0 1/7] char-socket: Enable "nowait" option on client sockets

2019-01-03 Thread elohimes
From: Xie Yongji Enable "nowait" option to make QEMU not do a connect on client sockets during initialization of the chardev. Then we can use qemu_chr_fe_wait_connected() to connect when necessary. Now it would be used for unix domain socket of vhost-user-blk device to support reconnect.

Re: [Qemu-devel] [PATCH 02/11] arm: Add header to host common definition for nRF51 SOC peripherals

2019-01-03 Thread Philippe Mathieu-Daudé
On 1/3/19 10:11 AM, Stefan Hajnoczi wrote: > From: Steffen Görtz > > Adds a header that provides definitions that are used > across nRF51 peripherals > > Signed-off-by: Steffen Görtz > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Peter Maydell > Signed-off-by: Stefan Hajnoczi > --- >

Re: [Qemu-devel] [PATCH v2 1/3] dmg: fix binary search

2019-01-03 Thread Yu-Chen Lin
Stefan Hajnoczi 於 2019年1月3日 週四 下午6:09寫道: > On Wed, Jan 02, 2019 at 08:20:54PM +0800, 林育辰 wrote: > > This series is focus on fixing bug #1809304 (see: > > https://bugs.launchpad.net/qemu/+bug/1809304). > > There is an example dmg file in #1809304 which will trigger this bug. > > Thanks. It would

[Qemu-devel] [PATCH v5 3/5] hw/acpi: Use QEMU_NONSTRING for non NUL-terminated arrays

2019-01-03 Thread Philippe Mathieu-Daudé
GCC 8 added a -Wstringop-truncation warning: The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically intended to highlight likely unintended uses of the strncpy function that truncate the terminating NUL character from the source string. This new

[Qemu-devel] [PATCH v5 4/5] migration: Fix stringop-truncation warning

2019-01-03 Thread Philippe Mathieu-Daudé
From: Marc-André Lureau GCC 8 added a -Wstringop-truncation warning: The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically intended to highlight likely unintended uses of the strncpy function that truncate the terminating NUL character from the

[Qemu-devel] [PATCH v5 2/5] block/sheepdog: Use QEMU_NONSTRING for non NUL-terminated arrays

2019-01-03 Thread Philippe Mathieu-Daudé
GCC 8 added a -Wstringop-truncation warning: The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically intended to highlight likely unintended uses of the strncpy function that truncate the terminating NUL character from the source string. This new

Re: [Qemu-devel] [PATCH 0/3] cutils: Cleanup, improve documentation

2019-01-03 Thread Philippe Mathieu-Daudé
On 1/2/19 6:41 PM, no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/20181226171538.21984-1-phi...@redhat.com/ [...]> === OUTPUT BEGIN === > Checking PATCH 1/3: util/cutils: Move size_to_str() from "qemu-common.h" to > "cutils.h"... > WARNING: Block comments use a leading /*

[Qemu-devel] [PATCH] i386: Enable NPT and NRIPSAVE for AMD CPUs

2019-01-03 Thread Vitaly Kuznetsov
Modern AMD CPUs support NPT and NRIPSAVE features and KVM exposes these when present. NRIPSAVE apeared somewhere in Opteron_G3 lifetime (e.g. QuadCore AMD Opteron 2378 has is but QuadCore AMD Opteron HE 2344 doesn't), NPT was introduced a bit earlier. Add the FEAT_SVM leaf to Opteron_G4/G5 and

[Qemu-devel] [PATCH v3 for-4.0 3/7] libvhost-user: Introduce vu_queue_map_desc()

2019-01-03 Thread elohimes
From: Xie Yongji Introduce vu_queue_map_desc() which should be independent with vu_queue_pop(); Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu Reviewed-by: Marc-André Lureau --- contrib/libvhost-user/libvhost-user.c | 88 --- 1 file changed, 51 insertions(+), 37

[Qemu-devel] [PATCH v3 for-4.0 2/7] vhost-user: Support providing shared memory to backend

2019-01-03 Thread elohimes
From: Xie Yongji This patch introduces two new messages VHOST_USER_GET_SHM_SIZE and VHOST_USER_SET_SHM_FD to support providing shared memory to backend. Firstly, qemu uses VHOST_USER_GET_SHM_SIZE to get the required size of shared memory from backend. Then, qemu allocates memory and sends them

[Qemu-devel] [PATCH v3 for-4.0 0/7] vhost-user-blk: Add support for backend reconnecting

2019-01-03 Thread elohimes
From: Xie Yongji This patchset is aimed at supporting qemu to reconnect vhost-user-blk backend after vhost-user-blk backend crash or restart. The patch 1 uses exisiting wait/nowait options to make QEMU not do a connect on client sockets during initialization of the chardev. The patch 2

[Qemu-devel] [PATCH v3 for-4.0 4/7] libvhost-user: Support recording inflight I/O in shared memory

2019-01-03 Thread elohimes
From: Xie Yongji This patch adds support for VHOST_USER_GET_SHM_SIZE and VHOST_USER_SET_SHM_FD message to get shared memory from qemu. Then we maintain a "bitmap" of all descriptors in the shared memory for each queue to record inflight I/O. Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu

[Qemu-devel] [Bug 1810400] [NEW] Failed to make dirty bitmaps writable: Can't update bitmap directory: Operation not permitted

2019-01-03 Thread Ali Sag
Public bug reported: blockcommit does not work if there is dirty block. virsh version Compiled against library: libvirt 4.10.0 Using library: libvirt 4.10.0 Using API: QEMU 4.10.0 Running hypervisor: QEMU 2.12.0 Scenario: 1. Create an instance 2. Add dirty bitmap to vm disk. 3. create a

Re: [Qemu-devel] [PATCH for-4.0 v4 2/2] virtio: Provide version-specific variants of virtio PCI devices

2019-01-03 Thread Cornelia Huck
On Thu, 3 Jan 2019 11:14:44 +0100 Thomas Huth wrote: > On 2019-01-03 10:38, Thomas Huth wrote: > > On 2018-12-05 20:57, Eduardo Habkost wrote: > >> Many of the current virtio-*-pci device types actually represent > >> 3 different types of devices: > >> * virtio 1.0 non-transitional devices >

[Qemu-devel] [PATCH v3 0/3] dmg: fixing reading in dmg

2019-01-03 Thread yuchenlin
There are two bugs in dmg reading. First, it may hang in binary search. this problem is solved by patch 1. Second, because of lacking zero chunk table, reading zero sector will return EIO. this problem is solved by patch 2 and 3. Thanks v2 -> v3: * fix potential overflow (Thanks Stefan) * add

[Qemu-devel] [PATCH v3 1/3] dmg: fix binary search

2019-01-03 Thread yuchenlin
There is a possible hang in original binary search implementation. That is if chunk1 = 4, chunk2 = 5, chunk3 = 4, and we go else case. The chunk1 will be still 4, and so on. Signed-off-by: yuchenlin --- block/dmg.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [Bug 1810405] [NEW] source tarball has errors when untarring

2019-01-03 Thread David
Public bug reported: If you download qemu-2.10.0.tar.xv and/or qemu-2.10.1.tar.xv, and follow the directions at https://www.qemu.org/download/, you get a tar error. To repro: $ wget https://download.qemu.org/qemu-2.10.0.tar.xz $ tar xJf qemu-2.10.0.tar.xz tar:

[Qemu-devel] [PATCH 02/11] arm: Add header to host common definition for nRF51 SOC peripherals

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz Adds a header that provides definitions that are used across nRF51 peripherals Signed-off-by: Steffen Görtz Reviewed-by: Stefan Hajnoczi Reviewed-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- include/hw/arm/nrf51.h | 45

[Qemu-devel] [PATCH 00/11] arm: Core nRF51 Devices and Microbit Support

2019-01-03 Thread Stefan Hajnoczi
Steffen has been busy so I picked up "[PATCH v5 00/14] arm: nRF51 Devices and Microbit Support". This series includes the core devices needed to boot basic guest software on the "microbit" board. This series includes Steffen's random number generator, GPIO, timer, and a stubbed clock. Also,

[Qemu-devel] [PATCH 05/11] hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheral

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz This adds a model of the nRF51 GPIO peripheral. Reference Manual: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf The nRF51 series microcontrollers support up to 32 GPIO pins in various configurations. The pins can be used as input pins with pull-ups or pull-down.

[Qemu-devel] [PATCH 07/11] tests/microbit-test: Add Tests for nRF51 GPIO

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz The test suite for the nRF51 GPIO peripheral for now only tests initial state. Additionally a set of tests testing an implementation detail of the model are included. Signed-off-by: Steffen Görtz Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi ---

[Qemu-devel] [PATCH 11/11] arm: Add Clock peripheral stub to NRF51 SOC

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz This stubs enables the microbit-micropython firmware to run on the microbit machine. Signed-off-by: Steffen Görtz Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- include/hw/arm/nrf51_soc.h | 1 + hw/arm/nrf51_soc.c | 26 ++

Re: [Qemu-devel] [PATCH 0/3] cutils: Cleanup, improve documentation

2019-01-03 Thread Philippe Mathieu-Daudé
Cc'ing Markus and Thomas who reviewed commit 8c06fbdf36b. On Thu, Jan 3, 2019 at 10:04 AM Philippe Mathieu-Daudé wrote: > On 1/2/19 6:41 PM, no-re...@patchew.org wrote: > > Patchew URL: > > https://patchew.org/QEMU/20181226171538.21984-1-phi...@redhat.com/ > [...]> === OUTPUT BEGIN === > >

Re: [Qemu-devel] [PATCH for-4.0 v4 2/2] virtio: Provide version-specific variants of virtio PCI devices

2019-01-03 Thread Thomas Huth
On 2019-01-03 10:38, Thomas Huth wrote: > On 2018-12-05 20:57, Eduardo Habkost wrote: >> Many of the current virtio-*-pci device types actually represent >> 3 different types of devices: >> * virtio 1.0 non-transitional devices >> * virtio 1.0 transitional devices >> * virtio 0.9 ("legacy device"

Re: [Qemu-devel] [PATCH v3 14/16] i2c:smbus_eeprom: Add vmstate handling to the smbus eeprom

2019-01-03 Thread Dr. David Alan Gilbert
* Corey Minyard (miny...@acm.org) wrote: > On 11/29/18 7:29 AM, Dr. David Alan Gilbert wrote: > > * miny...@acm.org (miny...@acm.org) wrote: > > > From: Corey Minyard > > > > > > Transfer the state of the EEPROM on a migration. This way the > > > data remains consistent on migration. > > > > >

[Qemu-devel] [PATCH 2/3] tests/boot-order: Make test independent of global_qtest

2019-01-03 Thread Thomas Huth
Pass around the QTestState from function to function, so that we can finally get rid of the out-of-favor global_qtest variable in this file, too. Signed-off-by: Thomas Huth --- tests/boot-order-test.c | 59 - 1 file changed, 29 insertions(+), 30

[Qemu-devel] [PATCH 0/3] Kill global_qtest in endianess, boot-order and pnv-xscom

2019-01-03 Thread Thomas Huth
It's very cumbersome to run multiple instances of QEMU in tests where this is required (e.g. in migration tests) when the test state is tracked in a global variable, so we should get rid of global_qtest in the long run. This series removes the dependency on this unwanted global_qtest variable in

[Qemu-devel] [PATCH v5 0/5] Fix strncpy() warnings for GCC8 new -Wstringop-truncation

2019-01-03 Thread Philippe Mathieu-Daudé
GCC 8 new warning prevents builds to success since quite some time. First report on the mailing list is in July 2018: https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg03723.html Since v4: - fixed some checkpatch errors/warnings reported by patchew - commented checkpatch errors/warnings

[Qemu-devel] [PATCH v5 1/5] qemu/compiler: Define QEMU_NONSTRING

2019-01-03 Thread Philippe Mathieu-Daudé
GCC 8 introduced the -Wstringop-truncation checker to detect truncation by the strncat and strncpy functions (closely related to -Wstringop-overflow, which detect buffer overflow by string-modifying functions declared in ). In tandem of -Wstringop-truncation, the "nonstring" attribute was added:

[Qemu-devel] [PATCH 09/11] arm: Instantiate NRF51 Timers

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz Instantiates TIMER0 - TIMER2 Signed-off-by: Steffen Görtz Reviewed-by: Stefan Hajnoczi Reviewed-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- include/hw/arm/nrf51_soc.h | 4 hw/arm/nrf51_soc.c | 26 ++ 2 files changed, 30

[Qemu-devel] [PATCH 06/11] arm: Instantiate NRF51 general purpose I/O

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz Instantiates GPIO peripheral model Signed-off-by: Steffen Görtz Reviewed-by: Stefan Hajnoczi Reviewed-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- include/hw/arm/nrf51_soc.h | 2 ++ hw/arm/nrf51_soc.c | 16 2 files changed, 18

[Qemu-devel] [PATCH 01/11] qtest: Add set_irq_in command to set IRQ/GPIO level

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz Adds a new qtest command "set_irq_in" which allows to set qemu gpio lines to a given level. Based on https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02363.html which never got merged. Signed-off-by: Steffen Görtz Originally-by: Matthew Ogilvie Reviewed-by: Stefan

[Qemu-devel] [PATCH 10/11] tests/microbit-test: Add Tests for nRF51 Timer

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz Basic tests for nRF51 Timer Peripheral. Signed-off-by: Steffen Görtz Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- tests/microbit-test.c | 95 +++ 1 file changed, 95 insertions(+) diff --git

Re: [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table

2019-01-03 Thread Alberto Garcia
On Wed 02 Jan 2019 12:09:05 PM CET, Leonid Bloch wrote: > +print_sizes() { > +local p=10 > +while [ ${p} -lt 64 ] > +do > +local pad=' ' > +local n=$((p % 10)) > +n=$((1 << n)) > +[ $((n / 100)) -eq 0 ] && pad=' ' > +[ $((n / 10)) -eq 0 ] &&

[Qemu-devel] [PATCH] sun4u: add power_mem_read routine

2019-01-03 Thread P J P
From: Prasad J Pandit Define skeleton 'power_mem_read' routine. Avoid NULL dereference. Reported-by: Fakhri Zulkifli Signed-off-by: Prasad J Pandit --- hw/sparc64/sun4u.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index

Re: [Qemu-devel] [PATCH for-4.0 v4 2/2] virtio: Provide version-specific variants of virtio PCI devices

2019-01-03 Thread Thomas Huth
On 2018-12-05 20:57, Eduardo Habkost wrote: > Many of the current virtio-*-pci device types actually represent > 3 different types of devices: > * virtio 1.0 non-transitional devices > * virtio 1.0 transitional devices > * virtio 0.9 ("legacy device" in virtio 1.0 terminology) > > That would be

[Qemu-devel] [PATCH v2] qemu-io: Reinitialize optind to 1 (not 0) before parsing inner command.

2019-01-03 Thread Richard W.M. Jones
v1 was here: https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg06237.html https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg00133.html v2: - Simplify so we just set optind = 1. - Retest it on Linux and FreeBSD. Rich.

[Qemu-devel] [PATCH v3 for-4.0 6/7] vhost-user-blk: Add support to reconnect backend

2019-01-03 Thread elohimes
From: Xie Yongji Since we now support the message VHOST_USER_GET_SHM_SIZE and VHOST_USER_SET_SHM_FD. The backend is able to restart safely because it can record inflight I/O in shared memory. This patch allows qemu to reconnect the backend after connection closed. Signed-off-by: Xie Yongji

[Qemu-devel] [PATCH v3 for-4.0 7/7] contrib/vhost-user-blk: enable inflight I/O recording

2019-01-03 Thread elohimes
From: Xie Yongji This patch enables inflight I/O recording for vhost-user-blk backend so that we could restart it safely. Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu --- contrib/vhost-user-blk/vhost-user-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH v4] log: Make glib logging go through QEMU

2019-01-03 Thread Stefan Hajnoczi
On Fri, Dec 14, 2018 at 11:56:42AM +0100, Christophe Fergeau wrote: > +static void qemu_log_func(const gchar *log_domain, > + GLogLevelFlags log_level, > + const gchar *message, > + gpointer user_data) > +{ > +switch

[Qemu-devel] [PATCH 1/3] tests/endianesss: Make test independent of global_qtest

2019-01-03 Thread Thomas Huth
Pass around the test state explicitly, to be able to use the qtest_in*() and qtest_out*() function in this test. Signed-off-by: Thomas Huth --- tests/endianness-test.c | 329 1 file changed, 166 insertions(+), 163 deletions(-) diff --git

Re: [Qemu-devel] [PULL 00/42] tcg queued patches

2019-01-03 Thread Peter Maydell
On Tue, 25 Dec 2018 at 20:55, Richard Henderson wrote: > > The following changes since commit 9b2e891ec5ccdb4a7d583b77988848282606fdea: > > Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into > staging (2018-12-22 11:25:31 +) > > are available in the Git repository

[Qemu-devel] [PATCH v5 5/5] migration: Use strnlen() for fixed-size string

2019-01-03 Thread Philippe Mathieu-Daudé
GCC 8 introduced the -Wstringop-overflow, which detect buffer overflow by string-modifying functions declared in , such strncpy(), used in global_state_store_running(). GCC indeed found an incorrect use of strlen(), because this array is loaded by VMSTATE_BUFFER(runstate, GlobalState) then parsed

[Qemu-devel] [PATCH 03/11] hw/misc/nrf51_rng: Add NRF51 random number generator peripheral

2019-01-03 Thread Stefan Hajnoczi
From: Steffen Görtz Add a model of the NRF51 random number generator peripheral. This is a simple random generator that continuously generates new random values after startup. Reference Manual: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf Signed-off-by: Steffen Görtz Reviewed-by:

[Qemu-devel] [PATCH QEMU v5] hw/arm/sysbus-fdt: Add support for instantiating generic devices

2019-01-03 Thread Geert Uytterhoeven
Add a fallback for instantiating generic devices without a type-specific or compatible-specific instantiation method. This will be used when no other match is found. Generic device instantiation avoids having to write device-specific instantiation methods for each and every "simple" device using

Re: [Qemu-devel] [PATCH v2 1/3] dmg: fix binary search

2019-01-03 Thread Stefan Hajnoczi
On Wed, Jan 02, 2019 at 08:20:54PM +0800, 林育辰 wrote: > This series is focus on fixing bug #1809304 (see: > https://bugs.launchpad.net/qemu/+bug/1809304). > There is an example dmg file in #1809304 which will trigger this bug. Thanks. It would be great to include a tiny dmg file in

Re: [Qemu-devel] [PATCH v5] s390x/pci: add common function measurement block

2019-01-03 Thread Pierre Morel
On 19/12/2018 15:22, Cornelia Huck wrote: On Wed, 19 Dec 2018 13:57:05 +0100 Pierre Morel wrote: From: Yi Min Zhao Common function measurement block is used to report zPCI internal counters of successful pcilg/stg/stb and rpcit instructions to a memory location provided by the program.

Re: [Qemu-devel] [PATCH PULL 02/31] contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer

2019-01-03 Thread Cornelia Huck
On Sat, 22 Dec 2018 11:50:07 +0200 Marcel Apfelbaum wrote: > From: Yuval Shaia > > RDMA MAD kernel module (ibcm) disallow more than one MAD-agent for a > given MAD class. > This does not go hand-by-hand with qemu pvrdma device's requirements > where each VM is MAD agent. > Fix it by adding

Re: [Qemu-devel] Can I have someone's feedback on [bug 1809075] Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel

2019-01-03 Thread Philippe Mathieu-Daudé
Cc'ing Marc-André & Gerd. On 12/19/18 10:31 AM, Gao Zhiyuan wrote: > Hi everyone. > > Can I please have someone's feedback on this bug? > https://bugs.launchpad.net/qemu/+bug/1809075 > Briefly, guest OS loses characters sent to it via vnc. And I spot the > bug in relation to ps2 driver. > > I'm

[Qemu-devel] [PATCH 3/3] tests/pnv-xscom: Make test independent of global_qtest

2019-01-03 Thread Thomas Huth
Pass around the QTestState, so that we can finally get rid of the out-of-favor global_qtest variable in this file, too. Signed-off-by: Thomas Huth --- tests/pnv-xscom-test.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git

[Qemu-devel] [PATCH v3 3/3] dmg: don't skip zero chunk

2019-01-03 Thread yuchenlin
The dmg file has many tables which describe: "start from sector XXX to sector XXX, the compression method is XXX and where the compressed data resides on". Each sector in the expanded file should be covered by a table. The table will describe the offset of compressed data (or raw depends on the

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add some missing SPARC-related files

2019-01-03 Thread Mark Cave-Ayland
On 03/01/2019 07:19, Thomas Huth wrote: > On 2019-01-02 20:34, Philippe Mathieu-Daudé wrote: >> Hi Thomas, >> >> On 1/2/19 4:46 PM, Thomas Huth wrote: >>> These files / devices are only used by SPARC machines, so we can sort >>> them into the corresponding categories in the MAINTAINERS file. >>>

Re: [Qemu-devel] [PATCH v4 0/5] Fix strncpy() warnings for GCC8 new -Wstringop-truncation

2019-01-03 Thread Philippe Mathieu-Daudé
On 1/2/19 4:21 PM, no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/20181228173356.15359-1-phi...@redhat.com/ [...]> === OUTPUT BEGIN === > Checking PATCH 1/5: qemu/compiler: Define QEMU_NONSTRING... > WARNING: architecture specific defines should be avoided > #53: FILE:

Re: [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table

2019-01-03 Thread Philippe Mathieu-Daudé
Hi Leonid, On 1/2/19 12:09 PM, Leonid Bloch wrote: > The lookup table for power-of-two sizes is now auto-generated during the > build, and not hard-coded into the units.h file. > This partially reverts commit 540b8492618eb. > Signed-off-by: Leonid Bloch > --- > .gitignore | 1 + >

[Qemu-devel] [PATCH v6] s390x/pci: add common function measurement block

2019-01-03 Thread Pierre Morel
From: Yi Min Zhao Common function measurement block is used to report zPCI internal counters of successful pcilg/stg/stb and rpcit instructions to a memory location provided by the program. This patch introduces a new ZpciFmb structure and schedules a timer callback to copy the zPCI measures to

[Qemu-devel] [PATCH v6] s390x/pci: add common fmb

2019-01-03 Thread Pierre Morel
After the last review round I corrected the commit message and use the sizeof of the target entries in the fmb_di_update() function instead of the uint definition. Regards, Pierre Yi Min Zhao (1): s390x/pci: add common function measurement block hw/s390x/s390-pci-bus.c | 4 +-

Re: [Qemu-devel] [PATCH v5 3/6] The discard flag for block stream operation

2019-01-03 Thread Dr. David Alan Gilbert
* Andrey Shinkevich (andrey.shinkev...@virtuozzo.com) wrote: > Adding a parameter to QMP block-stream command to allow discarding > blocks in the backing chain while blocks are being copied to the > active layer. > > Signed-off-by: Andrey Shinkevich > --- > block/copy-on-read.c | 24

Re: [Qemu-devel] [PATCH for-4.0 v9 05/16] migration: unify error handling for process_incoming_migration_co

2019-01-03 Thread Dr. David Alan Gilbert
* Fei Li (f...@suse.com) wrote: > In the current code, if process_incoming_migration_co() fails we do > the same error handing: set the error state, close the source file, > do the cleanup for multifd, and then exit(EXIT_FAILURE). To make the > code clearer, add a "goto fail" to unify the error

Re: [Qemu-devel] [PATCH v3 for-4.0 2/7] vhost-user: Support providing shared memory to backend

2019-01-03 Thread Yongji Xie
On Fri, 4 Jan 2019 at 01:13, Michael S. Tsirkin wrote: > > On Thu, Jan 03, 2019 at 06:18:14PM +0800, elohi...@gmail.com wrote: > > From: Xie Yongji > > > > This patch introduces two new messages VHOST_USER_GET_SHM_SIZE > > and VHOST_USER_SET_SHM_FD to support providing shared > > memory to

Re: [Qemu-devel] can we update QEMU's version of u-boot.e500 ?

2019-01-03 Thread David Gibson
On Fri, Jan 04, 2019 at 12:44:59AM +0100, Alexander Graf wrote: > > > On 03.01.19 18:38, Peter Maydell wrote: > > Hi; currently we ship with a u-boot.e500 which is from u-boot > > v2017.07. It would be nice to move that forward, specifically > > to at least v2017.11, which contains upstream

Re: [Qemu-devel] [PATCH] sun4u: add power_mem_read routine

2019-01-03 Thread P J P
Hello Mark, +-- On Thu, 3 Jan 2019, Mark Cave-Ayland wrote --+ | > /* Power */ | > +static uint64_t power_mem_read(void *opaque, hwaddr addr, unsigned size) | > +{ | > +return 0x; | > +} | > + | > | > static const MemoryRegionOps power_mem_ops = { | > +.read =

[Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6

2019-01-03 Thread Eduardo Habkost
The virtio-pci entries in HW_COMPAT_2_6 had an implicit assumption: that all virtio-pci subclasses support the disable-legacy and disable-modern options. That assumption was broken by commit f6e501a28ef9 ("virtio: Provide version-specific variants of virtio PCI devices"). This caused QEMU to

Re: [Qemu-devel] [PULL 35/40] spapr: extend the sPAPR IRQ backend for XICS migration

2019-01-03 Thread David Gibson
On Thu, Jan 03, 2019 at 10:57:21PM +0100, Cédric Le Goater wrote: > On 1/3/19 8:07 PM, Peter Maydell wrote: > > On Fri, 21 Dec 2018 at 05:46, David Gibson > > wrote: > >> > >> From: Cédric Le Goater > >> > >> Introduce a new sPAPR IRQ handler to handle resend after migration > >> when the

[Qemu-devel] RISCV Simulator

2019-01-03 Thread Joshua Sabet
Hello, I am a student doing research on the RISC V ISA and I was having difficulty creating a simulator to run RISC V using QEMU. I believe the OP in the question on the Stack Overflow Link had the same problem as me but I found the instructions to be confusing. -Josh

Re: [Qemu-devel] [PATCH for-4.0 v4 2/2] virtio: Provide version-specific variants of virtio PCI devices

2019-01-03 Thread Michael S. Tsirkin
On Thu, Jan 03, 2019 at 04:32:06PM -0200, Eduardo Habkost wrote: > On Thu, Jan 03, 2019 at 11:48:37AM +0100, Cornelia Huck wrote: > > On Thu, 3 Jan 2019 11:14:44 +0100 > > Thomas Huth wrote: > > > > > On 2019-01-03 10:38, Thomas Huth wrote: > > > > On 2018-12-05 20:57, Eduardo Habkost wrote: >

Re: [Qemu-devel] [PATCH for-4.0 v9 10/16] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-01-03 Thread David Gibson
On Thu, Jan 03, 2019 at 09:41:49PM +0800, Fei Li wrote: > > 在 2019/1/3 上午11:43, David Gibson 写道: > > On Wed, Jan 02, 2019 at 02:44:17PM +0800, 李菲 wrote: > > > 在 2019/1/2 上午10:36, David Gibson 写道: > > > > On Tue, Dec 25, 2018 at 10:04:43PM +0800, Fei Li wrote: > > > > > Add a local_err to hold the

Re: [Qemu-devel] [PATCH 4/8] ppc4xx: Use ram_addr_t in ppc4xx_sdram_adjust()

2019-01-03 Thread David Gibson
On Thu, Jan 03, 2019 at 03:03:20PM +0100, BALATON Zoltan wrote: > On Wed, 2 Jan 2019, David Gibson wrote: > > On Wed, Jan 02, 2019 at 03:06:38AM +0100, BALATON Zoltan wrote: > > > To avoid overflow if larger values are added later use ram_addr_t for > > > the sdram_bank_sizes parameter to match

Re: [Qemu-devel] [PATCH for-4.0 v9 10/16] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-01-03 Thread Fei Li
在 2019/1/4 下午1:21, David Gibson 写道: On Thu, Jan 03, 2019 at 09:41:49PM +0800, Fei Li wrote: 在 2019/1/3 上午11:43, David Gibson 写道: On Wed, Jan 02, 2019 at 02:44:17PM +0800, 李菲 wrote: 在 2019/1/2 上午10:36, David Gibson 写道: On Tue, Dec 25, 2018 at 10:04:43PM +0800, Fei Li wrote: Add a local_err

Re: [Qemu-devel] [PATCH v3 for-4.0 2/7] vhost-user: Support providing shared memory to backend

2019-01-03 Thread Yongji Xie
On Fri, 4 Jan 2019 at 10:41, Michael S. Tsirkin wrote: > > On Fri, Jan 04, 2019 at 10:31:34AM +0800, Yongji Xie wrote: > > On Fri, 4 Jan 2019 at 01:02, Michael S. Tsirkin wrote: > > > > > > On Thu, Jan 03, 2019 at 06:18:14PM +0800, elohi...@gmail.com wrote: > > > > From: Xie Yongji > > > > > >

Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6

2019-01-03 Thread Michael S. Tsirkin
On Fri, Jan 04, 2019 at 01:22:26AM -0200, Eduardo Habkost wrote: > The virtio-pci entries in HW_COMPAT_2_6 had an implicit > assumption: that all virtio-pci subclasses support the > disable-legacy and disable-modern options. > > That assumption was broken by commit f6e501a28ef9 ("virtio: >

[Qemu-devel] [PATCH] hw: pvrdma: fix memory leak in error path

2019-01-03 Thread Li Qiang
Spotted by Coverity: CID 1398595 Signed-off-by: Li Qiang --- hw/rdma/vmw/pvrdma_qp_ops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 300471a4c9..584be2043e 100644 --- a/hw/rdma/vmw/pvrdma_qp_ops.c +++

[Qemu-devel] [PATCH] hw: rdma: fix an off-by-one issue

2019-01-03 Thread Li Qiang
In rdma_rm_get_backend_gid_index(), the 'sgid_idx' is used to index the array 'dev_res->port.gid_tbl' which size is MAX_PORT_GIDS. Current the 'sgid_idx' may be MAX_PORT_GIDS thus cause an off-by-one issue. Spotted by Coverity: CID 1398594 Signed-off-by: Li Qiang --- hw/rdma/rdma_rm.c | 2 +-

Re: [Qemu-devel] [PATCH v2] target/arm: Convert ARM_TBFLAG_* to FIELDs

2019-01-03 Thread Peter Maydell
On Tue, 18 Dec 2018 at 16:43, Richard Henderson wrote: > > Use "register" TBFLAG_ANY to indicate shared state between > A32 and A64, and "registers" TBFLAG_A32 & TBFLAG_A64 for > fields that are specific to the given cpu state. > > Move ARM_TBFLAG_BE to shared state, instead of its current >

Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2

2019-01-03 Thread Philippe Mathieu-Daudé
On 1/3/19 2:23 PM, Peter Maydell wrote: > On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic > wrote: >> MIPS queue for December 2018 - v2 [...] > Hi; I'm afraid this doesn't build on all my test hosts: > > target/mips/translate.c: In function ‘gen_mxu_Q8MAX_Q8MIN’: >

[Qemu-devel] [PATCH] usb: dev-mtp: close fd in usb_mtp_object_readdir()

2019-01-03 Thread Li Qiang
Spotted by Coverity: CID 1397070 Signed-off-by: Li Qiang --- hw/usb/dev-mtp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index b19b576278..666bafd9e8 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -666,6 +666,7 @@ static void

Re: [Qemu-devel] [PATCH] usb: dev-mtp: close fd in usb_mtp_object_readdir()

2019-01-03 Thread Philippe Mathieu-Daudé
On 1/3/19 2:31 PM, Li Qiang wrote: > Spotted by Coverity: CID 1397070 Closing a CVE to open a CID :) Fixes: bab9df35ce > > Signed-off-by: Li Qiang > --- > hw/usb/dev-mtp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c > index

[Qemu-devel] [PATCH v4 04/16] virtio: split virtio rng bits from virtio-pci

2019-01-03 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- Remove the "contributions after" clause. This is based on commit 59ccd20a9ac719cff82180429458728f03ec612f Author: KONRAD Frederic Date: Wed Apr 24 10:07:56 2013 +0200 Fix duplicated test entry (lvivier) ---

[Qemu-devel] [PATCH v4 14/16] virtio: split virtio gpu bits from virtio-pci.h

2019-01-03 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/display/virtio-gpu-pci.c | 14 ++ hw/display/virtio-vga.c | 1 + hw/virtio/virtio-pci.h | 14 -- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/display/virtio-gpu-pci.c

Re: [Qemu-devel] [RFC PATCH 02/25] hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards

2019-01-03 Thread Thomas Huth
On 2018-12-27 07:33, Yang Zhong wrote: > From: Paolo Bonzini > > CONFIG_PIIX and CONFIG_Q35 created for the pc board object files. These > are enabled automatically at default-configs/i386-softmmu.mak and > default-configs/x86_64-softmmu.mak > > Signed-off-by: Ákos Kovács > Signed-off-by:

[Qemu-devel] [PATCH 0/8] target/mips: Update Inter-Thread Communication Unit support

2019-01-03 Thread Aleksandar Markovic
From: Aleksandar Markovic Inter-Thread Communication Unit (or ITU) represents and important part of contemporary MIPS cores. This series extends support for ITU in QEMU. The changes will not be visible for end users immediatelly, but there are plans to enable corresponding features for certain

[Qemu-devel] [PATCH 5/8] target/mips: Provide R/W access to SAARI and SAAR CP0 registers

2019-01-03 Thread Aleksandar Markovic
From: Yongbok Kim Provide R/W access to SAARI and SAAR CP0 registers. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/cpu.h | 1 + target/mips/helper.h| 6 + target/mips/internal.h | 1 + target/mips/op_helper.c | 50

[Qemu-devel] [PATCH 8/8] target/mips: Update ITU to handle bus errors

2019-01-03 Thread Aleksandar Markovic
From: Yongbok Kim Update ITU to handle bus errors. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- hw/misc/mips_itu.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index 5c49bdd..e8860dc 100644 ---

[Qemu-devel] [PATCH 6/8] target/mips: Add field and R/W access to ITU control register ICR0

2019-01-03 Thread Aleksandar Markovic
From: Yongbok Kim Add field and R/W access to ITU control register ICR0. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- hw/misc/mips_itu.c | 22 +- include/hw/misc/mips_itu.h | 4 2 files changed, 25 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH v3 1/6] smbus: Add a helper to generate SPD EEPROM data

2019-01-03 Thread BALATON Zoltan
There are several boards with SPD EEPROMs that are now using duplicated or slightly different hard coded data. Add a helper to generate SPD data for a memory module of given type and size that could be used by these boards (either as is or with further changes if needed) which should help cleaning

Re: [Qemu-devel] [PATCH v3] Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel.

2019-01-03 Thread Nick Hudson
On 03/01/2019 16:20, Peter Maydell wrote: > On Tue, 11 Dec 2018 at 12:27, Nick Hudson wrote: >> >> >> noload kernels are loaded with the u-boot image header and as a result >> the header size needs adding to the entry point. Fake up a hdr so the >> kernel image is loaded at the right address

[Qemu-devel] [PULL v3 07/44] target/mips: MXU: Add generic naming for optn2 constants

2019-01-03 Thread Aleksandar Markovic
From: Aleksandar Markovic Add generic naming involving generig suffixes OPTN0, OPTN1, OPTN2, OPTN3 for four optn2 constants. Existing suffixes WW, LW, HW, XW are not quite appropriate for some instructions using optn2. Reviewed-by: Stefan Markovic Signed-off-by: Aleksandar Markovic ---

[Qemu-devel] [PULL v3 06/44] target/mips: MXU: Add missing opcodes/decoding for LX* instructions

2019-01-03 Thread Aleksandar Markovic
From: Aleksandar Markovic Add missing opcodes and decoding engine for LXB, LXH, LXW, LXBU, and LXHU instructions. They were for some reason forgotten in previous commits. The MXU opcode list and decoding engine should be now complete. Reviewed-by: Stefan Markovic Signed-off-by: Aleksandar

[Qemu-devel] [PULL v3 08/44] target/mips: MXU: Improve the comment containing MXU overview

2019-01-03 Thread Aleksandar Markovic
From: Aleksandar Markovic Improve textual description of MXU extension. These are mostly comment formatting changes. Reviewed-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 74 + 1 file changed, 44

[Qemu-devel] [PULL v3 09/44] target/mips: MXU: Add handlers for logic instructions

2019-01-03 Thread Aleksandar Markovic
From: Aleksandar Markovic Add translation handlers for four logic MXU instructions. It should be noted that there is an error in MXU documentation (dated June 2017) regarding opcodes for this group of instructions. This was confirmed by running tests on hardware, and also by looking up other

[Qemu-devel] [PULL v3 42/44] tests/tcg: mips: Test R5900 three-operand MADD1

2019-01-03 Thread Aleksandar Markovic
From: Fredrik Noring Test R5900 three-operand MADD1. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Fredrik Noring --- tests/tcg/mips/mipsr5900/madd.c | 43 - 1 file changed, 38 insertions(+), 5 deletions(-) diff

Re: [Qemu-devel] [PATCH v3 for-4.0 2/7] vhost-user: Support providing shared memory to backend

2019-01-03 Thread Michael S. Tsirkin
On Thu, Jan 03, 2019 at 06:18:14PM +0800, elohi...@gmail.com wrote: > From: Xie Yongji > > This patch introduces two new messages VHOST_USER_GET_SHM_SIZE > and VHOST_USER_SET_SHM_FD to support providing shared > memory to backend. > > Firstly, qemu uses VHOST_USER_GET_SHM_SIZE to get the >

[Qemu-devel] [PULL v3 14/44] disas: nanoMIPS: Fix types and format strings

2019-01-03 Thread Aleksandar Markovic
From: Stefan Weil Use POSIX types and format strings. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Weil --- disas/nanomips.cpp | 20 disas/nanomips.h | 10 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff

[Qemu-devel] [PATCH] docker: Use stable git tag for virglrenderer

2019-01-03 Thread Philippe Mathieu-Daudé
Use a stable tag instead of some random commit from mainstream development, to avoid unexpected build failures. This fixes: CC virglrenderer.lo virglrenderer.c: In function 'virgl_has_gl_colorspace': virglrenderer.c:208:11: error: implicit declaration of function

[Qemu-devel] [PULL v3 37/44] disas: nanoMIPS: Rename the decoder of 'gpr1' gpr encoding type

2019-01-03 Thread Aleksandar Markovic
From: Aleksandar Markovic Rename the decoder of 'gpr1' gpr encoding type in nanoMIPS disassembler. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic --- disas/nanomips.cpp | 4 ++-- disas/nanomips.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

  1   2   3   >