Re: [Qemu-devel] [PATCH 13/34] target/ppc: introduce get_cpu_vsr{l, h}() and set_cpu_vsr{l, h}() helpers for VSR register access

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:50PM -0800, Richard Henderson wrote: > From: Mark Cave-Ayland > > These helpers allow us to move VSR register values to/from the specified > TCGv_i64 > argument. > > To prevent VSX helpers accessing the cpu_vsr array directly, add extra TCG > temporaries as

Re: [Qemu-devel] [PATCH 17/34] target/ppc: convert VMX logical instructions to use vector operations

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:54PM -0800, Richard Henderson wrote: > From: Mark Cave-Ayland > > Signed-off-by: Mark Cave-Ayland > Reviewed-by: Richard Henderson Acked-by: David Gibson > Message-Id: <20181217122405.18732-9-mark.cave-ayl...@ilande.co.uk> > --- > target/ppc/translate.c

Re: [Qemu-devel] [PATCH 22/34] target/ppc: convert VSX logical operations to vector operations

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:59PM -0800, Richard Henderson wrote: > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/translate/vsx-impl.inc.c | 43 - > 1 file changed, 17 insertions(+), 26 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH 26/34] target/ppc: Pass integer to helper_mtvscr

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:39:03PM -0800, Richard Henderson wrote: > We can re-use this helper elsewhere if we're not passing > in an entire vector register. > > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/helper.h | 2 +- >

Re: [Qemu-devel] [PATCH v3 5/5] keymap: consider modifier state when picking a mapping

2018-12-18 Thread Gerd Hoffmann
Hi, > After this patch the two sequences now show: > > 19237@1545158356.679095:vnc_key_event_map down 1, sym 0xffe1 -> keycode > 0x2a [shift] > 19237@1545158356.896528:vnc_key_event_map down 1, sym 0x3c -> keycode 0x33 > [comma] > 19237@1545158356.993672:vnc_key_event_map down 0, sym

Re: [Qemu-devel] [PATCH 18/34] target/ppc: convert vaddu[b, h, w, d] and vsubu[b, h, w, d] over to use vector operations

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:55PM -0800, Richard Henderson wrote: > From: Mark Cave-Ayland > > Signed-off-by: Mark Cave-Ayland > Reviewed-by: Richard Henderson Acked-by: David Gibson > Message-Id: <20181217122405.18732-10-mark.cave-ayl...@ilande.co.uk> > --- > target/ppc/helper.h

Re: [Qemu-devel] [PATCH 27/34] target/ppc: Use helper_mtvscr for reset and gdb

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:39:04PM -0800, Richard Henderson wrote: > Not setting flush_to_zero from gdb_set_avr_reg was a bug. > > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/translate_init.inc.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > >

Re: [Qemu-devel] [PATCH 15/34] target/ppc: merge ppc_vsr_t and ppc_avr_t union types

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:52PM -0800, Richard Henderson wrote: > From: Mark Cave-Ayland > > Since the VSX registers are actually a superset of the VMX registers then they > can be represented by the same type. Merge ppc_avr_t into ppc_vsr_t and change > ppc_avr_t to be a simple typedef

Re: [Qemu-devel] [PATCH 19/34] target/ppc: convert vspltis[bhw] to use vector operations

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:56PM -0800, Richard Henderson wrote: > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/helper.h | 3 --- > target/ppc/int_helper.c | 15 > target/ppc/translate/vmx-impl.inc.c | 36

Re: [Qemu-devel] [PATCH 28/34] target/ppc: Remove vscr_nj and vscr_sat

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:39:05PM -0800, Richard Henderson wrote: > These macros are no longer used. > > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/cpu.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h > index

Re: [Qemu-devel] [PATCH 25/34] target/ppc: convert xxsel to vector operations

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:39:02PM -0800, Richard Henderson wrote: > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/translate/vsx-impl.inc.c | 55 ++--- > 1 file changed, 27 insertions(+), 28 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH 12/34] target/ppc: introduce get_avr64() and set_avr64() helpers for VMX register access

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:49PM -0800, Richard Henderson wrote: > From: Mark Cave-Ayland > > These helpers allow us to move AVR register values to/from the specified > TCGv_i64 > argument. > > To prevent VMX helpers accessing the cpu_avr{l,h} arrays directly, add extra > TCG > temporaries

