[Qemu-devel] [PATCH 25/31] numa: Clean up error reporting in parse_numa()

2018-10-08 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] [PATCH 12/31] l2tpv3: Improve -netdev/netdev_add/-net/... error reporting

2018-10-08 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

[Qemu-devel] [PATCH 31/31] vl: Simplify call of parse_name()

2018-10-08 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 _fatal, like the other users of qemu_opts_foreach(). Signed-off-by: Markus Armbruster --- vl.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vl.c

[Qemu-devel] [PATCH 19/31] vl: Clean up error reporting in parse_add_fd()

2018-10-08 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 --- vl.c | 8

[Qemu-devel] [PATCH 16/31] seccomp: Clean up error reporting in parse_sandbox()

2018-10-08 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 ---

[Qemu-devel] [PATCH 28/31] fsdev: Clean up error reporting in qemu_fsdev_add()

2018-10-08 Thread Markus Armbruster
Calling error_report() from within a 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

[Qemu-devel] [PATCH 15/31] xen/pt: Fix incomplete conversion to realize()

2018-10-08 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

[Qemu-devel] [PATCH 20/31] vl: Clean up error reporting in machine_set_property()

2018-10-08 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 --- vl.c | 9

[Qemu-devel] [PATCH 10/31] smbios: Clean up error handling in smbios_add()

2018-10-08 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 _fatal to qemu_opts_validate(). Both wrong, but currently harmless, as its only caller passes _fatal. Messed up in commit 1007a37e208. Clean it

[Qemu-devel] [PATCH 13/31] net/socket: Fix invalid socket type error handling

2018-10-08 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

[Qemu-devel] [PATCH 17/31] vl: Clean up error reporting in parse_add_fd()

2018-10-08 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] [PATCH 06/31] char: Use error_printf() to print help and such

2018-10-08 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

[Qemu-devel] [PATCH 03/31] cpus hw target: Use warn_report() & friends to report warnings

2018-10-08 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:

[Qemu-devel] [PATCH 27/31] spice: Clean up error reporting in add_channel()

2018-10-08 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 --- ui/spice-core.c | 13

[Qemu-devel] [PATCH 14/31] numa: Fix QMP command set-numa-node error handling

2018-10-08 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 _fatal to machine_set_cpu_numa_node(). Both wrong. Attempting to configure numa when the machine doesn't support it kills the VM: $

[Qemu-devel] [PATCH 05/31] vfio: Clean up error reporting after previous commit

2018-10-08 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

[Qemu-devel] [PATCH 00/31] Replace some unwise uses of error_report() & friends

2018-10-08 Thread Markus Armbruster
Calling error_report() or similar in a function that takes an Error ** argument is suspicious. Fux a number of instances that are actually wrong. Clean up a few more that are merely fragile / bad examples. Markus Armbruster (31): Use error_fatal to simplify obvious fatal errors (again)

[Qemu-devel] [PATCH 08/31] pc: Fix machine property nvdimm-persistence error handling

2018-10-08 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

[Qemu-devel] [PATCH 04/31] vfio: Use warn_report() & friends to report warnings

2018-10-08 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.

[Qemu-devel] [PATCH 18/31] qom: Clean up error reporting in user_creatable_add_opts_foreach()

2018-10-08 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:

[Qemu-devel] [PATCH 24/31] vl: Clean up error reporting in vnc_init_func()

2018-10-08 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. Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster ---

[Qemu-devel] [PATCH 02/31] block: Use warn_report() & friends to report warnings

2018-10-08 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

[Qemu-devel] [PATCH 29/31] vl: Assert drive_new() does not fail in default_drive()

2018-10-08 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 --- vl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vl.c b/vl.c index 4aa976c4cc..0d25956b2f

[Qemu-devel] [PATCH 21/31] vl: Clean up error reporting in mon_init_func()

2018-10-08 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 --- vl.c | 14

[Qemu-devel] [PATCH 09/31] ioapic: Fix error handling in realize()

2018-10-08 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 ---

[Qemu-devel] [PATCH 01/31] Use error_fatal to simplify obvious fatal errors (again)

2018-10-08 Thread Markus Armbruster
Add a slight improvement of the Coccinelle semantic patch from commit 07d04a0219b, 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 ---

