Re: [Qemu-devel] [PATCH] usb: dev-mtp: fix memory leak in error path

2019-01-03 Thread Philippe Mathieu-Daudé
On 1/3/19 2:26 PM, Li Qiang wrote: > Spotted by Coverity: CID 1397074 > Gerd, if you take this, can you add: Fixes: c52d46e041b > Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daudé > --- > hw/usb/dev-mtp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/usb/dev-mtp.c

Re: [Qemu-devel] [PATCH] target/arm: SVE brk[ab] merging does not have s bit

2019-01-03 Thread Peter Maydell
On Wed, 26 Dec 2018 at 21:50, Richard Henderson wrote: > > While brk[ab] zeroing has a flags setting option, the merging variant > does not. Retain the same argument structure, to share expansion but > force the flag zero and do not decode bit 22. > > Reported-by: Laurent Desnogues > Signed-off-

[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 usb_mtp_object

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’: > target/mips/translate.c:25092

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

2019-01-03 Thread Fei Li
在 2019/1/3 下午7:25, 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 cleare

[Qemu-devel] [PATCH] usb: dev-mtp: fix memory leak in error path

2019-01-03 Thread Li Qiang
Spotted by Coverity: CID 1397074 Signed-off-by: Li Qiang --- hw/usb/dev-mtp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 6098005cd4..b19b576278 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -1729,6 +1729,7 @@ static void usb_mtp_write_

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

2019-01-03 Thread Peter Maydell
On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic wrote: > > From: Aleksandar Markovic > > 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 av

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 > place

[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 +- 1

[Qemu-devel] [PATCH v4 0/2] virtio-net: support RSC v4/v6 tcp traffic for Windows HCK

2019-01-03 Thread Yuri Benditovich
Changes in v1: * Changes in standard header moved to virtio_net.c * added inline procedures for header fields access * Removed unused define * Removed unrelated changes * Renamed RSC timeout define * Removed unnecessary check for VHOST * RSC struct names prefixed by Virtio * Added note about migrat

[Qemu-devel] [PATCH v4 2/2] virtio-net: changed VIRTIO_NET_F_RSC_EXT to be 61

2019-01-03 Thread Yuri Benditovich
Allocated feature bit changed in spec draft per TC request. Signed-off-by: Yuri Benditovich --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 5a3952f84b..2db80e1f71 100644 --- a/hw/net/virtio-net.c +++ b/hw

[Qemu-devel] [PATCH v4 1/2] virtio-net: support RSC v4/v6 tcp traffic for Windows HCK

2019-01-03 Thread Yuri Benditovich
This commit adds implementation of RX packets coalescing, compatible with requirements of Windows Hardware compatibility kit. The device enables feature VIRTIO_NET_F_RSC_EXT in host features if it supports extended RSC functionality as defined in the specification. This feature requires at least o

Re: [Qemu-devel] [PATCH] microbit: make -kernel optional

2019-01-03 Thread Peter Maydell
On Fri, 14 Dec 2018 at 14:51, Stefan Hajnoczi wrote: > > ARMv7M machine types support -kernel for ELF and raw image files. > Microbit programs are typically in Intel HEX (.hex) format. The generic > loader supports .hex files but it doesn't work as expected: > > $ qemu-system-arm -M microbit -d

[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 +++ b/hw/rdma/vmw/pvrdma_

[Qemu-devel] [Bug 1714750] Re: 2.10.0 cannot be installed on case-insensitive file system

2019-01-03 Thread Peter Maydell
Somebody re-reported this which reminded me that we forgot to tidy up the loose ends here. Current status: * this is fixed in upstream u-boot with their commit 610eec7f0593574 (committed October 2017, and in u-boot release v2017.11 and later) * in QEMU's release process we put in a workaround i

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

2019-01-03 Thread Fei Li
在 2019/1/3 下午8:35, Dr. David Alan Gilbert 写道: * Fei Li (f...@suse.com) wrote: Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error

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

2019-01-03 Thread Peter Maydell
*** This bug is a duplicate of bug 1714750 *** https://bugs.launchpad.net/bugs/1714750 I look in my crystal ball and deduce that you're doing this on a filesystem which isn't case-sensitive. This is bug #1714750, and it's really an issue with the u-boot code that we ship a copy of. You can wor

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

2019-01-03 Thread Dr. David Alan Gilbert
* Fei Li (f...@suse.com) wrote: > Update qemu_thread_create()'s callers by > - setting an error on qemu_thread_create() failure for callers that > set an error on failure; > - reporting the error and returning failure for callers that return > an error code on failure; > - reporting the error a

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

2019-01-03 Thread Mark Cave-Ayland
On 03/01/2019 09:37, P J P wrote: > 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/spar

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. >>> >>

[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-2.10.0/roms/u-boot/scripts/

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 at:

[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 ty

[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 i

[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 Re

[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 a/b

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

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 han

[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 a/tests/pnv-xscom-test.c

[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 t

[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 a/tests/

[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 de

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

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 (lo

[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 snapshot

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 > >>

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. > > > > >

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 > --- > include

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 impl

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 +++

[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 Sign

[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 a/contrib

[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. Signed-

[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 inse

[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 de

[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 b

[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 introduc

[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] [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 +- hw/s390x/s3

[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

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" i

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 tests/qemu-iote

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. This

[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 EPY

[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 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 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

[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 f76b19e4e9..cbdb2b

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 ] && pad=

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 ju

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 + >

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 sh

[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 === > > Check

[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: Ste

[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 +++ hw/timer/nrf51_tim

[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 a/i

[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 insertions

[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 a/tests/microbit-test.

[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 inse

[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 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 --- tests/Makefi

[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, this

[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. Fu

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 /* o

[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 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 warni

[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 sour

[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 warni

[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 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 fal

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: inclu

<    1   2   3