Re: [Qemu-devel] [PATCH 14/34] target/ppc: switch FPR, VMX and VSX helpers to access data directly from cpu_env

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:51PM -0800, Richard Henderson wrote: > From: Mark Cave-Ayland > > Instead of accessing the FPR, VMX and VSX registers through static arrays of > TCGv_i64 globals, remove them and change the helpers to load/store data > directly > within cpu_env. > > Signed-off-by:

Re: [Qemu-devel] [PATCH 24/34] target/ppc: convert xxspltw to vector operations

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:39:01PM -0800, Richard Henderson wrote: > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/translate/vsx-impl.inc.c | 36 + > 1 file changed, 11 insertions(+), 25 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH 10/10] display: add -display app launching external application

2018-12-18 Thread Marc-André Lureau
On Wed, Dec 19, 2018 at 11:13 AM Gerd Hoffmann wrote: > > Hi, > > > > Also: remote-viewer accepts config files. I'd suggest to write one, so > > > it is easy to restart remote-viewer. Also I would not use a temp dir > > > > Where should it be written? > >

Re: [Qemu-devel] [PATCH 1/3] ui: install logo icons to $prefix/share/icons

2018-12-18 Thread Gerd Hoffmann
On Tue, Dec 18, 2018 at 02:26:27PM +, Daniel P. Berrangé wrote: > QEMU currently installs loogs to $prefix/share/qemu/ which means no GUI > toolkit or applications can find them by default. > > The accepted standards for desktop applications declare that application > logos / icons should be

Re: [Qemu-devel] [PATCH 10/10] display: add -display app launching external application

2018-12-18 Thread Gerd Hoffmann
Hi, > > Also: remote-viewer accepts config files. I'd suggest to write one, so > > it is easy to restart remote-viewer. Also I would not use a temp dir > > Where should it be written? /run/user/$uid/qemu/$vmname/remote-viewer.vv ? > What should be the content of > the .vv file?

Re: [Qemu-devel] [RFC PATCH v2 02/15] qapi: Eliminate indirection through qmp_event_get_func_emit()

