[Qemu-devel] [PATCH v4 3/3] audio: use TYPE_MV88W8618_AUDIO instead of hardcoded string

2018-10-22 Thread Mao Zhongyi
Cc: Jan Kiszka Cc: Philippe Mathieu-Daudé Cc: Peter Maydell Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 2 +- hw/audio/marvell_88w8618.c | 1 - include/hw/audio/wm8750.h | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a

[Qemu-devel] [PATCH v4 0/3] use object link instead of qdev property

2018-10-22 Thread Mao Zhongyi
According to qdev-properties.h, properties of pointer type should be avoid, so convert qdev property to link, Whilst we are here, also update some hardcoded strings with already defineded macros. v4: -fixed the "Broken pipe" error when "make check" v3: -removed incorrected "To: xxx" tags from com

[Qemu-devel] [PATCH v4 2/3] audio: use object link instead of qdev property to pass wm8750 reference

2018-10-22 Thread Mao Zhongyi
According to qdev-properties.h, properties of pointer type should be avoided, it seems a link type property is a good substitution. Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann Signed-off-by: Mao Zhongyi --- hw/arm/musicpal.c | 3 ++- hw/audio/marvell_88w8618.c | 13 ++---

[Qemu-devel] [PATCH v4 1/3] audio: use TYPE_WM8750 instead of a hardcoded string

2018-10-22 Thread Mao Zhongyi
Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 2 +- hw/audio/marvell_88w8618.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c ind

Re: [Qemu-devel] [PATCH v3 0/3] use object link instead of qdev property

2018-10-22 Thread maozy
Hi, Gerd On 10/19/18 4:04 PM, Gerd Hoffmann wrote: On Mon, Oct 15, 2018 at 11:26:39AM +0800, Mao Zhongyi wrote: According to qdev-properties.h, properties of pointer type should be avoid, so convert qdev property to link, Whilst we are here, also update some hardcoded strings with already defin

[Qemu-devel] [PATCH] vga_int: remove unused function protype

2018-10-22 Thread yuchenlin--- via Qemu-devel
From: yuchenlin Signed-off-by: yuchenlin --- hw/display/vga_int.h | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index 6e4fa48a79..55c418eab5 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -166,7 +166,6 @@ MemoryRegion *vga_init_i

[Qemu-devel] [PATCH v3 2/2] po/Makefile: Modern shell scripting (use $() instead of ``)

2018-10-22 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Cc: phi...@redhat.com Cc: peter.mayd...@linaro.org Cc: th...@redhat.com Cc: s...@weilnetz.de Signed-off-by: Mao Zhongyi Signed-off-by: Thomas Huth --- po/Makefile | 2 +-

[Qemu-devel] [PATCH v3 0/2] Modern shell scripting (use $() instead of ``)

2018-10-22 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. On https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02920.html I just replaced `` in scripts dir, so this series is a thorough cleanup of all obsolete `` in the sou

[Qemu-devel] [PATCH v3 1/2] debian-bootstrap.pre: Modern shell scripting (use $() instead of ``)

2018-10-22 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Cc: alex.ben...@linaro.org Cc: f...@redhat.com Cc: phi...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Alex Bennée Tested-by: Alex Bennée --- tests/docker/dockerfil

Re: [Qemu-devel] [PULL 00/45] Machine queue, 2018-10-18

2018-10-22 Thread Igor Mammedov
On Fri, 19 Oct 2018 17:23:21 -0300 Eduardo Habkost wrote: > On Fri, Oct 19, 2018 at 09:53:45PM +0200, Igor Mammedov wrote: > > On Fri, 19 Oct 2018 15:44:08 -0300 > > Eduardo Habkost wrote: > > > > > On Fri, Oct 19, 2018 at 03:12:31PM +0100, Peter Maydell wrote: > > > > On 18 October 2018 at 21:

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

2018-10-22 Thread Yi Min Zhao
Common function measurement block is used to report counters of successfully issued pcilg/stg/stb and rpcit instructions. This patch introduces a new struct ZpciFmb and schedules a timer callback to copy fmb to the guest memory at a interval time which is set to 4s by default. While attemping to up

