[PATCH v2 1/2] vhost: Don't call access_ok() when using IOTLB

2020-09-29 Thread Greg Kurz
t.com CC: sta...@vger.kernel.org # 4.14+ Signed-off-by: Greg Kurz --- drivers/vhost/vhost.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index b45519ca66a7..c3b49975dc28 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/

[PATCH v2 0/2] vhost: Skip access checks on GIOVAs

2020-09-29 Thread Greg Kurz
tps://patchwork.ozlabs.org/project/qemu-devel/patch/160105498386.68108.2145229309875282336.st...@bahia.lan/ v2: - patch 1: move the (vq->ioltb) check from vhost_vq_access_ok() to vq_access_ok() as suggested by MST - patch 2: new patch --- Greg Kurz (2): vhost: Don't call access_ok() when

Re: [PATCH] vhost: Ignore vrings in dirty log when using a vIOMMU

2020-09-28 Thread Greg Kurz
On Mon, 28 Sep 2020 16:23:43 +1000 David Gibson wrote: > On Fri, Sep 25, 2020 at 07:29:43PM +0200, Greg Kurz wrote: > > When a vIOMMU is present, any address comming from the guest is an IO > > virtual address, including those of the vrings. The backend's accesses > >

Re: [PATCH] vhost: Ignore vrings in dirty log when using a vIOMMU

2020-09-25 Thread Greg Kurz
Cc'ing Jason since this was detected using vhost-net. On Fri, 25 Sep 2020 19:29:43 +0200 Greg Kurz wrote: > When a vIOMMU is present, any address comming from the guest is an IO > virtual address, including those of the vrings. The backend's accesses > to the vrings happen throu

[PATCH] vhost: Ignore vrings in dirty log when using a vIOMMU

2020-09-25 Thread Greg Kurz
() to abort. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1879349 Signed-off-by: Greg Kurz --- hw/virtio/vhost.c | 38 -- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 1a1384e7a642..0b83d6b8e65e

Re: [PATCH v2 4/6] spapr_numa: change reference-points and maxdomain settings

2020-09-25 Thread Greg Kurz
0x3, 0x2, 0x1) and maxdomains will > allow for any type of configuration the user intends to > do - under the scope and limitations of PAPR itself, of > course. > > Signed-off-by: Daniel Henrique Barboza > --- Reviewed-by: Greg Kurz > hw/ppc/spapr_numa.c | 40 +++

Re: [PATCH 5/6] spapr_numa: consider user input when defining associativity

2020-09-24 Thread Greg Kurz
On Thu, 24 Sep 2020 08:21:47 -0300 Daniel Henrique Barboza wrote: > > > On 9/24/20 7:22 AM, Greg Kurz wrote: > > On Wed, 23 Sep 2020 16:34:57 -0300 > > Daniel Henrique Barboza wrote: > > > >> This patch puts all the pieces together to finally allow us

Re: [PATCH 5/6] spapr_numa: consider user input when defining associativity

2020-09-24 Thread Greg Kurz
On Wed, 23 Sep 2020 16:34:57 -0300 Daniel Henrique Barboza wrote: > This patch puts all the pieces together to finally allow user > input when defining the NUMA topology of the spapr guest. > > We have one more kernel restriction to handle in this patch: > the associativity array of node 0 must

Re: [PATCH 4/6] spapr_numa: change reference-points and maxdomain settings

2020-09-24 Thread Greg Kurz
On Wed, 23 Sep 2020 16:34:56 -0300 Daniel Henrique Barboza wrote: > This is the first guest visible change introduced in > spapr_numa.c. The previous settings of both reference-points > and maxdomains were too restrictive, but enough for the > existing associativity we're setting in the

Re: [PATCH 3/6] spapr_numa: translate regular NUMA distance to PAPR distance

2020-09-24 Thread Greg Kurz
On Wed, 23 Sep 2020 16:34:55 -0300 Daniel Henrique Barboza wrote: > QEMU allows the user to set NUMA distances in the command line. > For ACPI architectures like x86, this means that user input is > used to populate the SLIT table, and the guest perceives the > distances as the user chooses to.

Re: [PATCH 2/6] spapr_numa: forbid asymmetrical NUMA setups