2018-12-18 Thread Markus Armbruster
Eric Blake writes: > On 12/18/18 12:22 PM, Markus Armbruster wrote: >> The qapi_event_send_FOO() functions emit events like this: >> >> QMPEventFuncEmit emit; >> >> emit = qmp_event_get_func_emit(); >> if (!emit) { >> return; >> } >> > >> emit(QAPI_EVENT_FOO,

[Qemu-devel] [PATCH v1] migration: add incremental mode on drive-mirror

2018-12-18 Thread mahaocong
From: mahaocong Signed-off-by: mahaocong --- block/dirty-bitmap.c | 14 ++ block/mirror.c | 63 +++- blockdev.c | 36 +++-- include/block/block_int.h| 3 ++-

[Qemu-devel] [PATCH v1] migration: add incremental mode on drive-mirror

2018-12-18 Thread mahaocong
From: mahaocong Hi all, This patch adds possibility to start mirroring with specific dirty-bitmap. The use-case is, for live migration with ceph rbd image. 1.create rbd image in ceph cluster, and map nbd device with rbd image. 2.create a new bitmap attached to drive. 3.create a full backup on

Re: [Qemu-devel] [PATCH] ppc/xive: introduce helpers to access the XIVE structures

2018-12-18 Thread Cédric Le Goater
On 12/19/18 5:53 AM, David Gibson wrote: > On Tue, Dec 18, 2018 at 10:38:03PM +0100, Cédric Le Goater wrote: >> The XIVE internal structures (EAS, END, NVT) are architected to be Big >> Endian. The XIVE models, today, access the different fields of these >> structures using wrappers around the

[Qemu-devel] [Bug 1809075] Re: Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel

2018-12-18 Thread Gao
### Reproduce steps Add `fprintf(stderr, "ps2_queue 0x%x\n", b);` to `hw/input/ps2.c` and re-build qemu. - qemu-system-x86_64 -hda --enable-kvm -m <> -display vnc=:1 - vncviewer -Shared :5901 In guest os, find the keyboard device(very likely to be /dev/input/event0) ``` sudo evtest

Re: [Qemu-devel] [PATCH v3 1/2] intel-iommu: differentiate host address width from IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 10:12:45PM -0500, Michael S. Tsirkin wrote: > On Wed, Dec 19, 2018 at 11:03:58AM +0800, Yu Zhang wrote: > > On Tue, Dec 18, 2018 at 09:58:35AM -0500, Michael S. Tsirkin wrote: > > > On Tue, Dec 18, 2018 at 03:55:36PM +0100, Igor Mammedov wrote: > > > > On Tue, 18 Dec 2018

Re: [Qemu-devel] [QEMU PATCH] hw/misc/ivshmem: Remove deprecated "ivshmem" legacy device

2018-12-18 Thread Markus Armbruster
Thomas Huth writes: > On 2018-12-18 18:50, Markus Armbruster wrote: >> Thomas Huth writes: >> >>> It's been marked as deprecated in QEMU v2.6.0 already, so really nobody >>> should use the legacy "ivshmem" device anymore (but use ivshmem-plain or >>> ivshmem-doorbell instead). Time to remove

[Qemu-devel] [Bug 1809075] [NEW] Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel

2018-12-18 Thread Gao
Public bug reported: Whenever capslock is pressed on host, both capslock keycode(0x3a 0xba) and capslock LED keycode(0xfa 0xfa) would be sent to the ps2 keycode stream. However, capslock LED is handled by another thread, confirmed by tracing `ps2_write_keyboard` with gdb. The keycode of casplock

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 11:35:34PM -0500, Michael S. Tsirkin wrote: > On Wed, Dec 19, 2018 at 11:40:06AM +0800, Yu Zhang wrote: > > On Tue, Dec 18, 2018 at 09:49:02AM -0500, Michael S. Tsirkin wrote: > > > On Tue, Dec 18, 2018 at 09:45:41PM +0800, Yu Zhang wrote: > > > > On Tue, Dec 18, 2018 at

Re: [Qemu-devel] [PATCH 03/34] tcg: Add gvec expanders for nand, nor, eqv

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:40PM -0800, Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: David Gibson > --- > accel/tcg/tcg-runtime.h | 3 +++ > tcg/tcg-op-gvec.h| 6 + > tcg/tcg-op.h | 3 +++ > accel/tcg/tcg-runtime-gvec.c |

Re: [Qemu-devel] [PATCH] ppc/xive: introduce helpers to access the XIVE structures

2018-12-18 Thread David Gibson
On Tue, Dec 18, 2018 at 10:38:03PM +0100, Cédric Le Goater wrote: > The XIVE internal structures (EAS, END, NVT) are architected to be Big > Endian. The XIVE models, today, access the different fields of these > structures using wrappers around the GETFIELD/SETFIELD macros. The > definitions of

Re: [Qemu-devel] [PATCH 01/34] tcg: Add logical simplifications during gvec expand

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:38PM -0800, Richard Henderson wrote: > We handle many of these during integer expansion, and the > rest of them during integer optimization. > > Signed-off-by: Richard Henderson Reviewed-by: David Gibson > --- > tcg/tcg-op-gvec.c | 35

Re: [Qemu-devel] [PATCH 02/34] target/arm: Rely on optimization within tcg_gen_gvec_or

2018-12-18 Thread David Gibson
On Mon, Dec 17, 2018 at 10:38:39PM -0800, Richard Henderson wrote: > Since we're now handling a == b generically, we no longer need > to do it by hand within target/arm/. > > Signed-off-by: Richard Henderson Reviewed-by: David Gibson > --- > target/arm/translate-a64.c | 6 +- >

Re: [Qemu-devel] [PATCH 5/5] intel_iommu: turn on IR by default

2018-12-18 Thread Peter Xu
On Tue, Dec 18, 2018 at 01:30:23PM +0100, Paolo Bonzini wrote: > On 18/12/18 04:07, Peter Xu wrote: > > On Mon, Dec 17, 2018 at 03:31:14PM +0800, Peter Xu wrote: > >> IR has been there for a long time and long time no bug reported. > >> Let's turn it on by default to match general hardwares.

Re: [Qemu-devel] [QEMU PATCH] hw/misc/ivshmem: Remove deprecated "ivshmem" legacy device

2018-12-18 Thread Thomas Huth
On 2018-12-18 18:50, Markus Armbruster wrote: > Thomas Huth writes: > >> It's been marked as deprecated in QEMU v2.6.0 already, so really nobody >> should use the legacy "ivshmem" device anymore (but use ivshmem-plain or >> ivshmem-doorbell instead). Time to remove the deprecated device now. >>

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Michael S. Tsirkin
On Wed, Dec 19, 2018 at 11:40:06AM +0800, Yu Zhang wrote: > On Tue, Dec 18, 2018 at 09:49:02AM -0500, Michael S. Tsirkin wrote: > > On Tue, Dec 18, 2018 at 09:45:41PM +0800, Yu Zhang wrote: > > > On Tue, Dec 18, 2018 at 07:43:28AM -0500, Michael S. Tsirkin wrote: > > > > On Tue, Dec 18, 2018 at

[Qemu-devel] [PATCH v5 2/8] linux-user: Split out some simple file syscalls

2018-12-18 Thread Richard Henderson
This includes close, open, openat, read, readlink, readlinkat, write. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 31 +++ linux-user/syscall-file.inc.c | 433 ++ linux-user/syscall.c | 376 + 3 files

[Qemu-devel] [PATCH v5 3/8] linux-user: Reduce regpairs_aligned & target_offset64 ifdefs

2018-12-18 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall.c | 54 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7118f07441..d4c11c3e93 100644 --- a/linux-user/syscall.c +++

[Qemu-devel] [PATCH v5 4/8] linux-user: Split out preadv, pwritev, readv, writev, pread64, pwrite64

2018-12-18 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 14 linux-user/syscall-file.inc.c | 124 ++ linux-user/syscall.c | 93 - linux-user/strace.list| 18 - 4 files changed, 138 insertions(+), 111

[Qemu-devel] [PATCH v5 6/8] linux-user: Split out ipc syscalls

2018-12-18 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 38 ++ linux-user/strace.c | 83 --- linux-user/syscall-ipc.inc.c | 1086 ++ linux-user/syscall.c | 972 +- linux-user/strace.list | 42 --

[Qemu-devel] [PATCH v5 8/8] linux-user: Split out some process syscalls

2018-12-18 Thread Richard Henderson
This includes clone, getgroups, gettid, setfsgid, setfsuid, setgroups, setsid, setuid, fork, getegid, getegid32, geteuid, geteuid32, getgid, getgid32, getgroups32, getpgrp, getpid, getppid, getresgid, getresgid32, getresuid, getresuid32, getuid, getuid32, getxgid, getxpid, getxuid, setfsgid32,

[Qemu-devel] [PATCH v5 0/8] linux-user: Split do_syscall

2018-12-18 Thread Richard Henderson
Version 4 was back in August: https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg03745.html Version 5 continues the file split via inclusion. This incorporates Laurent's suggestion to have a "def" file that is included twice to generate both SyscallDef structures and fill in

[Qemu-devel] [PATCH v5 5/8] linux-user: Split out name_to_handle_at, open_by_handle_at

2018-12-18 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 3 + linux-user/syscall.h | 1 + linux-user/strace.c | 5 +- linux-user/syscall-file.inc.c | 81 +++ linux-user/syscall.c | 102 ++

[Qemu-devel] [PATCH v5 7/8] linux-user: Split out memory syscalls

2018-12-18 Thread Richard Henderson
This includes mmap, mmap2, munmap, mlock, mlockall, munlock, munlockall, mprotect, mremap, msync. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 24 ++ linux-user/syscall.h | 2 + linux-user/strace.c | 55 ++--- linux-user/syscall-mem.inc.c

[Qemu-devel] [PATCH v5 1/8] linux-user: Setup split syscall infrastructure

2018-12-18 Thread Richard Henderson
Defines a unified structure for implementation and strace. Signed-off-by: Richard Henderson --- linux-user/syscall.h | 89 ++ linux-user/strace.c | 388 +++ linux-user/syscall.c | 107 +++- 3 files changed, 471 insertions(+), 113

Re: [Qemu-devel] [PATCH qemu v3] ppc/spapr: Receive and store device tree blob from SLOF

2018-12-18 Thread Alexey Kardashevskiy
On 18/12/2018 20:40, Greg Kurz wrote: > On Tue, 18 Dec 2018 18:54:33 +1100 > Alexey Kardashevskiy wrote: > >> On 18/12/2018 15:30, Alexey Kardashevskiy wrote: >>> >>> >>> On 18/12/2018 14:49, David Gibson wrote: On Tue, Dec 18, 2018 at 02:04:54PM +1100, Alexey Kardashevskiy wrote:

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 09:49:02AM -0500, Michael S. Tsirkin wrote: > On Tue, Dec 18, 2018 at 09:45:41PM +0800, Yu Zhang wrote: > > On Tue, Dec 18, 2018 at 07:43:28AM -0500, Michael S. Tsirkin wrote: > > > On Tue, Dec 18, 2018 at 06:01:16PM +0800, Yu Zhang wrote: > > > > On Tue, Dec 18, 2018 at

Re: [Qemu-devel] [PATCH v3 1/2] intel-iommu: differentiate host address width from IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 09:58:35AM -0500, Michael S. Tsirkin wrote: > On Tue, Dec 18, 2018 at 03:55:36PM +0100, Igor Mammedov wrote: > > On Tue, 18 Dec 2018 17:27:23 +0800 > > Yu Zhang wrote: > > > > > On Mon, Dec 17, 2018 at 02:17:40PM +0100, Igor Mammedov wrote: > > > > On Wed, 12 Dec 2018

Re: [Qemu-devel] [PATCH v3 1/2] intel-iommu: differentiate host address width from IOVA address width.

2018-12-18 Thread Michael S. Tsirkin
On Wed, Dec 19, 2018 at 11:03:58AM +0800, Yu Zhang wrote: > On Tue, Dec 18, 2018 at 09:58:35AM -0500, Michael S. Tsirkin wrote: > > On Tue, Dec 18, 2018 at 03:55:36PM +0100, Igor Mammedov wrote: > > > On Tue, 18 Dec 2018 17:27:23 +0800 > > > Yu Zhang wrote: > > > > > > > On Mon, Dec 17, 2018 at

Re: [Qemu-devel] [PATCH v3 1/2] intel-iommu: differentiate host address width from IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 03:55:36PM +0100, Igor Mammedov wrote: > On Tue, 18 Dec 2018 17:27:23 +0800 > Yu Zhang wrote: > > > On Mon, Dec 17, 2018 at 02:17:40PM +0100, Igor Mammedov wrote: > > > On Wed, 12 Dec 2018 21:05:38 +0800 > > > Yu Zhang wrote: > > > > > > > Currently, vIOMMU is using the

Re: [Qemu-devel] [PATCH 3/5] Add migration functions for VFIO devices

2018-12-18 Thread Zhao Yan
right, a capabilities field in struct vfio_device_migration_info can avoid populating iteration APIs and migration states into every vendor drivers who actually may not requires those APIs and simply do nothing or return value 0 in response to those APIs. struct vfio_device_migration_info {

[Qemu-devel] About live migration rollback

2018-12-18 Thread Gonglei (Arei)
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 should consider rolling back for this situation. Environments information: host A: cpu E5620(model WestmereEP without flag xsave) host B: cpu

[Qemu-devel] [PATCH v4 3/5] iotests: change qmp_log filters to expect QMP objects only

2018-12-18 Thread John Snow
log() treats filters as if they can always filter its primary argument. qmp_log treats filters as if they're always text. Change qmp_log to treat filters as if they're always qmp object filters, then change the logging call to rely on log()'s ability to serialize QMP objects, so we're not

[Qemu-devel] [PATCH v4 2/5] iotests: remove default filters from qmp_log

2018-12-18 Thread John Snow
Only test 206 uses it, so remove it. --- tests/qemu-iotests/206| 8 ++-- tests/qemu-iotests/iotests.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/206 b/tests/qemu-iotests/206 index 128c334c7c..e92550fa59 100755 ---

[Qemu-devel] [PATCH v4 5/5] iotests: add iotest 236 for testing bitmap merge

2018-12-18 Thread John Snow
New interface, new smoke test. --- tests/qemu-iotests/236 | 131 tests/qemu-iotests/236.out | 198 + tests/qemu-iotests/group | 1 + 3 files changed, 330 insertions(+) create mode 100755 tests/qemu-iotests/236 create mode

[Qemu-devel] [PATCH v4 4/5] iotests: implement pretty-print for log and qmp_log

2018-12-18 Thread John Snow
If iotests have lines exceeding >998 characters long, git doesn't want to send it plaintext to the list. We can solve this by allowing the iotests to use pretty printed QMP output that we can match against instead. As a bonus, it's much nicer for human eyes too. --- tests/qemu-iotests/iotests.py

[Qemu-devel] [PATCH v4 0/5] bitmaps: remove x- prefix from QMP api Part2

2018-12-18 Thread John Snow
Add testing to test the bitmap-merge API. V4: - Removed patches 1-5 which have been staged - Rewrite qmp_log entirely, split into three patches - Pretty-printing has been extended to log() as well as qmp_log() - Adjust iotest 236 to be format generic instead of qcow2 [Vladimir] - Adjust

[Qemu-devel] [PATCH v4 1/5] iotests: add qmp recursive sorting function

2018-12-18 Thread John Snow
Python before 3.6 does not sort kwargs by default. If we want to print out pretty-printed QMP objects while preserving the "exec" > "arguments" ordering, we need a custom sort. We can accomplish this by sorting **kwargs into an OrderedDict, which does preserve addition order. ---

Re: [Qemu-devel] [PATCH for-3.2 01/11] vhost-user: define conventions for vhost-user backends

2018-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2018 at 10:35:05PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Dec 11, 2018 at 10:56 PM Michael S. Tsirkin wrote: > > > > On Tue, Dec 11, 2018 at 09:29:44AM +, Daniel P. Berrangé wrote: > > > On Tue, Dec 11, 2018 at 08:42:41AM +0100, Hoffmann, Gerd wrote: > > > > Hi, >

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

2018-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2018 at 06:51:22PM +0100, Philippe Mathieu-Daudé wrote: > GCC 8 introduced the -Wstringop-overflow, which detect buffer overflow > by string-modifying functions declared in , such strncpy(), > used in global_state_store_running(). > > Since the global_state.runstate does not

[Qemu-devel] [PULL 60/64] slirp: add clock_get_ns() callback

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- net/slirp.c | 6 ++ slirp/if.c | 2 +- slirp/ip6_icmp.c | 4 ++-- slirp/libslirp.h | 2 ++ slirp/slirp.c| 12 +--- 5 files changed, 16 insertions(+), 10 deletions(-)

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

2018-12-18 Thread mst
On Tue, Dec 18, 2018 at 06:51:17PM +0100, Philippe Mathieu-Daudé wrote: > 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 > > Various intents has been sent

[Qemu-devel] [PULL 55/64] slirp: introduce SLIRP_DEBUG environment variable

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Learn to read SLIRP_DEBUG=call,misc,error (all or help also handled) to set the slirp_debug flags. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/misc.c | 8 slirp/slirp.c | 15 +++ 2 files changed, 15 insertions(+), 8

[Qemu-devel] [PULL 52/64] slirp: replace a DEBUG block with WITH_ICMP_ERROR_MSG

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau icmp_send_error() doesnt actually log messages when DEBUG is enabled. Let's use a different define that describes better the tweaked behaviour of the function, and avoid uncompiled code. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault ---

[Qemu-devel] [PULL 58/64] slirp: replace DEBUG_ARGS with DEBUG_ARG

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau There is no clear benefit in calling an alias DEBUG_ARGS(). Replace calls with DEBUG_ARG(), and fix the white-spacing while at it. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/arp_table.c | 12 ++-- slirp/debug.h | 2 --

[Qemu-devel] [PULL 49/64] slirp: use virtual time for packet expiration

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Make all packets expiration time based on virtual clock. Suggested-by: Paolo Bonzini Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/if.c| 2 +- slirp/slirp.c | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PULL 51/64] slirp: replace some fprintf() with DEBUG_MISC

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Remove some clutter, and avoids direct call to fprintf(). Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/slirp.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index

[Qemu-devel] [PULL 64/64] slirp: Mark debugging calls as unlikely

2018-12-18 Thread Samuel Thibault
to get them out of the hot path. Signed-off-by: Samuel Thibault Reviewed-by: Marc-André Lureau --- slirp/debug.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slirp/debug.h b/slirp/debug.h index 25a5d59439..269d97d807 100644 --- a/slirp/debug.h +++ b/slirp/debug.h

[Qemu-devel] [PULL 44/64] slirp: simplify fork_exec()

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Use g_spawn_async_with_fds() to setup the child. GSpawn handles reaping the child, and closing parent file descriptors. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/misc.c | 75 +--- 1 file

[Qemu-devel] [PULL 47/64] slirp: drop

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Since commit 12f8def0e02232d7c6416ad9b66640f973c531d1 (v2.9), qemu requires Vista. Let's remove some conditional code. Note that this introduces a missing declaration warning with mingw. warning: implicit declaration of function 'inet_ntop' See also:

Re: [Qemu-devel] [PATCH v13 0/6] Add support for TPM Physical Presence interface

2018-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2018 at 09:56:35PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Dec 18, 2018 at 6:20 PM Michael S. Tsirkin wrote: > > > > On Tue, Dec 18, 2018 at 01:28:53PM +0400, Marc-André Lureau wrote: > > > Hi Michael, > > > > > > On Tue, Dec 18, 2018 at 5:42 AM Michael S. Tsirkin > >

[Qemu-devel] [PULL 48/64] slirp: rename exec_list

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau This list is not only used to handle command to execute on guest connection, it can also redirect to an arbitrary object, such as a chardev. Let's rename the struct and the field to "guestfwd". Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault ---

[Qemu-devel] [PULL 61/64] build-sys: use a seperate slirp-obj-y && slirp.mo

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau This will allow to have cflags for the whole slirp.mo -objs. It makes it possible to build tests that links only with slirp-obj-y (and not the whole common-obj). It is also a step towards building slirp as a shared library, although this requires a bit more thoughts to

[Qemu-devel] [PULL 59/64] slirp: factor out guestfwd addition checks

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau This will allow reusing the function in a following patch. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/misc.c | 7 --- slirp/slirp.c | 23 +-- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PULL 45/64] slirp: replace error_report() with g_critical()

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Reduce dependency on QEMU. QEMU could use a custom log handler if it wants to redirect/filter it. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slirp/misc.c