Re: [Qemu-devel] Virtual IOMMU is working for Windows VM?

2018-10-22 Thread Peter Xu
On Mon, Oct 22, 2018 at 12:22:02AM -0400, Jintack Lim wrote: > Hi, > > I wonder if vIOMMU is working for Windows VM? > > I tried it with v2.11.0, but it didn't seem to work. I assume that seaBIOS > sets IOMMU on by default as is the case when I launched a Linux VM. But I > might be missing someth

Re: [Qemu-devel] [PATCH v5 0/9] x86_iommu/amd: add interrupt remap support

2018-10-22 Thread Peter Xu
On Fri, Oct 19, 2018 at 12:28:20PM -0400, Michael S. Tsirkin wrote: > It looks good to me, I am merging it. Hi, Michael, Would you like to consider taking some of the other IOMMU fixes into your next pull too altogether? They are: [PATCH v4 0/2] intel_iommu: better handling of dmar state swit

Re: [Qemu-devel] [PATCH] hw/arm/virt: remove unused header files

2018-10-22 Thread Hongbo Zhang
On 22 October 2018 at 09:37, Hongbo Zhang wrote: > On 19 October 2018 at 19:59, Peter Maydell wrote: >> On 19 October 2018 at 11:18, Hongbo Zhang wrote: >>> Remove the unused herder files, 'virt' can be compiled and run without >>> including them. >>> >>> Signed-off-by: Hongbo Zhang >>> --- >>>

Re: [Qemu-devel] [PATCH] icount: fix deadlock when all cpus are sleeping

2018-10-22 Thread Paolo Bonzini
On 21/10/2018 16:21, Clement Deschamps wrote: > When all cpus are sleeping (e.g in WFI), to avoid a deadlock > in the main_loop, wake it up in order to start the warp timer. > > Signed-off-by: Clement Deschamps > --- > cpus.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/cpus

Re: [Qemu-devel] [PATCH v3 2/2] po/Makefile: Modern shell scripting (use $() instead of ``)

2018-10-22 Thread Thomas Huth
On 2018-10-22 09:48, Mao Zhongyi wrote: > Various shell files contain a mix between obsolete `` > and modern $(); It would be nice to convert to using $() > everywhere. > > Cc: phi...@redhat.com > Cc: peter.mayd...@linaro.org > Cc: th...@redhat.com > Cc: s...@weilnetz.de > > Signed-off-by: Mao Zh

[Qemu-devel] [Bug 1799200] [NEW] pointer dereference in tcg_emit_op

2018-10-22 Thread wwb1234
Public bug reported: I am insert a custom tcg helper function in i386_tr_insn_start for trace the instructions. most of time the qemu runed ok ,but when execute some special software will lead to crash. the below is the insert code: =

[Qemu-devel] [PATCH RFC 0/2] Fix migration issues

2018-10-22 Thread Fei Li
Hi, these two patches are to fix live migration issues. The first is about multifd, and the second is to fix some error handling. But I have a question about using multifd migration. In our current code, when multifd is used during migration, if there is an error before the destination receives al

[Qemu-devel] [PATCH RFC 1/2] migration: fix the multifd code

2018-10-22 Thread Fei Li
When multifd is used during migration, if there is an error before the destination receives all new channels, the destination does not exit but keeps waiting in our current code. However, a segmentaion fault will occur in the source when multifd_save_cleanup() is called again as the multifd_send_st

[Qemu-devel] [PATCH RFC 2/2] migration: fix some error handling

2018-10-22 Thread Fei Li
Add error handling for qemu_ram_foreach_migratable_block() when it fails. Always call migrate_set_error() to set the error state without relying on whether multifd_save_cleanup() succeeds. As the passed &local_err is never used in multifd_save_cleanup(), remove it. Signed-off-by: Fei Li --- mig

[Qemu-devel] [Bug 1799200] Re: null pointer dereference in tcg_emit_op

2018-10-22 Thread wwb1234
** Summary changed: - pointer dereference in tcg_emit_op + null pointer dereference in tcg_emit_op -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1799200 Title: null pointer dereference in tcg_emit

