[PATCH-for-5.1 0/2] fuzz: broken build fixes

2020-07-08 Thread Alexander Bulekov
Hi, These fix build-breaking problems with --enable-fuzzing The first patch prevents --enable-fuzzing from overwriting CFLAGS. The second patch adds a missing header to fuzz.c -Alex Alexander Bulekov (2): configure: do not clobber CFLAGS with --enable-fuzzing fuzz: add missing header for rcu_e

[PATCH-for-5.1 1/2] configure: do not clobber CFLAGS with --enable-fuzzing

2020-07-08 Thread Alexander Bulekov
When configuring with --enable-fuzzing, we overwrote the CFLAGS added by all the preceding checks. Instead of overwriting CFLAGS, append the ones we need. Fixes: adc28027ff ("fuzz: add configure flag --enable-fuzzing") Reported-by: Li Qiang Signed-off-by: Alexander Bulekov --- configure | 2 +-

[PATCH-for-5.1 2/2] fuzz: add missing header for rcu_enable_atfork

2020-07-08 Thread Alexander Bulekov
In 45222b9a90, I fixed a broken check for rcu_enable_atfork introduced in d6919e4cb6. I added a call to rcu_enable_atfork after the call to qemu_init in fuzz.c, but forgot to include the corresponding header, breaking --enable-fuzzing --enable-werror builds. Fixes: 45222b9a90 ("fuzz: fix broken qt

Re: build error of unused function as MACRO G_DEFINE_AUTOPTR_CLEANUP_FUNC expand

2020-07-08 Thread Alexander Bulekov
On 200708 1523, Alexander Bulekov wrote: > > Looks like I forgot a header... I'll send fixes for both of these > issues. Hi Li, I just CCed you on the series. Since, I was not able to reproduce the GLib error, I would appreciate if you can check whether the change to the ./configure script (patch

Re: [PATCH] ossaudio: fix out of bounds write

2020-07-08 Thread Volker Rümelin
> On 7/7/20 8:08 PM, Volker Rümelin wrote: >> In function oss_read() a read error currently does not exit the >> read loop. With no data to read the variable pos will quickly >> underflow and a subsequent successful read overwrites memory >> outside the buffer. This patch adds the missing break sta

Re: [PATCH] cpu: Add starts_halted() method

2020-07-08 Thread Peter Maydell
On Wed, 8 Jul 2020 at 18:36, Eduardo Habkost wrote: > > On Wed, Jul 08, 2020 at 06:09:49PM +0100, Peter Maydell wrote: > > Exactly. It appears that there's a bug in our mechanisms, > > which is why I'm suggesting that the right thing is > > to fix that bug rather than marking the CPU as halted > >

Re: [PULL 00/20] Audio 20200706 patches

2020-07-08 Thread Peter Maydell
On Mon, 6 Jul 2020 at 20:31, Gerd Hoffmann wrote: > > The following changes since commit eb6490f544388dd24c0d054a96dd304bc7284450: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20200703' into staging (2020-07-04 > 16:08:41 +0100) > > are available in the Git reposit

RE: [PATCH v7 1/4] hw/net/can: Introduce Xilinx ZynqMP CAN controller

2020-07-08 Thread Vikram Garhwal
Hi Edgar, Thanks for reviewing the patch. Please see some comments. > -Original Message- > From: Edgar E. Iglesias > Sent: Tuesday, July 7, 2020 5:49 AM > To: Vikram Garhwal > Cc: qemu-devel@nongnu.org; Francisco Eduardo Iglesias > ; Jason Wang ; Alistair > Francis ; Peter Maydell > ; op

Re: [PATCH v3 01/18] hw/block/nvme: bump spec data structures to v1.3

2020-07-08 Thread Klaus Jensen
On Jul 8 19:19, Dmitry Fomichev wrote: > Looks good with a small nit (see below), > > Reviewed-by: Dmitry Fomichev > > > > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > > +#define NVME_TEMP_TMPTH(temp) ((temp >> 0) & 0x) > > There is an extra space after temp >> > Good catch

[PULL v2 09/52] target/i386: fix IEEE SSE floating-point exception raising

2020-07-08 Thread Paolo Bonzini
From: Joseph Myers The SSE instruction implementations all fail to raise the expected IEEE floating-point exceptions because they do nothing to convert the exception state from the softfloat machinery into the exception flags in MXCSR. Fix this by adding such conversions. Unlike for x87, emulat

[PULL v2 52/52] apic: Report current_count via 'info lapic'

2020-07-08 Thread Paolo Bonzini
From: Jan Kiszka This is helpful when debugging stuck guest timers. As we need apic_get_current_count for that, and it is really not emulation specific, move it to apic_common.c and export it. Fix its style at this chance as well. Signed-off-by: Jan Kiszka Reviewed-by: Philippe Mathieu-Daudé

[PULL 02/53] error: Improve error.h's big comment

2020-07-08 Thread Markus Armbruster
Add headlines to the big comment. Explain examples for NULL, &error_abort and &error_fatal argument better. Tweak rationale for error_propagate_prepend(). Signed-off-by: Markus Armbruster Message-Id: <20200707160613.848843-3-arm...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Greg Kurz --

[PULL 50/53] fw_cfg: Use ERRP_GUARD()

2020-07-08 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp d

Re: [PATCH] cpu: Add starts_halted() method

2020-07-08 Thread Eduardo Habkost
On Wed, Jul 08, 2020 at 02:14:03PM +0100, Peter Maydell wrote: > On Wed, 8 Jul 2020 at 12:12, David Gibson wrote: > > On Wed, Jul 08, 2020 at 10:38:29AM +0200, Philippe Mathieu-Daudé wrote: > > > Class boolean field certainly sounds better, but I am not sure this > > > is a property of the machin

[PULL v2 44/52] accel/kvm: Simplify kvm_check_extension()

2020-07-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé In previous commit we let kvm_check_extension() use the global kvm_state. Since the KVMState* argument is now unused, drop it. Convert callers with this Coccinelle script: @@ expression kvm_state, extension; @@ - kvm_check_extension(kvm_state, extension)

[PULL v2 00/52] Misc patches for QEMU 5.1 soft freeze

2020-07-08 Thread Paolo Bonzini
The following changes since commit eb2c66b10efd2b914b56b20ae90655914310c925: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-07-06' into staging (2020-07-07 19:47:26 +0100) are available in the Git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for y

[PULL 06/53] virtio-crypto-pci: Tidy up virtio_crypto_pci_realize()

2020-07-08 Thread Markus Armbruster
virtio_crypto_pci_realize() continues after realization of its "virtio-crypto-device" fails. Only an object_property_set_link() follows; looks harmless to me. Tidy up anyway: return after failure, just like virtio_rng_pci_realize() does. Cc: "Gonglei (Arei)" Cc: Michael S. Tsirkin Signed-off-b

[PULL 38/53] block/parallels: Simplify parallels_open() after previous commit

2020-07-08 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-39-arm...@redhat.com> --- block/parallels.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/block/parallels.c b/block/parallels.c inde

[PULL 07/53] qemu-option: Check return value instead of @err where convenient

2020-07-08 Thread Markus Armbruster
Convert uses like opts = qemu_opts_create(..., &err); if (err) { ... } to opts = qemu_opts_create(..., errp); if (!opts) { ... } Eliminate error_propagate() that are now unnecessary. Delete @err that are now unused. Note that we can't drop parallels_ope

[PULL 41/53] qapi: Purge error_propagate() from QAPI core

2020-07-08 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20200707160613.848843-42-arm...@redhat.com> --- qapi/qapi-visit-core.c | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-cor

[PULL 04/53] qdev: Use returned bool to check for qdev_realize() etc. failure

2020-07-08 Thread Markus Armbruster
Convert foo(..., &err); if (err) { ... } to if (!foo(..., &err)) { ... } for qdev_realize(), qdev_realize_and_unref(), qbus_realize() and their wrappers isa_realize_and_unref(), pci_realize_and_unref(), sysbus_realize(), sysbus_realize_and_unref(), usb_realiz

[PULL 32/53] qdev: Use returned bool to check for failure, Coccinelle part

2020-07-08 Thread Markus Armbruster
The previous commit enables conversion of qdev_prop_set_drive_err(..., &err); if (err) { ... } to if (!qdev_prop_set_drive_err(..., errp)) { ... } Coccinelle script: @@ identifier fun = qdev_prop_set_drive_err; expression list args; typedef Error;

[PULL 08/53] qemu-option: Make uses of find_desc_by_name() more similar

2020-07-08 Thread Markus Armbruster
This is to make the next commit easier to review. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Message-Id: <20200707160613.848843-9-arm...@redhat.com> --- util/qemu-option.c | 32 ++-- 1 f

[PULL 35/53] error: Eliminate error_propagate() with Coccinelle, part 2

2020-07-08 Thread Markus Armbruster
When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away. The previous commit did that with a Coccinelle script I consider fairly trustworthy. This commit uses the same script with the matching of return taken

[PULL 52/53] nbd: Use ERRP_GUARD()

2020-07-08 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp d

[PULL 27/53] qom: Make functions taking Error ** return bool, not void

2020-07-08 Thread Markus Armbruster
See recent commit "error: Document Error API usage rules" for rationale. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-28-arm...@redhat.com> --- include/qom/object.h| 42 ++ include/

[PULL 24/53] qom: Don't handle impossible object_property_get_link() failure

2020-07-08 Thread Markus Armbruster
Don't handle object_property_get_link() failure that can't happen unless the programmer screwed up, pass &error_abort. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200707160613.848843-25-arm...@redhat.com> --- hw/arm/bcm2835_periph

[PULL 09/53] qemu-option: Factor out helper find_default_by_name()

2020-07-08 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Message-Id: <20200707160613.848843-10-arm...@redhat.com> --- util/qemu-option.c | 47 ++ 1 file changed, 27 insertions(+), 20 de

[PULL 46/53] error: New macro ERRP_GUARD()

2020-07-08 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Introduce a new ERRP_GUARD() macro, to be used at start of functions with an errp OUT parameter. It has three goals: 1. Fix issue with error_fatal and error_prepend/error_append_hint: the user can't see this additional information, because exit() happens in er

[PULL 19/53] qapi: Use returned bool to check for failure, manual part

2020-07-08 Thread Markus Armbruster
The previous commit used Coccinelle to convert from checking the Error object to checking the return value. Convert a few more manually. Also tweak control flow in places to conform to the conventional "if error bail out" pattern. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewe

[PULL 47/53] scripts: Coccinelle script to use ERRP_GUARD()

2020-07-08 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Script adds ERRP_GUARD() macro invocations where appropriate and does corresponding changes in code (look for details in include/qapi/error.h) Usage example: spatch --sp-file scripts/coccinelle/errp-guard.cocci \ --macro-file scripts/cocci-macro-file.h --in-pl

[PULL 51/53] virtio-9p: Use ERRP_GUARD()

2020-07-08 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp d

[PULL 25/53] qom: Use return values to check for error where that's simpler

2020-07-08 Thread Markus Armbruster
When using the Error object to check for error, we need to receive it into a local variable, then propagate() it to @errp. Using the return value permits allows receiving it straight to @errp. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Me

[PULL 05/53] macio: Tidy up error handling in macio_newworld_realize()

2020-07-08 Thread Markus Armbruster
macio_newworld_realize() effectively ignores ns->gpio realization errors, leaking the Error object. Fortunately, macio_gpio_realize() can't actually fail. Tidy up. Cc: Mark Cave-Ayland Cc: David Gibson Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: David Gibson Reviewed-

[PULL 44/53] qdev: Ignore Error objects where the return value suffices

2020-07-08 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20200707160613.848843-45-arm...@redhat.com> --- hw/core/qdev-properties.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 2bec8a80b8..098298c7

[PULL 45/53] hmp: Ignore Error objects where the return value suffices

2020-07-08 Thread Markus Armbruster
qdev_print_props() receives and throws away Error objects just to check for object_property_get_str() and object_property_print() failure. Unnecessary, both return suitable values, so use those instead. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20200707160613.848843-

[PULL 33/53] error: Avoid unnecessary error_propagate() after error_setg()

2020-07-08 Thread Markus Armbruster
Replace error_setg(&err, ...); error_propagate(errp, err); by error_setg(errp, ...); Related pattern: if (...) { error_setg(&err, ...); goto out; } ... out: error_propagate(errp, err); return; When all paths to label out are that way, replace b

[PULL 42/53] error: Avoid error_propagate() after migrate_add_blocker()

2020-07-08 Thread Markus Armbruster
When migrate_add_blocker(blocker, &errp) is followed by error_propagate(errp, err), we can often just as well do migrate_add_blocker(..., errp). Do that with this Coccinelle script: @@ expression blocker, err, errp; expression ret; @@ -ret = migrate_add_blocker(blocker, &e

[PULL 28/53] qom: Use returned bool to check for failure, Coccinelle part

2020-07-08 Thread Markus Armbruster
The previous commit enables conversion of foo(..., &err); if (err) { ... } to if (!foo(..., errp)) { ... } for QOM functions that now return true / false on success / error. Coccinelle script: @@ identifier fun = { object_apply_global_props,

Re: Slow down with: 'Make "info qom-tree" show children sorted'

2020-07-08 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Jul 07, 2020 at 06:45:57AM +0200, Thomas Huth wrote: >> On 27/05/2020 10.47, Markus Armbruster wrote: >> > "info qom-tree" prints children in unstable order. This is a pain >> > when diffing output for different versions to find change. Print it >> > sorted.

[PULL 11/53] qemu-option: Factor out helper opt_create()

2020-07-08 Thread Markus Armbruster
There is just one use so far. The next commit will add more. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-12-arm...@redhat.com> --- util/qemu-option.c | 27 ++- 1 file changed, 18

[PULL 22/53] qom: Rename qdev_get_type() to object_get_type()

2020-07-08 Thread Markus Armbruster
Commit 2f262e06f0 lifted qdev_get_type() from qdev to object without renaming it accordingly. Do that now. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-23-arm...@redhat

[PULL 43/53] qemu-img: Ignore Error objects where the return value suffices

2020-07-08 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20200707160613.848843-44-arm...@redhat.com> --- qemu-img.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index fc405ee171..a6af0eaf80 100644 --- a/qemu-img.c +++ b/qemu-img

[PULL 40/53] qapi: Smooth visitor error checking in generated code

2020-07-08 Thread Markus Armbruster
Use visitor functions' return values to check for failure. Eliminate error_propagate() that are now unnecessary. Delete @err that are now unused. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20200707160613.848843-41-arm...@redhat.com> --- docs/devel/qapi-code-gen.txt

Re: [PATCH 2/2] x86/cpu: Handle GUEST_MAXPHYADDR < HOST_MAXPHYADDR for hosts that don't support it

2020-07-08 Thread Daniel P . Berrangé
On Wed, Jul 08, 2020 at 01:16:21PM -0400, Eduardo Habkost wrote: > (CCing libvir-list, and people who were included in the OVMF > thread[1]) > > [1] > https://lore.kernel.org/qemu-devel/99779e9c-f05f-501b-b4be-ff719f140...@canonical.com/ > > On Fri, Jun 19, 2020 at 05:53:44PM +0200, Mohammed Gam

[PULL 16/53] hmp: Eliminate a variable in hmp_migrate_set_parameter()

2020-07-08 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-17-arm...@redhat.com> --- monitor/hmp-cmds.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c

[PULL 53/53] xen: Use ERRP_GUARD()

2020-07-08 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp d

[PULL 31/53] qdev: Make functions taking Error ** return bool, not void

2020-07-08 Thread Markus Armbruster
See recent commit "error: Document Error API usage rules" for rationale. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-32-arm...@redhat.com> --- include/hw/qdev-properties.h | 4 ++-- hw/core/qdev-prope

[PULL 30/53] qom: Make functions taking Error ** return bool, not 0/-1

2020-07-08 Thread Markus Armbruster
Just for consistency. Also fix the example in object_set_props()'s documentation. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-31-arm...@redhat.com> --- include/qom/object.h | 28 +++--

[PULL 18/53] qapi: Use returned bool to check for failure, Coccinelle part

2020-07-08 Thread Markus Armbruster
The previous commit enables conversion of visit_foo(..., &err); if (err) { ... } to if (!visit_foo(..., errp)) { ... } for visitor functions that now return true / false on success / error. Coccinelle script: @@ identifier fun =~ "check_list|input_t

[PULL 12/53] qemu-option: Replace opt_set() by cleaner opt_validate()

2020-07-08 Thread Markus Armbruster
opt_set() frees its argument @value on failure. Slightly unclean; functions ideally do nothing on failure. To tidy this up, move opt_create() from opt_set() into its callers, along with the cleanup. Rename opt_set() to opt_validate(), noting its similarity to qemu_opts_validate(). Drop redundan

[PULL 23/53] qom: Crash more nicely on object_property_get_link() failure

2020-07-08 Thread Markus Armbruster
Pass &error_abort instead of NULL where the returned value is dereferenced or asserted to be non-null. Drop a now redundant assertion. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-24-arm...@redhat.com> ---

[PULL 49/53] pflash: Use ERRP_GUARD()

2020-07-08 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp d

[PULL 13/53] qemu-option: Make functions taking Error ** return bool, not void

2020-07-08 Thread Markus Armbruster
See recent commit "error: Document Error API usage rules" for rationale. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-14-arm...@redhat.com> --- include/qemu/option.h | 16 blockdev.c|

[PULL 10/53] qemu-option: Simplify around find_default_by_name()

2020-07-08 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-11-arm...@redhat.com> Reviewed-by: Greg Kurz --- util/qemu-option.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/util

Re: Failure prints during format or mounting a usb storage device

2020-07-08 Thread Gerd Hoffmann
Hi, > IIRC, without the dev-storage patch, the very first SCSI command > would get stuck waiting for the CSW, because the CSW is not a > multiple of MPS. I will have to work on getting a debug trace for > you, I'll get back to you with that. Hmm, dev-storage should be fine with the packet being

[PULL 00/53] Error reporting patches patches for 2020-07-07

2020-07-08 Thread Markus Armbruster
The following changes since commit c8eaf81fd22638691c5bdcc7d723d31fbb80ff6f: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-07-07 17:37:44 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-error-2020-07-07 for you to

[PULL 17/53] qapi: Make visitor functions taking Error ** return bool, not void

2020-07-08 Thread Markus Armbruster
See recent commit "error: Document Error API usage rules" for rationale. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-18-arm...@redhat.com> --- docs/devel/qapi-code-gen.txt | 51 +-- include/qapi

Re: 回复: [PATCH v2 3/3] scsi-disk: Add support for the GET LBA STATUS 16 command

2020-07-08 Thread Stefan Hajnoczi
On Mon, Jun 29, 2020 at 09:18:59AM +, Lin Ma wrote: > > > > -邮件原件- > > 发件人: Stefan Hajnoczi > > 发送时间: 2020年6月22日 20:14 > > 收件人: Lin Ma > > 抄送: qemu-devel@nongnu.org; f...@euphon.net; kw...@redhat.com; > > mre...@redhat.com; pbonz...@redhat.com > > 主题: Re: [PATCH v2 3/3] scsi-disk: A

[PULL 36/53] error: Eliminate error_propagate() manually

2020-07-08 Thread Markus Armbruster
When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away. The previous two commits did that for sufficiently simple cases with Coccinelle. Do it for several more manually. Signed-off-by: Markus Armbruster Rev

[PULL 39/53] qapi: Smooth another visitor error checking pattern

2020-07-08 Thread Markus Armbruster
Convert visit_type_FOO(v, ..., &ptr, &err); ... if (err) { ... } to visit_type_FOO(v, ..., &ptr, errp); ... if (!ptr) { ... } for functions that set @ptr to non-null / null on success / error. Eliminate error_propagate() that are now unnecessary.

Re: [PATCH v7 00/47] block: Deal with filters

2020-07-08 Thread Eric Blake
On 7/8/20 12:20 PM, Andrey Shinkevich wrote: On 25.06.2020 18:21, Max Reitz wrote: v6: https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg01715.html Branch: https://github.com/XanClic/qemu.git child-access-functions-v7 Branch: https://git.xanclic.moe/XanClic/qemu.git child-access-fun

Re: [PATCH 3/3] cpu-timers, icount: new modules

2020-07-08 Thread Paolo Bonzini
On 29/06/20 11:35, Claudio Fontana wrote: > refactoring of cpus.c continues with cpu timer state extraction. > > cpu-timers: responsible for the cpu timers state, and for access to > cpu clocks and ticks. > > icount: counts the TCG instructions executed. As such it is specific to > the TCG accele

[PULL 03/53] error: Document Error API usage rules

2020-07-08 Thread Markus Armbruster
This merely codifies existing practice, with one exception: the rule advising against returning void, where existing practice is mixed. When the Error API was created, we adopted the (unwritten) rule to return void when the function returns no useful value on success, unlike GError, which recommen

Re: [PATCH] cpu: Add starts_halted() method

2020-07-08 Thread Eduardo Habkost
On Wed, Jul 08, 2020 at 09:11:55PM +0100, Peter Maydell wrote: > On Wed, 8 Jul 2020 at 18:36, Eduardo Habkost wrote: > > > > On Wed, Jul 08, 2020 at 06:09:49PM +0100, Peter Maydell wrote: > > > Exactly. It appears that there's a bug in our mechanisms, > > > which is why I'm suggesting that the rig

[PULL 01/53] error: Fix examples in error.h's big comment

2020-07-08 Thread Markus Armbruster
Mark a bad example more clearly. Fix the error_propagate_prepend() example. Add a missing declaration and a second error pileup example. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Message-Id: <20200707160613.84884

[PULL 15/53] block: Avoid error accumulation in bdrv_img_create()

2020-07-08 Thread Markus Armbruster
When creating an image fails because the format doesn't support option "backing_file" or "backing_fmt", bdrv_img_create() first has qemu_opt_set() put a generic error into @local_err, then puts the real error into @errp with error_setg(), and then propagates the former to the latter, which throws a

[PATCH v1] virtio-mem-pci: force virtio version 1

2020-07-08 Thread David Hildenbrand
Let's force virtio version 1. While at it, use qdev_realize() to set the parent bus and realize - like most other virtio-*-pci implementations. Fixes: 0b9a2443a48b ("virtio-pci: Proxy for virtio-mem") Cc: Cornelia Huck Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- hw/virtio/vir

[PULL 48/53] sd: Use ERRP_GUARD()

2020-07-08 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy If we want to check error after errp-function call, we need to introduce local_err and then propagate it to errp. Instead, use the ERRP_GUARD() macro, benefits are: 1. No need of explicit error_propagate call 2. No need of explicit local_err variable: use errp d

[PULL 20/53] s390x/pci: Fix harmless mistake in zpci's property fid's setter

2020-07-08 Thread Markus Armbruster
s390_pci_set_fid() sets zpci->fid_defined to true even when visit_type_uint32() failed. Reproducer: "-device zpci,fid=junk". Harmless in practice, because qdev_device_add() then fails, throwing away @zpci. Fix it anyway. Cc: Matthew Rosato Cc: Cornelia Huck Signed-off-by: Markus Armbruster Re

Re: [PATCH v2] MAINTAINERS: Cover the firmware JSON schema

2020-07-08 Thread Michael S. Tsirkin
On Wed, Jul 08, 2020 at 10:57:31AM +0200, Philippe Mathieu-Daudé wrote: > +qemu-trivial > > On 7/8/20 8:45 AM, Michael S. Tsirkin wrote: > > On Fri, Jul 03, 2020 at 08:34:50PM +0200, Philippe Mathieu-Daudé wrote: > >> Add an entry to cover firmware.json (see commit 3a0adfc9bf: > >> schema that

[PULL 37/53] error: Reduce unnecessary error propagation

2020-07-08 Thread Markus Armbruster
When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away, even when we need to keep error_propagate() for other error paths. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20200707160613

Re: Migrating custom qemu.org infrastructure to GitLab

2020-07-08 Thread Daniel P . Berrangé
On Wed, Jul 08, 2020 at 01:17:11PM +0200, Paolo Bonzini wrote: > On 08/07/20 12:53, Daniel P. Berrangé wrote: > > Consider if qemu-web.git is hosted on gitlab, using GitLab CI to > > generate the static site content, and GitLab pages to host the > > website. If a user wants to contribute to qemu-we

Re: Migrating custom qemu.org infrastructure to GitLab

2020-07-08 Thread Daniel P . Berrangé
On Wed, Jul 08, 2020 at 03:19:08PM +0200, Philippe Mathieu-Daudé wrote: > On 7/8/20 1:48 PM, Thomas Huth wrote: > > On 08/07/2020 12.53, Daniel P. Berrangé wrote: > >> On Wed, Jul 08, 2020 at 10:52:38AM +0100, Stefan Hajnoczi wrote: > > [...] > >>> With this in mind I propose moving qemu.org infras

[PULL 21/53] qom: Use error_reportf_err() instead of g_printerr() in examples

2020-07-08 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-22-arm...@redhat.com> --- include/qom/object.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/qom/object.h b/include/qom/objec

Re: [PATCH v8 11/14] block/core: add generic infrastructure for x-blockdev-amend qmp command

2020-07-08 Thread Gerd Hoffmann
On Mon, Jun 08, 2020 at 12:40:27PM +0300, Maxim Levitsky wrote: > blockdev-amend will be used similiar to blockdev-create > to allow on the fly changes of the structure of the format based block > devices. This one breaks the build: In file included from /home/kraxel/projects/qemu/include/block

Re: Migrating custom qemu.org infrastructure to GitLab

2020-07-08 Thread Philippe Mathieu-Daudé
On 7/8/20 3:32 PM, Daniel P. Berrangé wrote: > On Wed, Jul 08, 2020 at 03:19:08PM +0200, Philippe Mathieu-Daudé wrote: >> On 7/8/20 1:48 PM, Thomas Huth wrote: >>> On 08/07/2020 12.53, Daniel P. Berrangé wrote: On Wed, Jul 08, 2020 at 10:52:38AM +0100, Stefan Hajnoczi wrote: >>> [...] > Wi

Re: [PATCH v2 1/1] scripts/performance: Add dissect.py script

2020-07-08 Thread Philippe Mathieu-Daudé
Hi Ahmed, On 7/2/20 4:29 PM, Ahmed Karaman wrote: > Python script that dissects QEMU execution into three main phases: > code generation, JIT execution and helpers execution. > > Syntax: > dissect.py [-h] -- [] \ > [] > > [-h] - Print the script arguments help message. > > Ex

[PULL 14/53] qemu-option: Use returned bool to check for failure

2020-07-08 Thread Markus Armbruster
The previous commit enables conversion of foo(..., &err); if (err) { ... } to if (!foo(..., &err)) { ... } for QemuOpts functions that now return true / false on success / error. Coccinelle script: @@ identifier fun = { opts_do_parse, parse_

Re: Qemu core dump when stop guest with virtio-blk(remote storage) and iothread

2020-07-08 Thread Kevin Wolf
Am 08.07.2020 um 06:07 hat 苏思婷 geschrieben: > Description of problem: > Qemu core dump when stop guest with virtio-blk(remote storage) and > iothread > > Version-Release number pf selected component (if applicable): > kernel version:4.19.36.bsk.9-amd64 > qemu-kvm version:QEMU em

[PULL 29/53] qom: Use returned bool to check for failure, manual part

2020-07-08 Thread Markus Armbruster
The previous commit used Coccinelle to convert from checking the Error object to checking the return value. Convert a few more manually. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200707160613.848843-30-arm...@redhat.com> -

Re: [PATCH] cpu: Add starts_halted() method

2020-07-08 Thread Eduardo Habkost
On Wed, Jul 08, 2020 at 06:09:49PM +0100, Peter Maydell wrote: > On Wed, 8 Jul 2020 at 17:03, Eduardo Habkost wrote: > > > > On Wed, Jul 08, 2020 at 04:32:51PM +0100, Peter Maydell wrote: > > > On Wed, 8 Jul 2020 at 16:25, Eduardo Habkost wrote: > > > > On Wed, Jul 08, 2020 at 02:14:03PM +0100, P

Re: [PATCH v7 00/47] block: Deal with filters

2020-07-08 Thread Eric Blake
On 7/8/20 2:46 PM, Andrey Shinkevich wrote: On 08.07.2020 20:32, Eric Blake wrote: On 7/8/20 12:20 PM, Andrey Shinkevich wrote: On 25.06.2020 18:21, Max Reitz wrote: v6: https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg01715.html Branch: https://github.com/XanClic/qemu.git child-

Re: Migrating custom qemu.org infrastructure to GitLab

2020-07-08 Thread Thomas Huth
On 08/07/2020 12.53, Daniel P. Berrangé wrote: > On Wed, Jul 08, 2020 at 10:52:38AM +0100, Stefan Hajnoczi wrote: [...] >> With this in mind I propose moving qemu.org infrastructure to GitLab >> incrementally. [...] FWIW, I think moving the QEMU infrastructure zoo to GitLab is a very good idea! D

Re: [PULL 05/34] virtio-iommu: Implement RESV_MEM probe request

2020-07-08 Thread Auger Eric
Hi Peter, On 7/5/20 8:21 PM, Peter Maydell wrote: > On Fri, 3 Jul 2020 at 17:54, Peter Maydell wrote: >> >> From: Eric Auger >> >> This patch implements the PROBE request. At the moment, >> only THE RESV_MEM property is handled. The first goal is >> to report iommu wide reserved regions such as

Re: build error of unused function as MACRO G_DEFINE_AUTOPTR_CLEANUP_FUNC expand

2020-07-08 Thread Philippe Mathieu-Daudé
On 7/8/20 9:23 PM, Alexander Bulekov wrote: > Hi Li, > I usually build the fuzzer with "make i386-softmmu/fuzz", so I must have > missed the nbd issue... I could not reproduce this locally since: > > alxndr@mozz:qemu(master)$ dpkg -l "*glib2.0-bin*" > Desired=Unknown/Install/Remove/Purge/Hold > |

Re: [PATCH] trivial: Remove trailing whitespaces

2020-07-08 Thread Daniel P . Berrangé
On Mon, Jul 06, 2020 at 09:31:21AM -0700, no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/20200706162300.1084753-1-dinec...@redhat.com/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Subject: [PATCH] tri

Re: [PULL 00/31] Block patches

2020-07-08 Thread Kevin Wolf
Am 08.07.2020 um 17:11 hat Maxim Levitsky geschrieben: > On Tue, 2020-07-07 at 21:40 +0100, Peter Maydell wrote: > > Applied, thanks. > > > > Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1 > > for any user-visible changes. > > Since this includes my luks patches, I guess I nee

Re: [PULL 00/53] Misc patches for QEMU 5.1 soft freeze

2020-07-08 Thread Paolo Bonzini
Il mer 8 lug 2020, 20:25 Claudio Fontana ha scritto: > What I did notice is that all the code that directly or indirectly uses > the functions is under an > > if (0) ( > ) > > since tcg_enabled is the constant 0. > > By "indirectly" I mean that the static void qemu_tcg_cpu_thread_fn() > function

[PATCH RFC 0/5] s390x: initial support for virtio-mem

2020-07-08 Thread David Hildenbrand
This wires up the initial, basic version of virito-mem for s390x. General information about virtio-mem can be found at [1] and in QEMU commit [2]. Patch #5 contains a short example for s390x. virtio-mem for x86-64 Linux is part of v5.8-rc1. A branch with a s390x prototype can be found at: g...

Re: [PATCH] cpu: Add starts_halted() method

2020-07-08 Thread Eduardo Habkost
On Wed, Jul 08, 2020 at 06:45:57PM +0200, Philippe Mathieu-Daudé wrote: > On 7/8/20 5:25 PM, Eduardo Habkost wrote: > > On Wed, Jul 08, 2020 at 02:14:03PM +0100, Peter Maydell wrote: > >> On Wed, 8 Jul 2020 at 12:12, David Gibson > >> wrote: > >>> On Wed, Jul 08, 2020 at 10:38:29AM +0200, Philip

[PATCH RFC 4/5] s390x: implement virtio-mem-ccw

2020-07-08 Thread David Hildenbrand
Add a proper CCW proxy device, similar to the PCI variant. Signed-off-by: David Hildenbrand --- hw/s390x/virtio-ccw-mem.c | 165 ++ hw/s390x/virtio-ccw.h | 13 +++ 2 files changed, 178 insertions(+) create mode 100644 hw/s390x/virtio-ccw-mem.c diff --gi

Re: [PATCH v4 05/12] hw/arm: Add NPCM730 and NPCM750 SoC models

2020-07-08 Thread Havard Skinnemoen
On Wed, Jul 8, 2020 at 11:13 AM Havard Skinnemoen wrote: > > On Wed, Jul 8, 2020 at 10:31 AM Philippe Mathieu-Daudé > wrote: > > > > On 7/7/20 8:47 PM, Havard Skinnemoen wrote: > > > +/* System Global Control Registers (GCR) */ > > > +object_property_set_int(OBJECT(&s->gcr), nc->disabled

Re: [PATCH v8 11/14] block/core: add generic infrastructure for x-blockdev-amend qmp command

2020-07-08 Thread Gerd Hoffmann
On Wed, Jul 08, 2020 at 04:06:45PM +0300, Maxim Levitsky wrote: > On Wed, 2020-07-08 at 14:33 +0200, Gerd Hoffmann wrote: > > On Mon, Jun 08, 2020 at 12:40:27PM +0300, Maxim Levitsky wrote: > > > blockdev-amend will be used similiar to blockdev-create > > > to allow on the fly changes of the struct

Re: 回复: [PATCH v2 3/3] scsi-disk: Add support for the GET LBA STATUS 16 command

2020-07-08 Thread Paolo Bonzini
On 08/07/20 14:29, Stefan Hajnoczi wrote: > Something similar is needed for GET_LBA_STATUS. Since there is no > bdrv_aio_block_status() you can create a coroutine instead of an aiocb: > > static void coroutine_fn scsi_co_block_status(void *opaque) > { > int ret; > > aio_context_ac

[PATCH RFC 3/5] s390x: prepare device memory address space

2020-07-08 Thread David Hildenbrand
Let's allocate the device memory information and setup the device memory address space. Expose the maximum ramsize via SCLP and the actual initial ramsize via diag260. Signed-off-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 43 ++ hw/s390x/sclp.c

Re: [PATCH v7 00/47] block: Deal with filters

2020-07-08 Thread Eric Blake
On 7/8/20 12:20 PM, Andrey Shinkevich wrote: On 25.06.2020 18:21, Max Reitz wrote: v6: https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg01715.html Branch: https://github.com/XanClic/qemu.git child-access-functions-v7 Branch: https://git.xanclic.moe/XanClic/qemu.git child-access-fun

Re: Migrating custom qemu.org infrastructure to GitLab

2020-07-08 Thread Daniel P . Berrangé
On Wed, Jul 08, 2020 at 10:52:38AM +0100, Stefan Hajnoczi wrote: > Dear QEMU community, > QEMU currently has a static website, wiki, git repo hosting, and > special-purpose cronjobs/containers running in VMs. There is currently > no system administrator looking after our infrastructure so the most

Re: [PATCH] cpu: Add starts_halted() method

2020-07-08 Thread Philippe Mathieu-Daudé
On 7/8/20 5:25 PM, Eduardo Habkost wrote: > On Wed, Jul 08, 2020 at 02:14:03PM +0100, Peter Maydell wrote: >> On Wed, 8 Jul 2020 at 12:12, David Gibson >> wrote: >>> On Wed, Jul 08, 2020 at 10:38:29AM +0200, Philippe Mathieu-Daudé wrote: Class boolean field certainly sounds better, but I am

Re: [PULL 13/29] qapi: Flatten object-add

2020-07-08 Thread Paolo Bonzini
On 06/03/20 18:14, Kevin Wolf wrote: > Mapping object-add to the command line as is doesn't result in nice > syntax because of the nesting introduced with 'props'. This becomes > nicer and more consistent with device_add and netdev_add when we accept > properties for the object on the top level ins

<    1   2   3   4   >