[Qemu-devel] [PULL 63/64] slirp: call into g_debug() for DEBUG macros

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Make slirp use GLib logging, instead of fprintf(), so that applications can filter log, process it etc. With recent versions of glib, G_MESSAGES_DEBUG must be set to "all" or "Slirp" to see slirp debug messages. Reformat DEBUG_MISC & DEBUG_ERROR calls to not need \n

[Qemu-devel] [PULL 41/64] slirp: replace ARRAY_SIZE with G_N_ELEMENTS

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Do not require QEMU macro. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/ncsi.c | 2 +- slirp/tftp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PULL 56/64] slirp: use %p for pointers format

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau This fixes some compilation warnings on mingw64. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/ip6_icmp.c | 2 +- slirp/ip6_input.c | 2 +- slirp/ip6_output.c | 4 ++-- slirp/udp6.c | 6 +++--- 4 files changed, 7 insertions(+), 7

[Qemu-devel] [PULL 50/64] slirp: replace a fprintf with g_critical()

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Reduce dependency on QEMU. QEMU could use a custom glib log handler if it wants to redirect/filter it. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slirp/socket.c

[Qemu-devel] [PULL 54/64] slirp: always build with debug statements

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Make debug statements condiitonal only on slirp_debug flags, instead of the pre-processor DEBUG blocks, as it may introduce breakage easily, since the debug code isn't always compiled. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/debug.h |