Re: [Qemu-devel] [PATCH v3 3/4] hw/arm: versal: Add a model of Xilinx Versal SoC

2018-10-22 Thread Edgar E. Iglesias
On Sun, Oct 21, 2018 at 10:25:28PM +0100, Peter Maydell wrote: > On 21 October 2018 at 20:24, Edgar E. Iglesias > wrote: > > On Fri, Oct 19, 2018 at 03:18:24PM +0100, Peter Maydell wrote: > >> On 17 October 2018 at 22:39, Edgar E. Iglesias > >> wrote: > >> > From: "Edgar E. Iglesias" > >> > > >

Re: [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-22 Thread Lukáš Hrázký
Hello, On Thu, 2018-10-18 at 03:16 -0400, Frediano Ziglio wrote: > > > > Adds two functions to let QEMU provide information to identify graphics > > devices and their monitors in the guest: > > > > * device address - The path identifying the device on the system (e.g. PCI > > path): > > spic

Re: [Qemu-devel] [RFC PATCH qemu v2 2/2] spice: set device address and device display ID in QXL interface

2018-10-22 Thread Lukáš Hrázký
On Thu, 2018-10-18 at 03:38 -0400, Frediano Ziglio wrote: > > > > Calls new SPICE QXL interface functions to set: > > > > * The hardware address of the graphics device represented by the QXL > > interface (e.g. a PCI path): > > spice_qxl_set_device_address(...) > > > > * The device display I

[Qemu-devel] [PATCH 0/2] target/mips: Two corrections

2018-10-22 Thread Aleksandar Markovic
From: Aleksandar Markovic This small series adds two corrections for issues reported recently. Aleksandar Markovic (2): target/mips: Fix the title of translate.c target/mips: Fix decoding of ALIGN and DALIGN instructions target/mips/translate.c | 42 +---

[Qemu-devel] [PATCH 2/2] target/mips: Fix decoding of ALIGN and DALIGN instructions

2018-10-22 Thread Aleksandar Markovic
From: Aleksandar Markovic Opcode for ALIGN and DALIGN must be in fact ranges of opcodes, to allow paremeter 'bp' to occupy two and three bits, respectively. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 40 1 file changed, 32 insertio

[Qemu-devel] [PATCH 1/2] target/mips: Fix the title of translate.c

2018-10-22 Thread Aleksandar Markovic
From: Aleksandar Markovic Replace MIPS32 with MIPS, since the file covers all generations of MIPS architectures. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/translate.c b/target/mips/translate.c

Re: [Qemu-devel] [PATCH 1/2] target/mips: Fix the title of translate.c

2018-10-22 Thread Stefan Markovic
On 22.10.18. 13:57, Aleksandar Markovic wrote: From: Aleksandar Markovic Replace MIPS32 with MIPS, since the file covers all generations of MIPS architectures. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed

Re: [Qemu-devel] [PATCH 2/2] target/mips: Fix decoding of ALIGN and DALIGN instructions

2018-10-22 Thread Stefan Markovic
On 22.10.18. 13:57, Aleksandar Markovic wrote: From: Aleksandar Markovic Opcode for ALIGN and DALIGN must be in fact ranges of opcodes, to allow paremeter 'bp' to occupy two and three bits, respectively. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 40 +

[Qemu-devel] [PATCH 1/3] arm: check bit index before use

2018-10-22 Thread P J P
From: Prasad J Pandit While performing gpio write via strongarm_gpio_handler_update routine, the 'bit' index could access beyond s->handler[28] array. Add check to avoid OOB access. Reported-by: Moguofang Signed-off-by: Prasad J Pandit --- hw/arm/strongarm.c | 4 +++- 1 file changed, 3 insert

[Qemu-devel] [PATCH 2/3] nvme: check size before memcpy

2018-10-22 Thread P J P
From: Prasad J Pandit While in nvme_mmio_read, memcpy could read past the 'n->bar' buffer, if addr offset was pointing towards its tail end. Add check to avoid OOB access. Reported-by: Caihongzhu Signed-off-by: Prasad J Pandit --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

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

2018-10-22 Thread Thomas Huth
On 2018-10-22 10:02, Yi Min Zhao wrote: > Common function measurement block is used to report counters of > successfully issued pcilg/stg/stb and rpcit instructions. This patch > introduces a new struct ZpciFmb and schedules a timer callback to > copy fmb to the guest memory at a interval time whic

[Qemu-devel] [PATCH 3/3] ppc/pnv: check size before data buffer access

2018-10-22 Thread P J P
From: Prasad J Pandit While performing PowerNV memory r/w operations, the access length 'sz' could exceed the data[4] buffer size. Add check to avoid OOB access. Reported-by: Moguofang Signed-off-by: Prasad J Pandit --- hw/ppc/pnv_lpc.c | 4 1 file changed, 4 insertions(+) diff --git a/

Re: [Qemu-devel] [PATCH 1/3] arm: check bit index before use

2018-10-22 Thread liqsub1
2018-10-22 liqsub1 发件人:P J P 发送时间:2018-10-23 01:39 主题:[Qemu-devel] [PATCH 1/3] arm: check bit index before use 收件人:"Qemu Developers" 抄送:"Peter Maydell","Moguofang","Prasad J Pandit" From: Prasad J Pandit While performing gpio write via strongarm_gpio_handler_update routine, the 'bit

[Qemu-devel] [PULL 05/40] block: Use warn_report() & friends to report warnings

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually warnings to warn_report(). While there, split warnings consisting of multiple sentences to conform to conventions spelled out in warn_report()'s contract, and improve a rather usele

[Qemu-devel] [PULL 27/40] ui/keymaps: Fix handling of erroneous include files

2018-10-22 Thread Markus Armbruster
While errors in the keyboard layout named with -k are fatal, errors in included files are reported, but otherwise ignored: $ cat worst include bad include worse $ ls -l bad worse ls: cannot access 'bad': No such file or directory ls: cannot access 'worse': No such file or d

[Qemu-devel] [PULL 00/40] Error reporting patches for 2018-10-22

2018-10-22 Thread Markus Armbruster
The following changes since commit 1b7490446bf41f54130c2d495dd4c8768c8e1ce3: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.1-pull-request' into staging (2018-10-19 11:20:05 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-error

[Qemu-devel] [PULL 01/40] scripts: Remove check-qerror.sh

2018-10-22 Thread Markus Armbruster
From: Alberto Garcia qerror.h contains leftovers from the now-defunct QError API. There's only a handful of string macros left, and no one is supposed to add anything else. The check-qerror.sh script was used to make sure that all definitions on the qerror.c and qerror.h files were sorted alphab

qemu-devel@nongnu.org

2018-10-22 Thread Markus Armbruster
>From include/qapi/error.h: * Pass an existing error to the caller with the message modified: * error_propagate(errp, err); * error_prepend(errp, "Could not frobnicate '%s': ", name); Fei Li pointed out that doing error_propagate() first doesn't work well when @errp is &error_fatal

[Qemu-devel] [PULL 04/40] Use error_fatal to simplify obvious fatal errors (again)

2018-10-22 Thread Markus Armbruster
Add a slight improvement of the Coccinelle semantic patch from commit 007b06578ab, and use it to clean up. It leaves dead Error * variables behind, cleaned up manually. Cc: David Gibson Cc: Alexander Graf Cc: Eric Blake Cc: Paolo Bonzini Signed-off-by: Markus Armbruster Reviewed-by: Eric Bla

[Qemu-devel] [PULL 10/40] 9pfs: Fix CLI parsing crash on error

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. 9p-handle.c's handle_parse_opts() does that, and then fails without setting an error. Wrong. Its caller crashes when it tries to report the error: $ qemu-system-x86_64 -nodefaults -fsdev id=foo,fsdriver=hand

[Qemu-devel] [PULL 25/40] vl: Clean up error reporting in parse_fw_cfg()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_fw_cfg() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lu

[Qemu-devel] [PULL 26/40] vl: Clean up error reporting in device_init_func()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. device_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Philippe

[Qemu-devel] [PULL 35/40] blockdev: Convert drive_new() to Error

2018-10-22 Thread Markus Armbruster
Calling error_report() from within a function that takes an Error ** argument is suspicious. drive_new() calls error_report() even though it can run within drive_init_func(), which takes an Error ** argument. drive_init_func()'s caller main(), via qemu_opts_foreach(), is fine with it, but clean it

[Qemu-devel] [PULL 09/40] char: Use error_printf() to print help and such

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually help and such to error_printf(). Improves output of -chardev help from qemu-system-x86_64: -chardev help: Available chardev backend types: serial ... to Available

[Qemu-devel] [PULL 12/40] ioapic: Fix error handling in realize()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. ioapic_realize() does that, and then exit()s. Currently mostly harmless, as the device cannot be hot-plugged. Fixes: 20fd4b7b6d9282fe0cb83601f1821f31bd257458 Cc: Peter Xu Signed-off-by: Markus Armbruster Reviewe

[Qemu-devel] [PULL 24/40] vl: Clean up error reporting in mon_init_func()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. mon_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mat

[Qemu-devel] [PULL 21/40] qom: Clean up error reporting in user_creatable_add_opts_foreach()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. user_creatable_add_opts_foreach() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Daniel P. Berrangé Signed-off-by: Ma

[Qemu-devel] [PULL 39/40] vpc: Fail open on bad header checksum

2018-10-22 Thread Markus Armbruster
vpc_open() merely prints a warning when it finds a bad header checksum. Turn that into a hard error. Cc: Kevin Wolf Signed-off-by: Markus Armbruster Message-Id: <20181017082702.5581-39-arm...@redhat.com> [Error message capitalized for local consistency] Reviewed-by: Kevin Wolf --- block/vpc.c

[Qemu-devel] [PULL 34/40] vl: Assert drive_new() does not fail in default_drive()

2018-10-22 Thread Markus Armbruster
If creating (empty) default drives fails, it's a bug. Therefore, assert() is more appropriate than exit(1). Cc: Kevin Wolf Cc: Max Reitz Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Max Reitz Message-Id: <20181017082702.5581-33-arm...@redhat.com> --- vl.c | 4 +---

[Qemu-devel] [PULL 30/40] numa: Clean up error reporting in parse_numa()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_numa() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. While there, give parse_numa() internal linkage. Cc: Eduardo

[Qemu-devel] [PULL 02/40] vl: Print error when using incorrect backend for debugcon

2018-10-22 Thread Markus Armbruster
From: Philippe Mathieu-Daudé When using an incorrect backend for the debugcon, QEMU exits silently without any error indication, which is confusing. Add a message that the character backend is invalid. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181011171254.32428-1-phi...@redhat.com>

[Qemu-devel] [PULL 15/40] l2tpv3: Improve -netdev/netdev_add/-net/... error reporting

2018-10-22 Thread Markus Armbruster
When -netdev l2tpv3 fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -netdev l2tpv3,id=foo,src=,dst=,txsession=1 qemu-system-x86_64: -netdev l2tpv3,id=foo,src=,dst=,txsession=1: l2tpv3_open : could not resolve src, errno = Name or service not k

[Qemu-devel] [PULL 22/40] vl: Clean up error reporting in chardev_init_func()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. chardev_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Philippe

[Qemu-devel] [PULL 06/40] cpus hw target: Use warn_report() & friends to report warnings

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually warnings to warn_report(). While there, split a warning consisting of multiple sentences to conform to conventions spelled out in warn_report()'s contract. Cc: Alex Bennée Cc: Mar

[Qemu-devel] [PULL 31/40] tpm: Clean up error reporting in tpm_init_tpmdev()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. tpm_init_tpmdev() does that, and then fails without setting an error. Its caller main(), via tpm_init() and qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Stefan Berger Signed-off-by: Markus A

[Qemu-devel] [PULL 23/40] vl: Clean up error reporting in machine_set_property()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. machine_set_property() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Phili

[Qemu-devel] [PULL 16/40] net/socket: Fix invalid socket type error handling

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. net_socket_fd_init() does that, and then fails without setting an error. Wrong. I didn't analyze how exactly this can break. A caller that reports the error on failure would crash. Broken when commit c37f0bb1d0

[Qemu-devel] [PULL 17/40] numa: Fix QMP command set-numa-node error handling

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_numa_node() does that, and then exit()s. It also passes &error_fatal to machine_set_cpu_numa_node(). Both wrong. Attempting to configure numa when the machine doesn't support it kills the VM: $ qemu-sy

[Qemu-devel] [PULL 38/40] block: Clean up bdrv_img_create()'s error reporting

2018-10-22 Thread Markus Armbruster
bdrv_img_create() takes an Error ** argument and uses it in the conventional way, except for one place: when qemu_opts_do_parse() fails, it first reports its error to stderr or the HMP monitor with error_report_err(), then error_setg()'s a generic error. When the caller reports that second error s

[Qemu-devel] [PULL 29/40] vnc: Clean up error reporting in vnc_init_func()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. vnc_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. While there, drop a "Failed to start VNC server: " error me

[Qemu-devel] [PULL 32/40] spice: Clean up error reporting in add_channel()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. add_channel() does that, and then exit()s. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau

[Qemu-devel] [PULL 28/40] ui: Convert vnc_display_init(), init_keyboard_layout() to Error

2018-10-22 Thread Markus Armbruster
From: Fei Li Signed-off-by: Fei Li Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20181017082702.5581-27-arm...@redhat.com> Reviewed-by: Gerd Hoffmann --- include/ui/console.h | 2 +- ui/curses.c | 6 +++--- ui/keymaps.c

[Qemu-devel] [PULL 18/40] xen/pt: Fix incomplete conversion to realize()

2018-10-22 Thread Markus Armbruster
The conversion of "xen-pci-passthrough" to realize() (commit 5a11d0f7549, v2.6.0) neglected to convert the xen_pt_config_init() error path. If xen_pt_config_init() fails, xen_pt_realize() reports the error, then returns success without completing its job. I don't know the exact impact, but it can

[Qemu-devel] [PULL 20/40] vl: Clean up error reporting in parse_add_fd()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_add_fd() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Also change call of cleanup_add_fd(), which can't fail, for

[Qemu-devel] [PULL 07/40] vfio: Use warn_report() & friends to report warnings

2018-10-22 Thread Markus Armbruster
The vfio code reports warnings like error_report(WARN_PREFIX "Could not frobnicate", DEV-NAME); where WARN_PREFIX is defined so the message comes out as vfio warning: DEV-NAME: Could not frobnicate This usage predates the introduction of warn_report() & friends in commit 97f40301f1d. I

[Qemu-devel] [PULL 36/40] vl: Fix exit status for -drive format=help

2018-10-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20181017082702.5581-35-arm...@redhat.com> --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 4efa2d08d4..812ceba425 100644 --- a/vl.c +++ b/vl.c @@ -4398,7 +4398,7 @@ int main(int argc, char **argv, char **e

[Qemu-devel] [PULL 11/40] pc: Fix machine property nvdimm-persistence error handling

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. pc.c's pc_machine_set_nvdimm_persistence() does that, and then exit()s. Wrong. Attempting to set machine property nvdimm-persistence to a bad value instantly kills the VM: $ qemu-system-x86_64 -nodefaults -S

[Qemu-devel] [PULL 37/40] vl: Simplify call of parse_name()

2018-10-22 Thread Markus Armbruster
main() checks for parse_name() failure even though it can't actually fail. That's okay. Simplify it to check by passing &error_fatal, like the other users of qemu_opts_foreach(). Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20181017082702.5581-36-arm...@red

[Qemu-devel] [PULL 02/34] disas/mips: Define R5900 disassembly constants

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Amend definition for MIPS ISAs in disassembler with R5900. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- disas/mips.c | 8 1 file changed, 8 insertions(+) diff --git a/disas/mips.c b/disas/mips.c index 97f

[Qemu-devel] [PULL 01/34] target/mips: Define R5900 ISA, MMI ASE, and R5900 CPU preprocessor constants

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring The R5900 implements the 64-bit MIPS III instruction set except DMULT, DMULTU, DDIV, DDIVU, LL, SC, LLD and SCD. The MIPS IV instructions MOVN, MOVZ and PREF are implemented. It has the R5900-specific three-operand instructions MADD, MADDU, MULT and MULTU as well as pipeline

[Qemu-devel] [PULL 40/40] error: Drop bogus "use error_setg() instead" admonitions

2018-10-22 Thread Markus Armbruster
Commit 97f40301f1d "error: Functions to report warnings and informational messages" copied the "use error_setg() instead" admonition from the error reporting functions to new functions even though it doesn't actually apply there. Drop it. Also drop it from vreport(), where it doesn't apply anymor

[Qemu-devel] [PULL 33/40] fsdev: Clean up error reporting in qemu_fsdev_add()

2018-10-22 Thread Markus Armbruster
Calling error_report() from within a function that takes an Error ** argument is suspicious. qemu_fsdev_add() does that, and its caller fsdev_init_func() then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Greg Kurz Signe

[Qemu-devel] [PULL 00/34] MIPS queue for October 2018 - part 2

2018-10-22 Thread Aleksandar Markovic
From: Aleksandar Markovic The following changes since commit b312532fd03413d0e6ae6767ec793a3e30f487b8: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2018-10-19 19:01:07 +0100) are available in the git repository at: https://github.com/AMarkovic/qemu tags/m

[Qemu-devel] [PULL 08/34] target/mips: Define R5900 MMI2 opcode constants

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 48 1 file changed, 48 insertions(+) diff --git a/target/mips/translate.c b/target/mips/transl

[Qemu-devel] [PULL 13/40] smbios: Clean up error handling in smbios_add()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. smbios_entry_add() does that, and then exit()s. It also passes &error_fatal to qemu_opts_validate(). Both wrong, but currently harmless, as its only caller passes &error_fatal. Messed up in commit 1007a37e208.

[Qemu-devel] [PULL 16/34] target/mips: Placeholder for R5900 MMI3 instruction subclass

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a placeholder for MMI3 subclass. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/target/m

[Qemu-devel] [PULL 04/34] target/mips: Define R5900 MMI class, and LQ and SQ opcode constants

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Define MMI class, LQ, and SQ R5900 opdoces. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 40 1 file changed, 40 insertions(+) diff --git a/target/

[Qemu-devel] [PULL 19/40] seccomp: Clean up error reporting in parse_sandbox()

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_sandbox() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Eduardo Otubo Signed-off-by: Markus Armbruster Review

[Qemu-devel] [PULL 14/40] migration: Fix !replay_can_snapshot() error handling

2018-10-22 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. save_snapshot() and load_snapshot() do that, and then fail without setting an error. Wrong. The HMP commands survive this unscathed, since hmp_handle_error() does nothing when no error has been set. Callers main

[Qemu-devel] [PULL 03/34] target/mips: R5900 Multimedia Instruction overview note

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a comment on R5900 MMI ASE (short overview). Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 161 1 file changed, 161 insertions(+) diff

[Qemu-devel] [PULL 08/40] vfio: Clean up error reporting after previous commit

2018-10-22 Thread Markus Armbruster
The previous commit changed vfio's warning messages from vfio warning: DEV-NAME: Could not frobnicate to warning: vfio DEV-NAME: Could not frobnicate To match this change, change error messages from vfio error: DEV-NAME: On fire to vfio DEV-NAME: On fire Note the loss of "er

[Qemu-devel] [PULL 11/34] target/mips: Placeholder for R5900 LQ

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a placeholder for LQ instruction. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/target/mips/translate.c

[Qemu-devel] [PULL 27/34] tests/tcg/mips: Test R5900 MFLO1 and MFHI1

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a test for MFLO1 and MFHI1. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- tests/tcg/mips/mipsr5900/Makefile | 3 ++- tests/tcg/mips/mipsr5900/mflohi1.c | 35 +++ 2 files changed

[Qemu-devel] [PULL 23/34] tests/tcg/mips: Test R5900 three-operand MULT

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a test for MULT. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- tests/tcg/mips/mipsr5900/Makefile | 25 + tests/tcg/mips/mipsr5900/mult.c | 47 +++ 2 file

[Qemu-devel] [PULL 05/34] target/mips: Define R5900 MMI{0, 1, 2, 3} subclasses and MMI opcode constants

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Define MMI0, MMI1, MMI2, MMI3 subclass opcodes, and other opcodes of instructions in MMI class. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 51

[Qemu-devel] [PULL 34/34] target/mips: Fix decoding of ALIGN and DALIGN instructions

2018-10-22 Thread Aleksandar Markovic
From: Aleksandar Markovic Opcode for ALIGN and DALIGN must be in fact ranges of opcodes, to allow paremeter 'bp' to occupy two and three bits, respectively. Reviewed-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 40 ---

[Qemu-devel] [PULL 07/34] target/mips: Define R5900 MMI1 opcode constants

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 44 1 file changed, 44 insertions(+) diff --git a/target/mips/translate.c b/target/mips/translate.

[Qemu-devel] [PULL 13/34] target/mips: Placeholder for R5900 MMI0 instruction subclass

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a placeholder for MMI0 subclass. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 43 ++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --gi

[Qemu-devel] [PULL 20/34] target/mips: Support R5900 DIV1 and DIVU1 instructions

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add support for DIV1 and DIVU1 instructions. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- disas/mips.c| 4 target/mips/translate.c | 12 +--- 2 files changed, 13 insertions(+), 3 deletions

Re: [Qemu-devel] [PATCH v3 2/2] po/Makefile: Modern shell scripting (use $()instead of ``)

2018-10-22 Thread maozy
On 10/22/18 6:59 PM, Thomas Huth wrote: On 2018-10-22 09:48, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Cc: phi...@redhat.com Cc: peter.mayd...@linaro.org Cc: th...@redhat.com Cc: s...@weilnetz

[Qemu-devel] [PULL 09/34] target/mips: Define R5900 MMI3 opcode constants

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/target/mips/translate.c b/target/mips/translate.c ind

[Qemu-devel] [PULL 14/34] target/mips: Placeholder for R5900 MMI1 instruction subclass

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a placeholder for MM1 subclass. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/targ

[Qemu-devel] [PULL 21/34] target/mips: Support R5900 MOVN, MOVZ and PREF instructions from MIPS IV

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring The R5900 is taken to be MIPS III with certain modifications. From MIPS IV it implements the instructions MOVN, MOVZ and PREF. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- targe

[Qemu-devel] [PULL 24/34] tests/tcg/mips: Test R5900 three-operand MULTU

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a test for MULTU. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- tests/tcg/mips/mipsr5900/Makefile | 1 + tests/tcg/mips/mipsr5900/multu.c | 39 +++ 2 files changed, 40 inser

[Qemu-devel] [PULL 06/34] target/mips: Define R5900 MMI0 opcode constants

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add definition of MI0 opcodes. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 51 + 1 file changed, 51 insertions(+) diff --git a/target/mips

[Qemu-devel] [PULL 15/34] target/mips: Placeholder for R5900 MMI2 instruction subclass

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a placeholder for MMI2 subclass. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a

[Qemu-devel] vhost-user devices work with chardev from different threads

2018-10-22 Thread Yury Kotov
Hi, I examined vhost-user devices and found some chardev using strangeness. Is it ok, that vhost-user's set_status do sync chardev io ops from KVM thread? It seems that chardev doesn't support working with different threads. For example, I think such race is possible (two simultaneous events): 1

[Qemu-devel] [PULL 12/34] target/mips: Placeholder for R5900 MMI instruction class

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a placeholder for MMI class. This is the main palceholder for MMI ASE. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 45 - 1 file changed, 44

[Qemu-devel] [PULL 26/34] tests/tcg/mips: Test R5900 three-operand MULTU1

2018-10-22 Thread Aleksandar Markovic
From: Fredrik Noring Add a test for MULTU1. Reviewed-by: Aleksandar Markovic Signed-off-by: Fredrik Noring Signed-off-by: Aleksandar Markovic --- tests/tcg/mips/mipsr5900/multu.c | 43 +--- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/tes

  1   2   3   >