[Qemu-devel] [PATCH 11/31] migration: Fix !replay_can_snapshot() error handling

2018-10-08 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

[Qemu-devel] [PATCH 23/31] vl: Clean up error reporting in device_init_func()

2018-10-08 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 --- vl.c | 10

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

2018-10-08 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

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-10-08 Thread Liran Alon
Gentle ping on v2 of this series. (I noticed 1st patch of series was already applied) Thanks, -Liran > On 16 Sep 2018, at 15:46, Liran Alon wrote: > > Hi, > > This series aims to add support for QEMU to be able to migrate VMs that > are running nested hypervisors. In order to do so, it

Re: [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-08 Thread Peter Maydell
On 8 October 2018 at 17:40, Kevin Wolf wrote: > By the way, can you reproduce this with virtio-blk/scsi and an iothread > in a real QEMU or is it only the test case that fails? In theory, I > don't see what would prevent QEMU from hanging at shutdown. I haven't tested, but I suspect this is less

Re: [Qemu-devel] [PATCH v2 2/2] MAINTAINERS: Remove myself as block maintainer

2018-10-08 Thread John Snow
On 10/07/2018 07:51 PM, Max Reitz wrote: > On 26.09.18 20:05, Jeff Cody wrote: >> I'll not be involved in day-to-day qemu development. Remove myself as >> maintainer from the remainder of the network block drivers, and revert >> them to the general block layer maintainership. >> >> Move

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Kevin Wolf
Am 08.10.2018 um 18:04 hat Anton Nefedov geschrieben: > > > On 8/10/2018 6:46 PM, Kevin Wolf wrote: > > Am 08.10.2018 um 17:25 hat Anton Nefedov geschrieben: > >> > >> > >> On 8/10/2018 6:03 PM, Kevin Wolf wrote: > >>> Am 08.10.2018 um 16:38 hat Anton Nefedov geschrieben: > On 4/10/2018

Re: [Qemu-devel] [PATCH] .travis.yml: split MacOSX builds and reduce target list

2018-10-08 Thread Philippe Mathieu-Daudé
Hi Alex, On Mon, Oct 8, 2018 at 5:21 PM Alex Bennée wrote: > We have reached the point where the MacOSX build was regularly timing > out. So as before I've reduced the target list to "major" > architectures to try and bring the build time down. I've added an > additional MacOSX build with the

Re: [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-08 Thread Kevin Wolf
Am 08.10.2018 um 17:43 hat Peter Maydell geschrieben: > Looking at the backtraces I'm wondering if this is the result of > an implicit reliance on the order in which per-thread destructors > are called (which is left unspecified by POSIX) -- the destructor > function qemu_thread_atexit_run() is

Re: [Qemu-devel] [PATCH] vl.c: print error message if load fw_cfg file failed

2018-10-08 Thread Philippe Mathieu-Daudé
Hi Li, On Sun, Oct 7, 2018 at 7:48 PM Philippe Mathieu-Daudé wrote: > On 10/7/18 6:33 AM, Li Qiang wrote: > > It makes sense to print the error message while reading > > file failed. > > > > Signed-off-by: Li Qiang > > --- > > vl.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH v3 3/3] linux-user: Implement special usbfs ioctls.

2018-10-08 Thread Cortland Tölva
Userspace submits a USB Request Buffer to the kernel, optionally discards it, and finally reaps the URB. Thunk buffers from target to host and back. Tested by running an i386 scanner driver on ARMv7 and by running the PowerPC lsusb utility on x86_64. The discardurb ioctl is not exercised in

[Qemu-devel] [PATCH v3 1/3] linux-user: Check for Linux USBFS in configure

2018-10-08 Thread Cortland Tölva
In preparation for adding user mode emulation support for the Linux usbfs interface, check for its kernel header. Signed-off-by: Cortland Tölva Reviewed-by: Laurent Vivier Message-Id: <20180925071228.32040-2-...@tolva.net> Signed-off-by: Laurent Vivier --- configure | 12 +++- 1 file

[Qemu-devel] [PATCH v3 2/3] linux-user: Define ordinary usbfs ioctls.

2018-10-08 Thread Cortland Tölva
Provide ioctl definitions for the generic thunk mechanism to convert most usbfs calls. Calculate arg size at runtime. Signed-off-by: Cortland Tölva --- Changes from v1: move some type definitions to patch 3/3 Changes from v2: calculate ioctl arg size at runtime linux-user/ioctls.h

[Qemu-devel] [PATCH v3 0/3] Linux usermode emulation user mode USB driver support.

2018-10-08 Thread Cortland Tölva
This patch series enables programs running under QEMU Linux user mode emulation to implement user-space USB drivers via the USBFS ioctl()s. Support is limited to control, bulk, and possibly interrupt transfers. The series compiles for i386, ppc64, ppc64le, mips, mipsel, xtensa, and xtensaeb with

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Tony Krowiak
On 10/08/2018 10:44 AM, Thomas Huth wrote: On 2018-10-08 16:20, Tony Krowiak wrote: On 09/27/2018 08:52 AM, Cornelia Huck wrote: On Thu, 27 Sep 2018 14:29:01 +0200 Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for

Re: [Qemu-devel] [PATCH] s390x/tcg: always enable AFP for linux-user

2018-10-08 Thread Cornelia Huck
On Mon, 8 Oct 2018 17:32:04 +0200 David Hildenbrand wrote: > linux-user should always enable AFP, otherwise our emulated binary > might crash once it tries to make use of additional floating-point > registers or instructions. > > Cc: Peter Maydell > Cc: Alex Bennée > Fixes: db0504154e

Re: [Qemu-devel] [PATCH] s390x/tcg: always enable AFP for linux-user

2018-10-08 Thread Alex Bennée
David Hildenbrand writes: > linux-user should always enable AFP, otherwise our emulated binary > might crash once it tries to make use of additional floating-point > registers or instructions. > > Cc: Peter Maydell > Cc: Alex Bennée > Fixes: db0504154e ("s390x/tcg: check for AFP-register,

Re: [Qemu-devel] [PATCH] s390x/tcg: always enable AFP for linux-user

2018-10-08 Thread Cornelia Huck
On Mon, 8 Oct 2018 17:32:04 +0200 David Hildenbrand wrote: > linux-user should always enable AFP, otherwise our emulated binary > might crash once it tries to make use of additional floating-point > registers or instructions. > > Cc: Peter Maydell > Cc: Alex Bennée > Fixes: db0504154e

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Anton Nefedov
On 8/10/2018 6:46 PM, Kevin Wolf wrote: > Am 08.10.2018 um 17:25 hat Anton Nefedov geschrieben: >> >> >> On 8/10/2018 6:03 PM, Kevin Wolf wrote: >>> Am 08.10.2018 um 16:38 hat Anton Nefedov geschrieben: On 4/10/2018 6:33 PM, Kevin Wolf wrote: > Am 21.08.2018 um 11:46 hat Anton Nefedov

Re: [Qemu-devel] [PATCH] s390x/tcg: always enable AFP for linux-user

2018-10-08 Thread Richard Henderson
On 10/8/18 8:32 AM, David Hildenbrand wrote: > linux-user should always enable AFP, otherwise our emulated binary > might crash once it tries to make use of additional floating-point > registers or instructions. > > Cc: Peter Maydell > Cc: Alex Bennée > Fixes: db0504154e ("s390x/tcg: check for

[Qemu-devel] [RFC 1/2] migration: Stop postcopy fault thread before notifying

2018-10-08 Thread Ilya Maximets
POSTCOPY_NOTIFY_INBOUND_END handlers will remove userfault fds from the postcopy_remote_fds array which could be still in use by the fault thread. Let's stop the thread before notification to avoid possible accessing wrong memory. Fixes: 46343570c06e ("vhost+postcopy: Wire up POSTCOPY_END

[Qemu-devel] [RFC 2/2] vhost-user: Fix userfaultfd leak

2018-10-08 Thread Ilya Maximets
'fd' received from the vhost side is never freed. Also, everything (including 'postcopy_listen' state) should be cleaned up on vhost cleanup. Fixes: 46343570c06e ("vhost+postcopy: Wire up POSTCOPY_END notify") Fixes: f82c11165ffa ("vhost+postcopy: Register shared ufd with postcopy") Cc:

[Qemu-devel] [RFC 0/2] vhost+postcopy fixes

2018-10-08 Thread Ilya Maximets
Sending as RFC because it's not fully tested yet. Ilya Maximets (2): migration: Stop postcopy fault thread before notifying vhost-user: Fix userfaultfd leak hw/virtio/vhost-user.c | 7 +++ migration/postcopy-ram.c | 11 ++- 2 files changed, 13 insertions(+), 5 deletions(-)

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Kevin Wolf
Am 08.10.2018 um 17:25 hat Anton Nefedov geschrieben: > > > On 8/10/2018 6:03 PM, Kevin Wolf wrote: > > Am 08.10.2018 um 16:38 hat Anton Nefedov geschrieben: > >> On 4/10/2018 6:33 PM, Kevin Wolf wrote: > >>> Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: > Signed-off-by: Anton

Re: [Qemu-devel] [PATCH v2 4/7] block/qcow2-refcount: check_refcounts_l2: reduce ignored overlaps

2018-10-08 Thread Max Reitz
On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: > Reduce number of structures ignored in overlap check: when checking > active table ignore active tables, when checking inactive table ignore > inactive ones. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-refcount.c |

Re: [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-08 Thread Peter Maydell
On 8 October 2018 at 10:12, Peter Maydell wrote: > I looked back at the backtrace/etc that I posted earlier in this > thread, and it looked to me like maybe a memory corruption issue. > So I tried running the test under valgrind on Linux, and: ...which goes away if I do a complete build from

Re: [Qemu-devel] [PATCH v2 3/7] block/qcow2-refcount: check_refcounts_l2: refactor compressed case

2018-10-08 Thread Max Reitz
On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: > Separate offset and size of compressed cluster. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-refcount.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH] s390x/tcg: always enable AFP for linux-user

2018-10-08 Thread Thomas Huth
On 2018-10-08 17:32, David Hildenbrand wrote: > linux-user should always enable AFP, otherwise our emulated binary > might crash once it tries to make use of additional floating-point > registers or instructions. > > Cc: Peter Maydell > Cc: Alex Bennée > Fixes: db0504154e ("s390x/tcg: check for

Re: [Qemu-devel] [PATCH] migration: invalidate cache before source start

2018-10-08 Thread Vladimir Sementsov-Ogievskiy
26.06.2018 11:44, Vladimir Sementsov-Ogievskiy wrote: > 25.06.2018 20:50, Dr. David Alan Gilbert wrote: >> * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: >>> * Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: 15.06.2018 15:06, Dr. David Alan Gilbert wrote: > *

Re: [Qemu-devel] [PATCH v2 2/7] block/qcow2-refcount: avoid eating RAM

2018-10-08 Thread Max Reitz
On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: > qcow2_inc_refcounts_imrt() (through realloc_refcount_array()) can eat > an unpredictable amount of memory on corrupted table entries, which are > referencing regions far beyond the end of file. > > Prevent this, by skipping such regions

[Qemu-devel] [PATCH] s390x/tcg: always enable AFP for linux-user

2018-10-08 Thread David Hildenbrand
linux-user should always enable AFP, otherwise our emulated binary might crash once it tries to make use of additional floating-point registers or instructions. Cc: Peter Maydell Cc: Alex Bennée Fixes: db0504154e ("s390x/tcg: check for AFP-register, BFP and DFP data exceptions") Reported-by:

Re: [Qemu-devel] [PATCH v2 1/7] block/qcow2-refcount: fix check_oflag_copied

2018-10-08 Thread Max Reitz
On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: > Increase corruptions_fixed only after successful fix. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-refcount.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/block/qcow2-refcount.c

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Anton Nefedov
On 8/10/2018 6:03 PM, Kevin Wolf wrote: > Am 08.10.2018 um 16:38 hat Anton Nefedov geschrieben: >> On 4/10/2018 6:33 PM, Kevin Wolf wrote: >>> Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- hw/ide/core.c

[Qemu-devel] [PATCH] .travis.yml: split MacOSX builds and reduce target list

2018-10-08 Thread Alex Bennée
We have reached the point where the MacOSX build was regularly timing out. So as before I've reduced the target list to "major" architectures to try and bring the build time down. I've added an additional MacOSX build with the latest XCode with a minimal list of "most likely" targets on MacOS.

Re: [Qemu-devel] [PATCH 0/2] linux-user: usbfs improvements

2018-10-08 Thread Cortland Setlow Tölva
On Sun, Oct 7, 2018 at 11:59 PM Laurent Vivier wrote: > > Le 08/10/2018 à 06:27, Cortland Tölva a écrit : > > From: Cortland Setlow Tölva > > > > This patch series enables programs running under QEMU Linux user mode > > emulation to implement user-space USB drivers via the USBFS ioctl()s. > >

Re: [Qemu-devel] [PULL 00/15] s390x updates

2018-10-08 Thread David Hildenbrand
On 08/10/2018 17:02, Alex Bennée wrote: > > Peter Maydell writes: > >> On 4 October 2018 at 16:28, Cornelia Huck wrote: >>> The following changes since commit dafd95053611aa14dda40266857608d12ddce658: >>> >>> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into >>> staging

Re: [Qemu-devel] [PATCH 0/7] qcow2 check improvements

2018-10-08 Thread Vladimir Sementsov-Ogievskiy
ping Hi, what about this? 17.08.2018 15:22, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > v2: > 02, 06: check bdrv_getlength error return code > > v1: > > We've faced the following problem: after host fs corruption, vm images > becomes invalid. And which is interesting, starting qemu-img

[Qemu-devel] [PATCH v3 11/12] hw/mips: Add Data Scratch Pad RAM

2018-10-08 Thread Aleksandar Markovic
From: Yongbok Kim The optional Data Scratch Pad RAM (DSPRAM) block provides a general scratch pad RAM used for temporary storage of data. The DSPRAM provides a connection to on-chip memory or memory-mapped registers, which are accessed in parallel with the L1 data cache to minimize access

[Qemu-devel] [PATCH v3 07/12] target/mips: Implement emulation of nanoMIPS EVA instructions

2018-10-08 Thread Aleksandar Markovic
From: Dimitrije Nikolic Implement emulation of nanoMIPS EVA instructions. They are all part of P.LS.E0 instruction pool, or one of its subpools. Signed-off-by: Dimitrije Nikolic Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 79

[Qemu-devel] [PATCH v3 10/12] hw/mips: Update ITU to utilise SAARI/SAAR registers

2018-10-08 Thread Aleksandar Markovic
From: Yongbok Kim Update the ITU to utilise SAARI/SAAR registers and add new ITU Control Register (ICR0). Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- hw/mips/cps.c | 8 ++ hw/misc/mips_itu.c | 72 +-

[Qemu-devel] [PATCH v3 02/12] elf: Add MIPS_ABI_FP_XXX constants

2018-10-08 Thread Aleksandar Markovic
From: Stefan Markovic Add MIPS_ABI_FP_XXX constants to elf.h. The source of information is kernel header arch/mips/include/asm/elf.h. Signed-off-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- include/elf.h | 8 1 file changed, 8 insertions(+) diff --git a/include/elf.h

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Kevin Wolf
Am 08.10.2018 um 16:38 hat Anton Nefedov geschrieben: > On 4/10/2018 6:33 PM, Kevin Wolf wrote: > > Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: > >> Signed-off-by: Anton Nefedov > >> Reviewed-by: Alberto Garcia > >> --- > >> hw/ide/core.c | 12 > >> 1 file changed, 12

[Qemu-devel] [PATCH v3 09/12] target/mips: Implement MemoryMapID, SAARI, and SAAR registers

2018-10-08 Thread Aleksandar Markovic
From: Yongbok Kim SAARI (Special Address Access Register Index) provides an index into the SAAR register to indicate whether the ITU or other block is being accessed. SAAR (Special Address Access Register) stores the base address where the ITU will be located, as well as the block size.

[Qemu-devel] [PATCH v3 04/12] target/mips: Add bit definitions for DSP R3 ASE

2018-10-08 Thread Aleksandar Markovic
From: Stefan Markovic Add DSP R3 ASE related bit definition for insn_flags and hflags. Reviewed-by: Aleksandar Markovic Signed-off-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- target/mips/cpu.h | 1 + target/mips/mips-defs.h | 1 + 2 files changed, 2 insertions(+) diff

Re: [Qemu-devel] [PULL 00/15] s390x updates

2018-10-08 Thread Alex Bennée
Peter Maydell writes: > On 4 October 2018 at 16:28, Cornelia Huck wrote: >> The following changes since commit dafd95053611aa14dda40266857608d12ddce658: >> >> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into >> staging (2018-10-02 18:27:18 +0100) >> >> are available in

[Qemu-devel] [PATCH v3 08/12] target/mips: Extend WatchHi registers

2018-10-08 Thread Aleksandar Markovic
From: Yongbok Kim WatchHi is extended by the field MemoryMapID with the GINVT instruction. The field is accessible by MTHC0/MFHC0 in 32-bit architectures and DMTC0/DMFC0 in 64-bit architectures. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/cpu.h | 2 +-

[Qemu-devel] [PATCH v3 03/12] elf: Add Mips_elf_abiflags_v0 structure

2018-10-08 Thread Aleksandar Markovic
From: Stefan Markovic Add Mips_elf_abiflags_v0 structure to elf.h. The source of information is kernel header arch/mips/include/asm/elf.h. Signed-off-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- include/elf.h | 15 +++ 1 file changed, 15 insertions(+) diff --git

[Qemu-devel] [PATCH v3 12/12] target/mips: Add I6500 core configuration

2018-10-08 Thread Aleksandar Markovic
From: Yongbok Kim Add I6500 core configuration. Note that this configuration is supported only by best-effort due to lack of certain features in QEMU. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/translate_init.inc.c | 43

[Qemu-devel] [PATCH v3 05/12] target/mips: Add availability control for DSP R3 ASE

2018-10-08 Thread Aleksandar Markovic
From: Stefan Markovic Add infrastructure for availability control for DSP R3 ASE MIPS instructions. Only BPOSGE32C currently belongs to DSP R3 ASE, but this is likely to be changed in near future. Reviewed-by: Aleksandar Markovic Signed-off-by: Stefan Markovic Signed-off-by: Aleksandar

[Qemu-devel] [PATCH v3 06/12] target/mips: Add opcodes for nanoMIPS EVA instructions

2018-10-08 Thread Aleksandar Markovic
From: Dimitrije Nikolic Add opcodes for nanoMIPS EVA instructions: CACHEE, LBE, LBUE, LHE, LHUE, LLE, LLWPE, LWE, PREFE, SBE, SCE, SCWPE, SHE, SWE. Signed-off-by: Dimitrije Nikolic Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 34 ++ 1 file

[Qemu-devel] [PATCH v3 01/12] elf: Fix PT_MIPS_XXX constants

2018-10-08 Thread Aleksandar Markovic
From: Stefan Markovic Fix existing and add missing PT_MIPS_XXX constants in elf.h. This is copied from kernel header arch/mips/include/asm/elf.h. Signed-off-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- include/elf.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Tony Krowiak
On 10/08/2018 10:35 AM, Cornelia Huck wrote: On Mon, 8 Oct 2018 16:22:27 +0200 David Hildenbrand wrote: On 08/10/2018 16:20, Tony Krowiak wrote: On 09/27/2018 08:52 AM, Cornelia Huck wrote: On Thu, 27 Sep 2018 14:29:01 +0200 Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote:

[Qemu-devel] [PATCH v3 00/12] Misc MIPS fixes and improvements for October 2018

2018-10-08 Thread Aleksandar Markovic
From: Aleksandar Markovic This series contains support for MIPS ABI flags in elf.h, DSP R3 availability control, and emulation of nanoMIPS EVA instructions. MIPS ABI flags will be used in near future for linux user mode support for certain MIPS-specific parts of prctl() system call. This series

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Anton Nefedov
On 4/10/2018 6:33 PM, Kevin Wolf wrote: > Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: >> Signed-off-by: Anton Nefedov >> Reviewed-by: Alberto Garcia >> --- >> hw/ide/core.c | 12 >> 1 file changed, 12 insertions(+) >> >> diff --git a/hw/ide/core.c b/hw/ide/core.c >>

Re: [Qemu-devel] [PATCH v8 0/2] deprecate incorrect CPUs topolog

2018-10-08 Thread Eduardo Habkost
On Thu, Sep 13, 2018 at 01:06:00PM +0200, Igor Mammedov wrote: > Changelog since v7: > * drop repetitive sentence in deprication doc (Eric Blake > ) > Changelog since v5: > * add(v6) and then remove(v7) Notes section to/from deprication doc > (Eduardo Habkost ) > * fix up wording and

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Tony Krowiak
On 09/27/2018 08:52 AM, Cornelia Huck wrote: On Thu, 27 Sep 2018 14:29:01 +0200 Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak --- +typedef struct APBridge { +

Re: [Qemu-devel] [PATCH v4 6/8] scsi: account unmap operations

2018-10-08 Thread Anton Nefedov
On 4/10/2018 6:47 PM, Kevin Wolf wrote: > Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: >> Signed-off-by: Anton Nefedov >> Reviewed-by: Vladimir Sementsov-Ogievskiy >> Reviewed-by: Alberto Garcia >> --- >> hw/scsi/scsi-disk.c | 9 - >> 1 file changed, 8 insertions(+), 1

Re: [Qemu-devel] [PULL 00/33] target-arm queue

2018-10-08 Thread Peter Maydell
ing changes since commit 079911cb6e26898e16f5bb56ef4f9d33cf92d32d: > > Merge remote-tracking branch 'remotes/rth/tags/pull-fpu-20181005' into > staging (2018-10-08 12:44:35 +0100) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-tar

Re: [Qemu-devel] [PATCH V2 1/1] tests: Add migration test for aarch64

2018-10-08 Thread Philippe Mathieu-Daudé
On 04/10/2018 18:08, Wei Huang wrote: > This patch adds migration test support for aarch64. The test code, which > implements the same functionality as x86, is booted as a kernel in qemu. > Here are the design choices we make for aarch64: > > * We choose this -kernel approach because aarch64

Re: [Qemu-devel] [RFC 2/6] cputlb: do not evict invalid entries to the vtlb

2018-10-08 Thread Emilio G. Cota
On Sun, Oct 07, 2018 at 19:09:01 -0700, Richard Henderson wrote: > On 10/6/18 2:45 PM, Emilio G. Cota wrote: > > Currently we evict an entry to the victim TLB when it doesn't match > > the current address. But it could be that there's no match because > > the current entry is invalid. Do not evict

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Thomas Huth
On 2018-10-08 16:20, Tony Krowiak wrote: > On 09/27/2018 08:52 AM, Cornelia Huck wrote: >> On Thu, 27 Sep 2018 14:29:01 +0200 >> Thomas Huth wrote: >> >>> On 2018-09-27 00:54, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices.

[Qemu-devel] [PULL 01/33] target/arm: fix code comments error

2018-10-08 Thread Peter Maydell
From: Dongjiu Geng The parameter of kvm_arm_init_cpreg_list() is ARMCPU instead of CPUState, so correct the note to make it match the code. Signed-off-by: Dongjiu Geng Message-id: 1538069046-5757-1-git-send-email-gengdong...@huawei.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH v3 3/4] cputlb: serialize tlb updates with env->tlb_lock

2018-10-08 Thread Alex Bennée
Emilio G. Cota writes: > On Mon, Oct 08, 2018 at 14:57:18 +0100, Alex Bennée wrote: >> Emilio G. Cota writes: >> > The readers that do not hold tlb_lock must use atomic reads when >> > reading .addr_write, since this field can be updated by other threads; >> > the conversion to atomic reads

[Qemu-devel] [PULL 06/33] target/arm: Adjust sve_exception_el

2018-10-08 Thread Peter Maydell
From: Richard Henderson Check for EL3 before testing CPTR_EL3.EZ. Return 0 when the exception should be routed via AdvSIMDFPAccessTrap. Mirror the structure of CheckSVEEnabled more closely. Fixes: 5be5e8eda78 Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard

Re: [Qemu-devel] [RFC PATCH 00/21] Trace updates and plugin RFC

2018-10-08 Thread Alex Bennée
Emilio G. Cota writes: > On Mon, Oct 08, 2018 at 11:28:38 +0100, Alex Bennée wrote: >> Emilio G. Cota writes: >> > Again, for performance you'd avoid the tracepoint (i.e. calling >> > a helper to call another function) and embed directly the >> > callback from TCG. Same thing applies to TB's.

[Qemu-devel] [PULL 07/33] target/arm: Pass in current_el to fp and sve_exception_el

2018-10-08 Thread Peter Maydell
From: Richard Henderson We are going to want to determine whether sve is enabled for EL other than current. Tested-by: Laurent Desnogues Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20181005175350.30752-4-richard.hender...@linaro.org Signed-off-by: Peter Maydell

[Qemu-devel] [PULL 27/33] target/arm: Add v8M stack checks for LDRD/STRD (imm)

2018-10-08 Thread Peter Maydell
Add the v8M stack checks for: * LDRD (immediate) * STRD (immediate) Loads and stores are more complicated than ADD/SUB/MOV, because we must ensure that memory accesses below the stack limit are not performed, so we can't simply do the check when we actually update SP. For these instructions,

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Cornelia Huck
On Mon, 8 Oct 2018 16:22:27 +0200 David Hildenbrand wrote: > On 08/10/2018 16:20, Tony Krowiak wrote: > > On 09/27/2018 08:52 AM, Cornelia Huck wrote: > >> On Thu, 27 Sep 2018 14:29:01 +0200 > >> Thomas Huth wrote: > >> > >>> On 2018-09-27 00:54, Tony Krowiak wrote: > From: Tony

[Qemu-devel] [PULL 30/33] target/arm: Add v8M stack checks for Thumb push/pop

2018-10-08 Thread Peter Maydell
Add v8M stack checks for the 16-bit Thumb push/pop encodings: STMDB, STMFD, LDM, LDMIA, LDMFD. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20181002163556.10279-12-peter.mayd...@linaro.org --- target/arm/translate.c | 16

Re: [Qemu-devel] [PATCH v1 00/12] arm: Add first models of Xilinx Versal SoC

2018-10-08 Thread Peter Maydell
On 3 October 2018 at 16:07, Edgar E. Iglesias wrote: > In QEMU we'd like to have a virtual developer board with the Versal SoC > and a selected set of peripherals under the control of QEMU. > We'd like to gradually extend this board as QEMU gains more support > for Versal hardware components.

Re: [Qemu-devel] [PATCH v2 6/7] target/mips: Add opcodes for nanoMIPS EVA instructions

2018-10-08 Thread Aleksandar Markovic
> From: Dimitrije Nikolic > > Add opcodes for nanoMIPS EVA instructions: CACHEE, LBE, LBUE, LHE, LHUE, LLE, LLWPE, LWE, PREFE, SBE, SCE, SCWPE, SHE, SWE. > > Signed-off-by: Aleksandar Markovic This patch is incomplete. The pool P.LS.E0 has three subpools, and, for each of them,

[Qemu-devel] [PULL 33/33] hw/display/bcm2835_fb: Silence Coverity warning about multiply overflow

2018-10-08 Thread Peter Maydell
Coverity complains (CID 1395628) that the multiply in the calculation of the framebuffer base is performed as 32x32 but then used in a context that takes a 64-bit hwaddr. This can't actually ever overflow the 32-bit result, because of the constraints placed on the s->config values in

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread David Hildenbrand
On 08/10/2018 16:20, Tony Krowiak wrote: > On 09/27/2018 08:52 AM, Cornelia Huck wrote: >> On Thu, 27 Sep 2018 14:29:01 +0200 >> Thomas Huth wrote: >> >>> On 2018-09-27 00:54, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices.

Re: [Qemu-devel] [PATCH v4 18/24] qdev: hotplug: provide do_unplug handler

2018-10-08 Thread Igor Mammedov
On Mon, 8 Oct 2018 14:41:50 +0200 David Hildenbrand wrote: > On 08/10/2018 14:19, Igor Mammedov wrote: > > On Mon, 8 Oct 2018 13:47:53 +0200 > > David Hildenbrand wrote: > > > >>> That way using [2] and [1 - modulo it should match only concrete type] > >>> machine would be able to override

<    1   2   3   >