[Qemu-devel] [PULL 38/64] slirp: remove unused sbflush()

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/sbuf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/slirp/sbuf.h b/slirp/sbuf.h index a722ecb629..644c201341 100644 --- a/slirp/sbuf.h +++ b/slirp/sbuf.h @@

[Qemu-devel] [PULL 31/64] slirp: replace SIZEOF_CHAR_P with glib equivalent

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Samuel Thibault --- slirp/ip.h | 2 +- slirp/slirp_config.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/slirp/ip.h b/slirp/ip.h index

[Qemu-devel] [PULL 57/64] slirp: remove remaining DEBUG blocks

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Instead, rely on slirp_debug flags, or compile unconditionally (the substraction in cksum is unlikely to affect any benchmark result). Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/cksum.c | 4 slirp/ip_icmp.c | 5 ++---

[Qemu-devel] [PULL 46/64] slirp: Enable fork_exec support on Windows

2018-12-18 Thread Samuel Thibault
g_spawn_async_with_fds is portable on Windows, so we can now enable fork_exec support there. Thanks Daniel P. Berrangé for the notice! Signed-off-by: Samuel Thibault Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- slirp/misc.c | 14 ++ 1 file changed, 2

[Qemu-devel] [PULL 62/64] slirp: set G_LOG_DOMAIN

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau We are moving to g_log() facilities to log errors and probably debug messages too. Let's have the "Slirp" prefix on messages slirp produces. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/Makefile.objs | 2 ++ 1 file changed, 2 insertions(+)