2020-09-24 Thread Greg Kurz
return; > +} > + > +if (!spapr_numa_is_symmetrical(machine)) { > +error_report("Asymmetrical NUMA topologies aren't supported " > + "in the pSeries machine"); > +exit(1); Even if the code base is still heavily populated with exit(1), it seems that exit(EXIT_FAILURE) is preferred. Anyway, Reviewed-by: Greg Kurz > +} > + > } > > void spapr_numa_write_associativity_dt(SpaprMachineState *spapr, void *fdt,

Re: [PATCH 1/6] spapr: add spapr_machine_using_legacy_numa() helper

2020-09-24 Thread Greg Kurz
n the pSeries machine. The new behavior will only be exposed > if: > > - machine is pseries-5.2 and newer; > - more than one NUMA node is declared in NUMA state. > > Reviewed-by: David Gibson > Signed-off-by: Daniel Henrique Barboza > --- Reviewed-by: Greg Kurz > h

Re: [PATCH] migration: increase max-bandwidth to 128 MiB/s (1 Gib/s)

2020-09-22 Thread Greg Kurz
kiB and not 4 KiB. > > Signed-off-by: Laurent Vivier > --- Reviewed-by: Greg Kurz > migration/migration.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/migration.c b/migration/migration.c > index 58a5452471f9..1c4174947181 10

Re: [PATCH v2 13/13] block/qed: bdrv_qed_do_open: deal with errp

2020-09-18 Thread Greg Kurz
gt; this way. This allows to simplify code in > bdrv_qed_co_invalidate_cache(). > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Alberto Garcia > --- Reviewed-by: Greg Kurz > block/qed.c | 24 +++- > 1 file changed, 15 insertions(+), 9 del

Re: [PATCH v2 12/13] block/qcow2: simplify qcow2_co_invalidate_cache()

2020-09-18 Thread Greg Kurz
On Fri, 18 Sep 2020 19:01:34 +0300 Vladimir Sementsov-Ogievskiy wrote: > 18.09.2020 18:51, Alberto Garcia wrote: > > On Fri 18 Sep 2020 05:30:06 PM CEST, Greg Kurz wrote: > >>> qcow2_do_open correctly sets errp on each failure path. So, we can > >>> simplify

Re: [PATCH v2 12/13] block/qcow2: simplify qcow2_co_invalidate_cache()

2020-09-18 Thread Greg Kurz
? "Add ERRP_GUARD() as mandated by the documentation in include/qapi/error.h to avoid problems with the error_prepend() call if errp is _fatal." With that fixed, Reviewed-by: Greg Kurz > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2.c | 13 -

Re: [PATCH v2 09/13] block/qcow2-bitmap: improve qcow2_load_dirty_bitmaps() interface

2020-09-18 Thread Greg Kurz
t; > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- With the documentation change suggested by Berto, Reviewed-by: Greg Kurz > block/qcow2.h| 3 ++- > block/qcow2-bitmap.c | 25 ++--- > block/qcow2.c| 6 ++ > 3 files changed,

Re: [PATCH 2/2] qom: Correct error values in two contracts

2020-09-17 Thread Greg Kurz
eturns -1. All the other object_property_get_FOO() > contracts specify the exact error value, so do the same here. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Greg Kurz > include/qom/object.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/in

Re: [PATCH 1/2] qom: Clean up object_property_get_enum()'s error value

2020-09-17 Thread Greg Kurz
sly complicated. Always return -1 on error, and adjust the > contract. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Greg Kurz > include/qom/object.h | 6 +++--- > qom/object.c | 6 +++--- > tests/check-qom-proplist.c | 2 ++ > 3 file

Re: [PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-17 Thread Greg Kurz
On Thu, 17 Sep 2020 13:18:51 +0100 Daniel P. Berrangé wrote: > On Thu, Sep 17, 2020 at 02:04:41PM +0200, Markus Armbruster wrote: > > Greg Kurz writes: > > > > > $ git grep object_property_get_uint -- :^{include,qom/object.c} | wc -l > > > 60 > &g

Re: [PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-17 Thread Greg Kurz
On Thu, 17 Sep 2020 09:38:49 +0200 Markus Armbruster wrote: > David Gibson writes: > > > On Tue, Sep 15, 2020 at 01:43:40PM +0200, Greg Kurz wrote: > >> On Tue, 15 Sep 2020 13:58:53 +0300 > >> Vladimir Sementsov-Ogievskiy wrote: > >> &

Re: [PATCH 10/15] spapr: Add a return value to spapr_set_vcpu_id()

2020-09-15 Thread Greg Kurz
On Tue, 15 Sep 2020 15:08:05 +0200 Philippe Mathieu-Daudé wrote: > On 9/14/20 2:35 PM, Greg Kurz wrote: > > As recommended in "qapi/error.h", return true on success and false on > > failure. This allows to reduce error propagation overhead in the callers. > >

Re: [PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-15 Thread Greg Kurz
On Tue, 15 Sep 2020 14:04:23 +0200 Greg Kurz wrote: > > I don't expect much people except David or maybe Markus to look > at these patches actually. And anyway, it's up to David to merge My bad, I didn't think about Philippe... :P Thanks for the review, Philippe ! Cheers, -- Gre

Re: [PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-15 Thread Greg Kurz
I've dropped the SPAM mentions from the subject this time :) On Tue, 15 Sep 2020 14:53:53 +0300 Vladimir Sementsov-Ogievskiy wrote: > 15.09.2020 14:43, Greg Kurz wrote: > > On Tue, 15 Sep 2020 13:58:53 +0300 > > Vladimir Sementsov-Ogievskiy wrote: > > > >> 14.

Re: [SPAM] Re: [PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-15 Thread Greg Kurz
On Tue, 15 Sep 2020 13:58:53 +0300 Vladimir Sementsov-Ogievskiy wrote: > 14.09.2020 15:35, Greg Kurz wrote: > > As recommended in "qapi/error.h", add a bool return value to > > spapr_add_lmbs() and spapr_add_nvdimm(), and use them instead > > of local_err in spap

Re: [SPAM] Re: [PATCH 05/15] spapr: Get rid of cas_check_pvr() error reporting

2020-09-15 Thread Greg Kurz
On Tue, 15 Sep 2020 13:03:13 +0300 Vladimir Sementsov-Ogievskiy wrote: > 14.09.2020 15:34, Greg Kurz wrote: > > The cas_check_pvr() function has two purposes: > > - finding the "best" logical PVR, ie. the most recent one supported by > >the guest for this CPU t

Re: [PATCH 02/15] ppc: Add a return value to ppc_set_compat() and ppc_set_compat_all()

2020-09-15 Thread Greg Kurz
On Tue, 15 Sep 2020 12:18:35 +0300 Vladimir Sementsov-Ogievskiy wrote: > 14.09.2020 15:34, Greg Kurz wrote: > > As recommended in "qapi/error.h", indicate success / failure with a > > return value. Since ppc_set_compat() is called from a VMState handler, > > What

Re: [PATCH] add a source path Makefile

2020-09-14 Thread Greg Kurz
On Sat, 12 Sep 2020 10:46:56 +0200 Paolo Bonzini wrote: > Now that QEMU is always built out-of-tree, the rules to build > QEMU need not be in a file called "Makefile". Move them to > "Makefile.build" (which is symlinked to Makefile in the build > tree) and only leave the support for fake

[PATCH 15/15] spapr: Simplify error handling in spapr_memory_unplug_request()

2020-09-14 Thread Greg Kurz
Since object_property_get_uint() only returns 0 on failure, use that instead of local_err, and get rid of the error propagation overhead. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index

[PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-14 Thread Greg Kurz
the status of void function pc_dimm_plug() with *errp. This allows to get rid of the error propagation overhead. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_nvdimm.h | 2 +- hw/ppc/spapr.c| 35 +-- hw/ppc/spapr_nvdimm.c | 5 +++-- 3 fil

[PATCH 11/15] spapr: Simplify error handling in spapr_cpu_core_realize()

2020-09-14 Thread Greg Kurz
As recommended in "qapi/error.h", add a bool return value to spapr_realize_vcpu() and use it in spapr_cpu_core_realize() in order to get rid of the error propagation overhead. Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c | 16 +++- 1 file changed, 7 insert

[PATCH 12/15] spapr: Add a return value to spapr_nvdimm_validate()

2020-09-14 Thread Greg Kurz
As recommended in "qapi/error.h", return true on success and false on failure. This allows to reduce error propagation overhead in the callers. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_nvdimm.h | 2 +- hw/ppc/spapr.c| 4 +--- hw/ppc/spapr_nvdimm.c

[PATCH 13/15] spapr: Add a return value to spapr_check_pagesize()

2020-09-14 Thread Greg Kurz
As recommended in "qapi/error.h", return true on success and false on failure. This allows to reduce error propagation overhead in the callers. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr.h | 2 +- hw/ppc/spapr.c | 4 +--- hw/ppc/spapr_caps.c| 7 +-- 3 files

[PATCH 10/15] spapr: Add a return value to spapr_set_vcpu_id()

2020-09-14 Thread Greg Kurz
As recommended in "qapi/error.h", return true on success and false on failure. This allows to reduce error propagation overhead in the callers. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr.h | 2 +- hw/ppc/spapr.c | 5 +++-- hw/ppc/spapr_cpu_core.c | 5 + 3 files

[PATCH 08/15] spapr: Add a return value to spapr_drc_attach()

2020-09-14 Thread Greg Kurz
As recommended in "qapi/error.h", return true on success and false on failure. This allows to reduce error propagation overhead in the callers. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_drc.h | 2 +- hw/ppc/spapr.c | 15 +++ hw/ppc/spapr_drc.c

[PATCH 09/15] spapr: Simplify error handling in prop_get_fdt()

2020-09-14 Thread Greg Kurz
Use the return value of visit_check_struct() and visit_check_list() for error checking instead of local_err. This allows to get rid of the error propagation overhead. Signed-off-by: Greg Kurz --- hw/ppc/spapr_drc.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git

[PATCH 04/15] spapr: Simplify error handling in callers of ppc_set_compat()

2020-09-14 Thread Greg Kurz
Now that ppc_set_compat() indicates success/failure with a return value, use it and reduce error propagation overhead. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index ea2c755310cd

[PATCH 06/15] spapr: Simplify error handling in do_client_architecture_support()

2020-09-14 Thread Greg Kurz
Use the return value of ppc_set_compat_all() to check failures, which is preferred over hijacking local_err. Signed-off-by: Greg Kurz --- hw/ppc/spapr_hcall.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index

[PATCH 07/15] spapr: Simplify error handling in spapr_vio_busdev_realize()

2020-09-14 Thread Greg Kurz
Use the return value of spapr_irq_findone() and spapr_irq_claim() to detect failures. This allows to reduce the error propagation overhead. Signed-off-by: Greg Kurz --- hw/ppc/spapr_vio.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/ppc/spapr_vio.c b/hw

[PATCH 01/15] spapr: Fix error leak in spapr_realize_vcpu()

2020-09-14 Thread Greg Kurz
If spapr_irq_cpu_intc_create() fails, local_err isn't propagated and thus leaked. Fixes: 992861fb1e4c ("error: Eliminate error_propagate() manually") Cc: arm...@redhat.com Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[PATCH 02/15] ppc: Add a return value to ppc_set_compat() and ppc_set_compat_all()

2020-09-14 Thread Greg Kurz
ency, even if it isn't called in a context where a negative errno is required on failure. This will allow to simplify error handling in the callers. Signed-off-by: Greg Kurz --- target/ppc/cpu.h| 4 ++-- target/ppc/compat.c | 26 +++--- 2 files changed, 17 insertions(+), 13

[PATCH 03/15] ppc: Fix return value in cpu_post_load() error path

2020-09-14 Thread Greg Kurz
VMState handlers are supposed to return negative errno values on failure. Signed-off-by: Greg Kurz --- target/ppc/machine.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/ppc/machine.c b/target/ppc/machine.c index 109d0711628f..5e5837737679 100644

[PATCH 00/15] spapr: Error handling fixes and cleanups (round 2)

2020-09-14 Thread Greg Kurz
with a return value. Greg Kurz (15): spapr: Fix error leak in spapr_realize_vcpu() ppc: Add a return value to ppc_set_compat() and ppc_set_compat_all() ppc: Fix return value in cpu_post_load() error path spapr: Simplify error handling in callers of ppc_set_compat() spapr: Get rid of cas_check_pvr

[PATCH 05/15] spapr: Get rid of cas_check_pvr() error reporting

2020-09-14 Thread Greg Kurz
support for "compat" mode in PR KVM This logic doesn't need error reporting, really. If we don't find a suitable logical PVR, we return the special value 0 which is definitely not a valid PVR. Let the caller decide on whether it should error out or not. This doesn't change the behavior.

Re: [PATCH 11/14] block/qcow2-bitmap: return startus from qcow2_store_persistent_dirty_bitmaps

2020-09-11 Thread Greg Kurz
On Fri, 11 Sep 2020 13:18:32 +0300 Vladimir Sementsov-Ogievskiy wrote: > 11.09.2020 12:38, Greg Kurz wrote: > > s/startus/status > > > > On Wed, 9 Sep 2020 21:59:27 +0300 > > Vladimir Sementsov-Ogievskiy wrote: > > > >> It's better to return s

Re: [PATCH 12/14] block/qcow2: read_cache_sizes: return status value

2020-09-11 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:28 +0300 Vladimir Sementsov-Ogievskiy wrote: > It's better to return status together with setting errp. It allows to > reduce error propagation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kurz >

Re: [PATCH 11/14] block/qcow2-bitmap: return startus from qcow2_store_persistent_dirty_bitmaps

2020-09-11 Thread Greg Kurz
Error **errp) > { > +ERRP_GUARD(); Maybe worth mentioning in the changelog that this ERRP_GUARD() fixes an error_prepend(errp, ...) not visible in the patch context. Anyway, Reviewed-by: Greg Kurz > BdrvDirtyBitmap *bitmap; > BDRVQcow2State *s = bs->opaque;

Re: [PATCH 09/14] block/qcow2: qcow2_get_specific_info(): drop error propagation

2020-09-11 Thread Greg Kurz
ntsov-Ogievskiy > --- Reviewed-by: Greg Kurz > block/qcow2.h| 4 ++-- > block/qcow2-bitmap.c | 27 +-- > block/qcow2.c| 10 +++--- > 3 files changed, 18 insertions(+), 23 deletions(-) > > diff --git a/block/qcow2.h b/block/qcow2.h &

Re: [PATCH 08/14] blockjob: return status from block_job_set_speed()

2020-09-11 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:24 +0300 Vladimir Sementsov-Ogievskiy wrote: > Better to return status together with setting errp. It allows to avoid > error propagation in the caller. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kurz > include/blo

Re: [PATCH] spapr: Handle HPT allocation failure in nested guest

2020-09-11 Thread Greg Kurz
NOTSUP would be more appropriate... but since linux only knows about EOPNOTSUPP and it has an unrelated and poorly named ENOTSUPP, I guess it is okay to keep EOPNOTSUPP for the sake of consistency. Reviewed-by: Greg Kurz > +error_setg(errp, "HPT not supported in nested guests");

Re: [for-5.2 v4 10/10] s390: Recognize host-trust-limitation option

2020-09-11 Thread Greg Kurz
On Fri, 11 Sep 2020 10:07:18 +1000 David Gibson wrote: > On Thu, Sep 10, 2020 at 08:29:24PM +0200, Halil Pasic wrote: > > On Thu, 10 Sep 2020 13:36:09 +0200 > > Cornelia Huck wrote: > > > > > On Mon, 7 Sep 2020 17:22:53 +0200 > > > Halil Pasic wrote: > > > > > > > On Fri, 24 Jul 2020

Re: [PATCH 07/14] block/blklogwrites: drop error propagation

2020-09-11 Thread Greg Kurz
On Fri, 11 Sep 2020 07:30:37 +0200 Markus Armbruster wrote: > Markus Armbruster writes: > > > Greg Kurz writes: > > > >> On Wed, 9 Sep 2020 21:59:23 +0300 > >> Vladimir Sementsov-Ogievskiy wrote: > >> > >>> It's simple to avoid error

Re: [PATCH 07/14] block/blklogwrites: drop error propagation

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:23 +0300 Vladimir Sementsov-Ogievskiy wrote: > It's simple to avoid error propagation in blk_log_writes_open(), we > just need to refactor blk_log_writes_find_cur_log_sector() a bit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/blklogwrites.c | 23

Re: [PATCH 06/14] block/mirror: drop extra error propagation in commit_active_start()

2020-09-10 Thread Greg Kurz
y > --- Reviewed-by: Greg Kurz > block/mirror.c | 12 +--- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/block/mirror.c b/block/mirror.c > index ca250f765d..529ba12b2a 100644 > --- a/block/mirror.c > +++ b/block/mirror.c > @@ -1788,8 +1788,

Re: [PATCH 05/14] block: drop extra error propagation for bdrv_set_backing_hd

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:21 +0300 Vladimir Sementsov-Ogievskiy wrote: > bdrv_set_backing_hd now returns status, let's use it. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kurz > block.c | 6 ++ > 1 file changed, 2 insertions(+), 4 dele

Re: [PATCH 04/14] blockdev: fix drive_backup_prepare() missed error

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:20 +0300 Vladimir Sementsov-Ogievskiy wrote: > We leak local_err and don't report failure to the caller. It's > definitely wrong, let's fix. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kurz > blockdev.c | 3 +-- &g

Re: [PATCH 03/14] block: check return value of bdrv_open_child and drop error propagation

2020-09-10 Thread Greg Kurz
n-place --no-show-diff --max-width 80 --use-gitgrep block > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kurz > block/blkdebug.c | 6 ++ > block/blklogwrites.c | 10 -- > block/blkreplay.c| 6 ++ > block/blkverify.c|

Re: [PATCH 02/14] block: use return status of bdrv_append()

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:18 +0300 Vladimir Sementsov-Ogievskiy wrote: > Now bdrv_append returns status and we can drop all the local_err things > around it. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kurz Just one suggestion for a follow-up below

Re: [PATCH 01/14] block: return status from bdrv_append and friends

2020-09-10 Thread Greg Kurz
gt; overhead in further patches. > > Choose int return status, because bdrv_replace_node() has call to > bdrv_check_update_perm(), which reports int status, which seems correct > to propagate. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kur

Re: [PATCH] 9pfs: disable msize warning for synth driver

2020-09-08 Thread Greg Kurz
On Tue, 08 Sep 2020 11:01:15 +0200 Christian Schoenebeck wrote: > On Dienstag, 8. September 2020 10:10:36 CEST Greg Kurz wrote: > > > > BTW, have you ever tried dealing with patchwork client's 'state' feature > > > > for already transmited patches on t

Re: [PATCH] 9pfs: disable msize warning for synth driver

2020-09-08 Thread Greg Kurz
On Mon, 7 Sep 2020 14:27:19 +0200 Greg Kurz wrote: > On Mon, 07 Sep 2020 13:55:52 +0200 > Christian Schoenebeck wrote: > > > On Montag, 7. September 2020 11:57:58 CEST Greg Kurz wrote: > > > On Sun, 6 Sep 2020 18:50:32 +0200 > > > > > > Christian

Re: [PATCH] 9pfs: disable msize warning for synth driver

2020-09-07 Thread Greg Kurz
On Mon, 07 Sep 2020 13:55:52 +0200 Christian Schoenebeck wrote: > On Montag, 7. September 2020 11:57:58 CEST Greg Kurz wrote: > > On Sun, 6 Sep 2020 18:50:32 +0200 > > > > Christian Schoenebeck wrote: > > > Previous patch introduced a performance warning b

Re: [SPAM] [PATCH] 9pfs: disable msize warning for synth driver

2020-09-07 Thread Greg Kurz
off-by: Christian Schoenebeck > --- Heh, yes I guess it makes sense :) I guess you could maybe queue this patch before the other one. Reviewed-by: Greg Kurz > fsdev/file-op-9p.h | 4 > hw/9pfs/9p-synth.c | 2 ++ > hw/9pfs/9p.c | 2 +- > 3 files changed, 7 insertions

Re: [PATCH v5 1/3] spapr: move h_home_node_associativity to spapr_numa.c

2020-09-04 Thread Greg Kurz
sure if David already applied it to ppc-for-5.2. Anyway: Reviewed-by: Greg Kurz > hw/ppc/spapr_hcall.c | 40 --- > hw/ppc/spapr_numa.c | 45 > 2 files changed, 45 insertions(+), 40 deletions(-) > > di

Re: [PATCH v5 3/3] spapr_numa: use spapr_numa_get_vcpu_assoc() in home_node hcall

2020-09-04 Thread Greg Kurz
x < VCPU_ASSOC_SIZE ? > +be32_to_cpu(vcpu_assoc[assoc_idx++]) : -1; > +b = assoc_idx < VCPU_ASSOC_SIZE ? > +be32_to_cpu(vcpu_assoc[assoc_idx++]) : -1; > + > +args[idx] = ASSOCIATIVITY(a, b); > } > #undef ASSOCIATIVITY > Much clearer with the comment. Reviewed-by: Greg Kurz

Re: [PATCH v5 2/3] spapr_numa: create a vcpu associativity helper

2020-09-04 Thread Greg Kurz
t; * > * NUMA_ASSOC_SIZE is the base array size of an ibm,associativity > * array for any non-CPU resource. > + * > + * VCPU_ASSOC_SIZE represents the size of ibm,associativity array > + * for CPUs, which has an extra element (vcpu_id) in the end. > */ > #define MAX_DISTANCE_REF_POINTS4 > #define NUMA_ASSOC_SIZE(MAX_DISTANCE_REF_POINTS + 1) > +#define VCPU_ASSOC_SIZE(NUMA_ASSOC_SIZE + 1) > > typedef struct SpaprCapabilities SpaprCapabilities; > struct SpaprCapabilities { With the comments on g_malloc() addressed, feel free to add: Reviewed-by: Greg Kurz

Re: [PATCH v4 3/3] spapr_numa: use spapr_numa_get_vcpu_assoc() in home_node hcall

2020-09-04 Thread Greg Kurz
On Thu, 3 Sep 2020 22:04:39 -0300 Daniel Henrique Barboza wrote: > The current implementation of h_home_node_associativity hard codes > the values of associativity domains of the vcpus. Let's make > it consider the values already initialized in spapr->numa_assoc_array, > via the

Re: [PATCH v4 2/3] spapr_numa: create a vcpu associativity helper

2020-09-04 Thread Greg Kurz
On Thu, 3 Sep 2020 22:04:38 -0300 Daniel Henrique Barboza wrote: > The work to be done in h_home_node_associativity() intersects > with what is already done in spapr_numa_fixup_cpu_dt(). This > patch creates a new helper, spapr_numa_get_vcpu_assoc(), to > be used for both

[PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags

2020-09-03 Thread Greg Kurz
assembly since 2001 at least. Signed-off-by: Greg Kurz --- Makefile |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a9d3e2c4d375..34dd9e6c4c4a 100644 --- a/Makefile +++ b/Makefile @@ -229,20 +229,22 @@ distclean: clean ninja-distclean

[PATCH 1/2] Makefile: Drop extra phony cscope

2020-09-03 Thread Greg Kurz
Commit d79864058a64 added a dedicated phony line for cscope. Signed-off-by: Greg Kurz --- Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ed354c43b0ba..a9d3e2c4d375 100644 --- a/Makefile +++ b/Makefile @@ -127,7 +127,7 @@ generated-files

[PATCH 0/2] Makefile: Some more cleanups for cscope/TAGS/ctags

2020-09-03 Thread Greg Kurz
The first patch is a leftover that could probably go through the trivial tree. The second one avoids an awkward indexation of the meson code if the meson submodule is present. --- Greg Kurz (2): Makefile: Drop extra phony cscope Makefile: Skip the meson subdir in cscope/TAGS/ctags

Re: [PATCH v2 0/1] 9pfs: log warning if msize <= 8192

2020-09-03 Thread Greg Kurz
On Thu, 03 Sep 2020 17:48:33 +0200 Christian Schoenebeck wrote: > On Donnerstag, 3. September 2020 17:41:23 CEST Greg Kurz wrote: > > On Thu, 3 Sep 2020 17:19:31 +0200 > > > > Greg Kurz wrote: > > > On Thu, 3 Sep 2020 16:41:02 +0200 > > > > > &

Re: [PATCH v2 1/1] 9pfs: log warning if msize <= 8192

2020-09-03 Thread Greg Kurz
et a warning each time they start QEMU, maybe freak out and file reports in launchpad. So I suggest you turn <= into < to avoid bothering these placid users with a warning. Anyway, it's your choice :) so if you manage to get the #msize anchor to work as expected: Reviewed-by:

Re: [PATCH v2 0/1] 9pfs: log warning if msize <= 8192

2020-09-03 Thread Greg Kurz
On Thu, 3 Sep 2020 17:19:31 +0200 Greg Kurz wrote: > On Thu, 3 Sep 2020 16:41:02 +0200 > Christian Schoenebeck wrote: > > > I have updated the QEMU 9P setup wiki page about this 'msize' issue. For > > some reason the dedicated anchor 'msize' does not work though: > >

Re: [PATCH v2 0/1] 9pfs: log warning if msize <= 8192

2020-09-03 Thread Greg Kurz
On Thu, 3 Sep 2020 16:41:02 +0200 Christian Schoenebeck wrote: > I have updated the QEMU 9P setup wiki page about this 'msize' issue. For > some reason the dedicated anchor 'msize' does not work though: > > https://wiki.qemu.org/Documentation/9psetup#msize > AFAICT the wiki derives the anchor

Re: [PATCH] 9pfs: log warning if msize <= 8192

2020-09-03 Thread Greg Kurz
On Thu, 03 Sep 2020 10:20:40 +0200 Christian Schoenebeck wrote: > On Mittwoch, 2. September 2020 18:54:22 CEST Greg Kurz wrote: > > > Well, I can do that of course. But somehow I fear users get lost by just > > > pointing them to "man 1 qemu" in the log message. I

Re: [PATCH] 9pfs: log warning if msize <= 8192

2020-09-02 Thread Greg Kurz
On Wed, 02 Sep 2020 18:03:12 +0200 Christian Schoenebeck wrote: > On Mittwoch, 2. September 2020 16:10:35 CEST Daniel P. Berrangé wrote: > > > Yeah, I know, but the problem is I don't see how I would squeeze the > > > relevant information into only one log message; and even "what's a good > > >

Re: [PATCH] 9pfs: log warning if msize <= 8192

2020-09-02 Thread Greg Kurz
On Wed, 02 Sep 2020 14:52:33 +0200 Christian Schoenebeck wrote: > On Mittwoch, 2. September 2020 14:25:47 CEST Daniel P. Berrangé wrote: > > On Wed, Sep 02, 2020 at 01:22:49PM +0200, Christian Schoenebeck wrote: > > > It is essential to choose a reasonable high value for 'msize' to avoid > > >

Re: [PATCH 5/5] util/qsp: Do not declare local variable only used for assertion

2020-09-02 Thread Greg Kurz
On Wed, 2 Sep 2020 10:08:01 +0200 Philippe Mathieu-Daudé wrote: > This variable is used once in an assertion. Remove single > declaration and access directly in the assert(). > > See in "qemu/osdep.h": > > * [...] disable assertion is not > * supported

Re: [PATCH 4/5] tcg/tcg: Do not declare local variable only used for assertion

2020-09-02 Thread Greg Kurz
On Wed, 2 Sep 2020 10:08:00 +0200 Philippe Mathieu-Daudé wrote: > This variable is used once in an assertion. Remove single > declaration and access directly in the assert(). > > See in "qemu/osdep.h": > > * [...] disable assertion is not > * supported

Re: [PATCH 3/5] hw/ppc/spapr: Do not declare local variable only used for assertion

2020-09-02 Thread Greg Kurz
On Wed, 2 Sep 2020 10:07:59 +0200 Philippe Mathieu-Daudé wrote: > This variable is used once in an assertion. Remove single > declaration and access directly in the assert(). > > See in "qemu/osdep.h": > > * [...] disable assertion is not > * supported

Re: [PATCH 2/5] hw/pci-bridge: Do not declare local variable only used for assertion

2020-09-02 Thread Greg Kurz
On Wed, 2 Sep 2020 10:07:58 +0200 Philippe Mathieu-Daudé wrote: > This variable is used once in an assertion. Remove single > declaration and access directly in the assert(). > > See in "qemu/osdep.h": > > * [...] disable assertion is not > * supported

Re: [PATCH 1/5] tests/qtest/ipmi-kcs: Fix assert side-effect

2020-09-02 Thread Greg Kurz
8: Incorrect expression (ASSERT_SIDE_EFFECT) > >>> Argument "--count" of g_assert() has a side effect. The containing > function might work differently in a non-debug build. > 84 g_assert(--count != 0); > > Reported-by: Coverity (CID 1432368) > Signed-

Re: [PATCH 1/2] Makefile: Add back TAGS/ctags/cscope rules

2020-09-01 Thread Greg Kurz
On Tue, 1 Sep 2020 18:04:59 +0200 Paolo Bonzini wrote: > On 01/09/20 16:59, Connor Kuehl wrote: > > On 9/1/20 9:20 AM, Greg Kurz wrote: > >> It is a bit of a pain to be forced to run configure before being able > >> to use cscope and friends. Add back the

Re: [PATCH 1/2] Makefile: Add back TAGS/ctags/cscope rules

2020-09-01 Thread Greg Kurz
On Tue, 1 Sep 2020 09:59:23 -0500 Connor Kuehl wrote: > On 9/1/20 9:20 AM, Greg Kurz wrote: > > It is a bit of a pain to be forced to run configure before being able > > to use cscope and friends. Add back the rules to build them in-tree > > as before commit a566505

[PATCH 2/2] Makefile: Fix in-tree clean/distclean

2020-09-01 Thread Greg Kurz
. Fixes: a56650518f5b ("configure: integrate Meson in the build system") Signed-off-by: Greg Kurz --- Makefile | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 8ffe2872915d..08f4d3eb5c3c 100644 --- a/Makefile +++ b/Makefile

[PATCH 0/2] Makefile: A few post-meson-conversion fixes

2020-09-01 Thread Greg Kurz
The meson conversion broke the ability to use cscope, etags and ctags without running configure beforehand, which is a bit painful. This series restore the previous behavior. --- Greg Kurz (2): Makefile: Add back TAGS/ctags/cscope rules Makefile: Fix in-tree clean/distclean

[PATCH 1/2] Makefile: Add back TAGS/ctags/cscope rules

2020-09-01 Thread Greg Kurz
It is a bit of a pain to be forced to run configure before being able to use cscope and friends. Add back the rules to build them in-tree as before commit a56650518f5b. Fixes: a56650518f5b ("configure: integrate Meson in the build system") Signed-off-by: Greg Kurz --- Makef

Re: [PATCH v2 3/3] spapr: Remove unnecessary DRC type-checker macros

2020-09-01 Thread Greg Kurz
in > fact a bad idea. Remove them. > > Signed-off-by: David Gibson > --- Reviewed-by: Greg Kurz > include/hw/ppc/spapr_drc.h | 43 +- > 1 file changed, 1 insertion(+), 42 deletions(-) > > diff --git a/include/hw/ppc/spapr_drc.h b/i

[PATCH v2] nvram: Exit QEMU if NVRAM cannot contain all -prom-env data

2020-08-13 Thread Greg Kurz
ed, but it affects pseries, the machine type I care for, since commit 61f20b9dc5b7 only. Fixes: 61f20b9dc5b7 ("spapr_nvram: Pre-initialize the NVRAM to support the -prom-env parameter") RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1867739 Reported-by: John Snow Reviewed-by: Laurent Vivier Si

Re: [PATCH] spapr/xive: Use xive_source_esb_len()

2020-08-13 Thread Greg Kurz
On Thu, 13 Aug 2020 17:38:59 -0300 Gustavo Romero wrote: > Hi Greg, > Hi Gustavo, > On 8/13/20 2:28 PM, Greg Kurz wrote: > > static inline size_t xive_source_esb_len(XiveSource *xsrc) > > { > > return (1ull << xsrc->esb_shift) * xsrc->nr_irqs;

Re: [PATCH 01/14] spapr: Simplify error handling in spapr_phb_realize()

2020-08-13 Thread Greg Kurz
010074a3b0 in machine_run_board_init (machine=0x101965800) at > /home/danielhb/qemu/hw/core/machine.c:1135 > #14 0x00010054f390 in qemu_init (argc=42, argv=0x70a8, > envp=0x7200) at /home/danielhb/qemu/softmmu/vl.c:4355 > #15 0x000100b8ee00 in main (argc=42,

[PATCH] spapr/xive: Use xive_source_esb_len()

2020-08-13 Thread Greg Kurz
static inline size_t xive_source_esb_len(XiveSource *xsrc) { return (1ull << xsrc->esb_shift) * xsrc->nr_irqs; } Signed-off-by: Greg Kurz --- Follow-up on "ppc/xive: Rework setup of XiveSource::esb_mmio" http://patchwork.ozlabs.org/pr

[PATCH] nvram: Exit QEMU if NVRAM cannot contain all -prom-env data

2020-08-13 Thread Greg Kurz
ed, but it affects pseries, the machine type I care for, since commit 61f20b9dc5b7 only. Fixes: 61f20b9dc5b7 ("spapr_nvram: Pre-initialize the NVRAM to support the -prom-env parameter") RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1867739 Reported-by: John Snow Signed-off-by: Greg Kurz ---

Re: [PATCH v2 2/2] spapr/nvram: Error out if NVRAM cannot contain all -prom-env data

2020-08-13 Thread Greg Kurz
On Thu, 13 Aug 2020 16:43:36 +1000 David Gibson wrote: > On Wed, Aug 12, 2020 at 09:06:54PM +0200, Greg Kurz wrote: > > On Wed, 12 Aug 2020 19:29:26 +0200 > > Laurent Vivier wrote: > > > > > Le 12/08/2020 à 19:08, Greg Kurz a écrit : > > > > Si

Re: [for-5.2 v4 09/10] host trust limitation: Alter virtio default properties for protected guests

2020-08-13 Thread Greg Kurz
On Thu, 13 Aug 2020 09:43:56 +0200 Greg Kurz wrote: > On Mon, 27 Jul 2020 16:05:14 +0100 > "Dr. David Alan Gilbert" wrote: > > > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > > The default behaviour for virtio devices is not to use the platf

Re: [for-5.2 v4 09/10] host trust limitation: Alter virtio default properties for protected guests

2020-08-13 Thread Greg Kurz
On Mon, 27 Jul 2020 16:05:14 +0100 "Dr. David Alan Gilbert" wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > The default behaviour for virtio devices is not to use the platforms normal > > DMA paths, but instead to use the fact that it's running in a hypervisor > > to directly

Re: [PATCH v2 2/2] spapr/nvram: Error out if NVRAM cannot contain all -prom-env data

2020-08-12 Thread Greg Kurz
On Wed, 12 Aug 2020 19:29:26 +0200 Laurent Vivier wrote: > Le 12/08/2020 à 19:08, Greg Kurz a écrit : > > Since commit 61f20b9dc5b7 ("spapr_nvram: Pre-initialize the NVRAM to > > support the -prom-env parameter"), pseries machines can pre-initialize > > the

[PATCH v2 1/2] nvram: Add dry_run argument to chrp_nvram_create_system_partition()

2020-08-12 Thread Greg Kurz
actually copying data into it. This can be used by callers to allocate enough memory. Signed-off-by: Greg Kurz --- hw/nvram/chrp_nvram.c | 34 +++--- hw/nvram/mac_nvram.c |2 +- hw/nvram/spapr_nvram.c|3 ++- hw/sparc/sun4m.c

[PATCH v2 2/2] spapr/nvram: Error out if NVRAM cannot contain all -prom-env data

2020-08-12 Thread Greg Kurz
top size Aborted (core dumped) Call chrp_nvram_create_system_partition() first, with its recently added parameter dry_run set to true, in order to know the required size and fail gracefully if it's too small. Reported-by: John Snow Signed-off-by: Greg Kurz --- hw/nvram/spapr_nvram.c | 15 ++

<    5   6   7   8   9   10   11   12   13   14   >