[Qemu-devel] [PULL 25/64] slirp: remove unused HAVE_SYS_SELECT_H

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/main.h | 4 slirp/slirp.h| 4 slirp/slirp_config.h | 6 -- 3 files changed, 14 deletions(-) diff --git a/slirp/main.h

[Qemu-devel] [PULL 37/64] slirp: remove #if notdef dead code

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/ip_input.c | 200 -- slirp/tcp_input.c | 39 - 2 files changed, 239 deletions(-) diff --git

[Qemu-devel] [PULL 15/64] slirp: use a callback structure to interface with qemu

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau This will bring slirp a bit forward to the state of an independent project. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Samuel Thibault --- net/slirp.c | 6 +- slirp/libslirp.h | 13 +++-- slirp/ncsi.c |

[Qemu-devel] [PULL 42/64] net: do not depend on slirp internals

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Only slirp/libslirp.h should be included. Instead of using some slirp declarations and utility functions directly, let's copy them in net/util.h. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by:

[Qemu-devel] [PULL 39/64] slirp: NULL is defined by stddef.h

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/slirp.h | 4 1 file changed, 4 deletions(-) diff --git a/slirp/slirp.h b/slirp/slirp.h index d1b6bcefbb..fdf397256b 100644 --- a/slirp/slirp.h +++

[Qemu-devel] [PULL 40/64] slirp: remove dead TCP_ACK_HACK code

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Untouched since original introduction in 2004. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/tcp_input.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git

[Qemu-devel] [PULL 36/64] slirp: add a callback to log guest errors

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- net/slirp.c | 7 +++ slirp/dhcpv6.c | 6 +++--- slirp/ip6_icmp.c | 7 +++ slirp/libslirp.h | 2 ++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/net/slirp.c

[Qemu-devel] [PULL 28/64] slirp: remove unused DECLARE_IOVEC

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau It's actually qemu configure CONFIG_IOVEC that is being used. slirp/ does not use it anyway Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/slirp_config.h | 6 -- 1 file changed, 6 deletions(-) diff

[Qemu-devel] [PULL 22/64] slirp: remove unused HAVE_SYS_STROPTS_H

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/slirp.h| 5 - slirp/slirp_config.h | 3 --- 2 files changed, 8 deletions(-) diff --git a/slirp/slirp.h b/slirp/slirp.h index fba77d0c3d..400f585cec

[Qemu-devel] [PULL 08/64] slirp: remove Monitor dependency, return a string for info

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau There is nothing performance-sensitive in returning an allocated string for info, and handling the monitor_printf() on the caller side. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- net/slirp.c | 7 --- slirp/libslirp.h | 2 +-

[Qemu-devel] [PULL 43/64] glib-compat: add g_spawn_async_with_fds() fallback

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- include/glib-compat.h | 56 +++ 1 file changed, 56 insertions(+) diff --git a/include/glib-compat.h b/include/glib-compat.h index fdf95a255d..8a078c5288 100644

[Qemu-devel] [PULL 27/64] slirp: remove HAVE_SYS_FILIO_H

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/slirp.h| 2 +- slirp/slirp_config.h | 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/slirp/slirp.h b/slirp/slirp.h index

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

2018-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2018 at 06:51:19PM +0100, Philippe Mathieu-Daudé wrote: > 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

[Qemu-devel] [PULL 16/64] slirp: remove PROBE_CONN dead-code

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Nobody cares for over 14y. Somebody can revert or rewrite if interested by that. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/slirp.c| 41

[Qemu-devel] [PULL 34/64] slirp: replace error_report() with g_critical()

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Reduce dependency on QEMU. QEMU could use a custom log handler if it wants to redirect/filter it. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/ip6_icmp.c | 2 +- slirp/misc.c | 2 +- slirp/slirp.c| 6 +++--- 3 files changed, 5

[Qemu-devel] [PULL 21/64] slirp: remove NO_UNIX_SOCKETS

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/slirp.h| 3 --- slirp/slirp_config.h | 6 -- 2 files changed, 9 deletions(-) diff --git a/slirp/slirp.h b/slirp/slirp.h index 57955a8965..fba77d0c3d

[Qemu-devel] [PULL 53/64] slirp: no need to make DPRINTF conditional on DEBUG

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau DEBUG_CALL is already handled conditionally. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/bootp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/slirp/bootp.c b/slirp/bootp.c index 5ab6692038..4c9a77eb98 100644

[Qemu-devel] [PULL 33/64] slirp: remove unused global slirp_instance

2018-12-18 Thread Samuel Thibault
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Signed-off-by: Samuel Thibault --- slirp/slirp.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/slirp/slirp.h b/slirp/slirp.h index 05c203c8c7..d1b6bcefbb 100644 --- a/slirp/slirp.h +++

  1   2   3   4   5   >