[PATCH 0/4] spapr: Error handling fixes and cleanups (round 5)

2020-10-26 Thread Greg Kurz
Hi, This the last round I had on my queue for 5.2. Basically ensuring that meaningful negative errnos get propagated to VMState, with some fairly simple cleanups on the way. --- Greg Kurz (4): spapr: qemu_memalign() doesn't return NULL spapr: Use error_append_hint

[PATCH 4/4] spapr: Improve spapr_reallocate_hpt() error reporting

2020-10-26 Thread Greg Kurz
ted by KVM or -ENOSPC if the HPT is smaller than what was asked, - use that to detect failures in htab_load() which is preferred over checking &local_err, - propagate this negative errno to vmstate_load() because it is more accurate than propagating -EINVAL for all possible errors. Signed-

[PATCH 2/4] spapr: Use error_append_hint() in spapr_reallocate_hpt()

2020-10-26 Thread Greg Kurz
Hints should be added with the dedicated error_append_hint() API because we don't want to print them when using QMP. This requires to insert ERRP_GUARD as explained in "qapi/error.h". Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |8 +--- 1 file changed, 5 insertions(

Re: [PATCH V2 02/14] ppc/: fix some comment spelling errors

2020-10-26 Thread Greg Kurz
gt; folder. > > > > Signed-off-by: zhaolichang > > Reviewed-by: David Edmondson > > --- PPC folks don't look at qemu-devel that often. Thanks to Thomas for Cc'ing qemu-ppc and David :-) Reviewed-by: Greg Kurz > > target/ppc/cpu.h| 6 +++

Re: [PATCH 0/5] spapr: Error handling fixes and cleanups (round 3)

2020-10-25 Thread Greg Kurz
On Sun, 25 Oct 2020 11:13:40 +0100 Greg Kurz wrote: > On Thu, 22 Oct 2020 15:11:42 +1100 > David Gibson wrote: > > > On Mon, Oct 19, 2020 at 10:47:52AM +0200, Greg Kurz wrote: > > > Hi, > > > > > > This is a followup to a previous cleanup for the sPAP

Re: [PATCH 1/5] pc-dimm: Drop @errp argument of pc_dimm_plug()

2020-10-25 Thread Greg Kurz
On Fri, 23 Oct 2020 21:19:19 +0200 Igor Mammedov wrote: > On Mon, 19 Oct 2020 10:48:04 +0200 > Greg Kurz wrote: > > > pc_dimm_plug() doesn't use it. It only aborts on error. > > > > Drop @errp and adapt the callers accordingly. > > > > Signed-off

Re: [PATCH 4/5] spapr: Pass &error_abort when getting some PC DIMM properties

2020-10-25 Thread Greg Kurz
On Fri, 23 Oct 2020 21:15:09 +0200 Igor Mammedov wrote: > On Mon, 19 Oct 2020 10:48:41 +0200 > Greg Kurz wrote: > > > Both PC_DIMM_SLOT_PROP and PC_DIMM_ADDR_PROP are defined in the > > default property list of the PC DIMM device class: > > > > DEF

Re: [PATCH 0/5] spapr: Error handling fixes and cleanups (round 3)

2020-10-25 Thread Greg Kurz
On Thu, 22 Oct 2020 15:11:42 +1100 David Gibson wrote: > On Mon, Oct 19, 2020 at 10:47:52AM +0200, Greg Kurz wrote: > > Hi, > > > > This is a followup to a previous cleanup for the sPAPR code: > > > > https://lists.gnu.org/archive/html/qemu-devel/2020-09/ms

Re: [PULL 01/13] tests/9pfs: Factor out do_version() helper

2020-10-23 Thread Greg Kurz
It feels weird to receive a mail I didn't send with my address in the top From: header. I would have expected yours instead and another From: with my address in the changelog... On Tue, 20 Oct 2020 18:09:14 +0200 Greg Kurz wrote: ... here. > fs_version() is a top level test function

[PATCH v2] block: End quiescent sections when a BDS is deleted

2020-10-23 Thread Greg Kurz
ue. BugId: https://bugzilla.redhat.com/show_bug.cgi?id=1874441 Signed-off-by: Greg Kurz --- v2: - use g_assert() in core code (checkpatch) - rename helper to bdrv_drain_all_end_quiesce() (Kevin) --- block.c |9 + block/io.c | 13 + inc

Re: [PATCH] block: End quiescent sections when a BDS is deleted

2020-10-23 Thread Greg Kurz
On Fri, 23 Oct 2020 16:18:05 +0200 Kevin Wolf wrote: > Am 23.10.2020 um 12:41 hat Greg Kurz geschrieben: > > If a BDS gets deleted during blk_drain_all(), it might miss a > > call to bdrv_do_drained_end(). This means missing a call to > > aio_enable_external() and th

[PULL 04/13] tests/9pfs: Turn fs_readdir_split() into a helper

2020-10-23 Thread Greg Kurz
fs_readdir_split() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz Message-Id: <160321016084.266767.9501523425012383531.

[PULL 03/13] tests/9pfs: Factor out do_attach() helper

2020-10-23 Thread Greg Kurz
fs_attach() is a top level test function. Factor out the reusable code to a separate helper instead of hijacking it in other tests. Signed-off-by: Greg Kurz Message-Id: <160321017450.266767.17377192504263871186.st...@bahia.lan> Signed-off-by: Christian Schoenebeck --- tests/qtest/vir

[PULL 05/13] tests/9pfs: Turn fs_mkdir() into a helper

2020-10-23 Thread Greg Kurz
fs_mkdir() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz Message-Id: <160321018148.266767.15959608711038504029.st...@b

[PULL 01/13] tests/9pfs: Factor out do_version() helper

2020-10-23 Thread Greg Kurz
fs_version() is a top level test function. Factor out the reusable code to a separate helper instead of hijacking it in other tests. Signed-off-by: Greg Kurz Message-Id: <160321015403.266767.4533967728943968456.st...@bahia.lan> Signed-off-by: Christian Schoenebeck --- tests/qtest/vir

[PULL 02/13] tests/9pfs: Set alloc in fs_create_dir()

2020-10-23 Thread Greg Kurz
fs_create_dir() is a top level test function. It should set alloc. Signed-off-by: Greg Kurz Message-Id: <160321016764.266767.3763279057643874020.st...@bahia.lan> Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a

Re: [PATCH] vhost: Don't special case vq->used_phys in vhost_get_log_size()

2020-10-23 Thread Greg Kurz
On Sat, 10 Oct 2020 11:30:28 +0800 Jason Wang wrote: > > On 2020/10/8 上午12:30, Greg Kurz wrote: > > The first loop in vhost_get_log_size() computes the size of the dirty log > > bitmap so that it allows to track changes in the entire guest memory, in > > terms of GPA.

Re: [PATCH] block: End quiescent sections when a BDS is deleted

2020-10-23 Thread Greg Kurz
On Fri, 23 Oct 2020 03:48:39 -0700 wrote: > Patchew URL: > https://patchew.org/QEMU/160344969243.4091343.14371338409686732879.st...@bahia.lan/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Message-id: 160344

[PATCH] block: End quiescent sections when a BDS is deleted

2020-10-23 Thread Greg Kurz
ue. BugId: https://bugzilla.redhat.com/show_bug.cgi?id=1874441 Signed-off-by: Greg Kurz --- block.c |9 + block/io.c | 13 + include/block/block.h |6 ++ tests/test-bdrv-drain.c |1 + 4 files changed, 29 insertions(+) diff --git

Re: [PATCH v2 8/8] tests/9pfs: add local Tunlinkat hard link test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:55:46 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat request to remove a previously hard > linked file by using the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests

Re: [PATCH v2 7/8] tests/9pfs: add local Tlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 20:20:08 +0200 Christian Schoenebeck wrote: > On Mittwoch, 21. Oktober 2020 14:51:09 CEST Christian Schoenebeck wrote: > > This test case uses a Tlink request to create a hard link to a regular > > file using the 9pfs 'local' fs driver. > > > > Signed-off-by: Christian Schoen

Re: [PATCH v2 7/8] tests/9pfs: add local Tlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:51:09 +0200 Christian Schoenebeck wrote: > This test case uses a Tlink request to create a hard link to a regular > file using the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests

Re: [PATCH v2 6/8] tests/9pfs: add local Tunlinkat symlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:36:23 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat request to remove a symlink using > the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests

Re: [PATCH v2 5/8] tests/9pfs: add local Tsymlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:33:34 +0200 Christian Schoenebeck wrote: > This test case uses a Tsymlink 9p request to create a symbolic link using > the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests

Re: [PATCH v2 4/8] tests/9pfs: add local Tunlinkat file test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:28:37 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat request to remove a regular file using > the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests

Re: [PATCH v2 3/8] tests/9pfs: add local Tlcreate test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:25:33 +0200 Christian Schoenebeck wrote: > This test case uses a Tlcreate 9p request to create a regular file inside > host's test directory. > > Signed-off-by: Christian Schoenebeck > --- Just one remark, see below. Reviewed-by: Greg Kurz >

Re: [PATCH v2 2/8] tests/9pfs: add local Tunlinkat directory test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:17:01 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat 9p request with flag AT_REMOVEDIR > (see 'man 2 unlink') to remove a directory from host's test directory. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-

Re: [PATCH v2 1/8] tests/9pfs: simplify do_mkdir()

2020-10-22 Thread Greg Kurz
lk() function in the upcoming patches, so it will avoid quite > some code duplication after all. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 27 +++ > 1 file changed, 19 insertions(+), 8 deletions(-) &

Re: [PATCH 1/8] tests/9pfs: simplify fs_mkdir()

2020-10-20 Thread Greg Kurz
On Tue, 20 Oct 2020 15:43:21 +0200 Christian Schoenebeck wrote: > On Dienstag, 20. Oktober 2020 15:35:36 CEST Greg Kurz wrote: > > On Tue, 20 Oct 2020 01:13:23 +0200 > > > > Christian Schoenebeck wrote: > > > Split out walking a directory path to a

Re: [PATCH v2 0/5] tests/9pfs: Code refactoring

2020-10-20 Thread Greg Kurz
On Tue, 20 Oct 2020 19:23:19 +0200 Christian Schoenebeck wrote: > On Dienstag, 20. Oktober 2020 18:09:07 CEST Greg Kurz wrote: > > Some code refactoring to have a clear distinction between top level > > test functions and helper functions. > > > > v2: - use &quo

[PATCH v2 3/5] tests/9pfs: Set alloc in fs_create_dir()

2020-10-20 Thread Greg Kurz
fs_create_dir() is a top level test function. It should set alloc. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c |1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index 52d102a3fc9f..cc52ae9a77b3 100644 --- a/tests

[PATCH v2 1/5] tests/9pfs: Factor out do_version() helper

2020-10-20 Thread Greg Kurz
fs_version() is a top level test function. Factor out the reusable code to a separate helper instead of hijacking it in other tests. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/qtest/virtio

[PATCH v2 5/5] tests/9pfs: Turn fs_mkdir() into a helper

2020-10-20 Thread Greg Kurz
fs_mkdir() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c |7 ++- 1 file changed

[PATCH v2 2/5] tests/9pfs: Turn fs_readdir_split() into a helper

2020-10-20 Thread Greg Kurz
fs_readdir_split() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 14 +++--

[PATCH v2 4/5] tests/9pfs: Factor out do_attach() helper

2020-10-20 Thread Greg Kurz
fs_attach() is a top level test function. Factor out the reusable code to a separate helper instead of hijacking it in other tests. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a

[PATCH v2 0/5] tests/9pfs: Code refactoring

2020-10-20 Thread Greg Kurz
Some code refactoring to have a clear distinction between top level test functions and helper functions. v2: - use "do_" prefix instead of "do_fs_" --- Greg Kurz (5): tests/9pfs: Factor out do_version() helper tests/9pfs: Turn fs_readdir_split() into a helper

Re: [PATCH 1/5] tests/9pfs: Factor out do_fs_version() helper

2020-10-20 Thread Greg Kurz
On Tue, 20 Oct 2020 17:34:05 +0200 Christian Schoenebeck wrote: > On Dienstag, 20. Oktober 2020 17:11:05 CEST Greg Kurz wrote: > > fs_version() is a top level test function. Factor out the sugar > > to a separate helper instead of hijacking it in other tests. > > > &g

[PATCH 5/5] tests/9pfs: Turn fs_mkdir() into a helper

2020-10-20 Thread Greg Kurz
fs_mkdir() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c |7 ++- 1 file changed

[PATCH 2/5] tests/9pfs: Turn fs_readdir_split() into a helper

2020-10-20 Thread Greg Kurz
fs_readdir_split() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 14 +++--

[PATCH 1/5] tests/9pfs: Factor out do_fs_version() helper

2020-10-20 Thread Greg Kurz
fs_version() is a top level test function. Factor out the sugar to a separate helper instead of hijacking it in other tests. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/qtest/virtio-9p

[PATCH 4/5] tests/9pfs: Factor out do_fs_attach() helper

2020-10-20 Thread Greg Kurz
fs_attach() is a top level test function. Factor out the sugar to a separate helper instead of hijacking it in other tests. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/qtest

[PATCH 0/5] tests/9pfs: Code refactoring

2020-10-20 Thread Greg Kurz
Some code refactoring to have a clear distinction between top level test functions and helper functions. --- Greg Kurz (5): tests/9pfs: Factor out do_fs_version() helper tests/9pfs: Turn fs_readdir_split() into a helper tests/9pfs: Set alloc in fs_create_dir() tests/9pfs

[PATCH 3/5] tests/9pfs: Set alloc in fs_create_dir()

2020-10-20 Thread Greg Kurz
fs_create_dir() is a top level test function. It should set alloc. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c |1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index d0cdc14fee3e..95638662e14d 100644 --- a/tests

Re: [PATCH 1/8] tests/9pfs: simplify fs_mkdir()

2020-10-20 Thread Greg Kurz
On Tue, 20 Oct 2020 15:43:21 +0200 Christian Schoenebeck wrote: > On Dienstag, 20. Oktober 2020 15:35:36 CEST Greg Kurz wrote: > > On Tue, 20 Oct 2020 01:13:23 +0200 > > > > Christian Schoenebeck wrote: > > > Split out walking a directory path to a

Re: [PATCH 1/8] tests/9pfs: simplify fs_mkdir()

2020-10-20 Thread Greg Kurz
On Tue, 20 Oct 2020 01:13:23 +0200 Christian Schoenebeck wrote: > Split out walking a directory path to a separate new utility function > fs_walk_fid() and use that function in fs_mkdir(). > > The code difference saved this way is not much, but we'll use that new > fs_walk_fid() function in the

Re: [PULL v3 2/6] tests/9pfs: change qtest name prefix to synth

2020-10-20 Thread Greg Kurz
On Tue, 20 Oct 2020 11:43:18 +0200 Christian Schoenebeck wrote: > On Dienstag, 20. Oktober 2020 09:36:10 CEST Philippe Mathieu-Daudé wrote: > > On 10/8/20 8:34 PM, Christian Schoenebeck wrote: > > > All existing 9pfs test cases are using the 'synth' fs driver so far, which > > > means they are no

Re: [PATCH 1/1] 9pfs: suppress performance warnings on qtest runs

2020-10-19 Thread Greg Kurz
On Mon, 19 Oct 2020 14:12:46 +0200 Christian Schoenebeck wrote: > On Montag, 19. Oktober 2020 13:48:22 CEST Greg Kurz wrote: > > On Mon, 19 Oct 2020 13:10:18 +0200 > > > > Christian Schoenebeck wrote: > > > Don't trigger any performance warning if we'r

Re: [PATCH 1/1] 9pfs: suppress performance warnings on qtest runs

2020-10-19 Thread Greg Kurz
river > backend only. This patch suppresses them for all 9p fs driver backends. > > Signed-off-by: Christian Schoenebeck > --- LGTM Reviewed-by: Greg Kurz > hw/9pfs/9p-synth.c | 2 -- > hw/9pfs/virtio-9p-device.c | 6 ++ > 2 files changed, 6 insertions(+), 2 deleti

[PATCH 4/5] spapr: Pass &error_abort when getting some PC DIMM properties

2020-10-19 Thread Greg Kurz
should thus be always gettable for both PC DIMMs and NVDIMMs. An error in getting them can only be the result of a programming error. It doesn't make much sense to propagate the error in this case. Abort instead. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 17 +++-- 1 file ch

[PATCH 3/5] spapr: Use appropriate getter for PC_DIMM_SLOT_PROP

2020-10-19 Thread Greg Kurz
() succeeded, we expect to have a valid >= 0 slot number, either because the user passed a valid slot number or because pc_dimm_get_free_slot() picked one up for us. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr.

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

2020-10-19 Thread Greg Kurz
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 spapr_memory_plug(). This allows to get rid of the error propagation overhead. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c

[PATCH 2/5] spapr: Use appropriate getter for PC_DIMM_ADDR_PROP

2020-10-19 Thread Greg Kurz
The PC_DIMM_ADDR_PROP property is defined as: DEFINE_PROP_UINT64(PC_DIMM_ADDR_PROP, PCDIMMDevice, addr, 0), Use object_property_get_uint() instead of object_property_get_int(). Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 1/5] pc-dimm: Drop @errp argument of pc_dimm_plug()

2020-10-19 Thread Greg Kurz
pc_dimm_plug() doesn't use it. It only aborts on error. Drop @errp and adapt the callers accordingly. Signed-off-by: Greg Kurz --- hw/arm/virt.c|9 + hw/i386/pc.c |8 +--- hw/mem/pc-dimm.c |2 +- hw/ppc/spapr.c |

[PATCH 0/5] spapr: Error handling fixes and cleanups (round 3)

2020-10-19 Thread Greg Kurz
ment of pc_dimm_plug(). This affects several platforms other than sPAPR but I guess the patch is trivial enough to go through David's tree if it gets acks from the relevant maintainers. --- Greg Kurz (5): pc-dimm: Drop @errp argument of pc_dimm_plug() spapr: Use appropriate get

Re: [PATCH] ppc/spapr: re-assert IRQs during event-scan if there are pending

2020-10-15 Thread Greg Kurz
ert(source->enabled); > +qemu_irq_pulse(spapr_qirq(spapr, source->irq)); > +} > +} > + This looks good but any reason for not putting this in a function called by both event_scan() and check_exception() ? Anyway, this can be done as a follow-up: Reviewed-by: Greg Kurz > rtas_st(rets, 0, RTAS_OUT_NO_ERRORS_FOUND); > } >

[PATCH v2 1/5] spapr: Fix leak of CPU machine specific data

2020-10-15 Thread Greg Kurz
spapr_cpu_core_realize(). Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index b03620823adb..c55211214524 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc

[PATCH v2 0/5] spapr: Fix and cleanups for sPAPR CPU core

2020-10-15 Thread Greg Kurz
lug of CPU cores. Also tested error paths by simulating failures when creating interrupt presenters or when setting the vCPU id. v2: - enforce symmetry between realize and unrealize - unrealize vCPUs with qdev_unrealize() - one loop to create/realize and to unrealize/delete vCPUs --- Gr

[PATCH v2 5/5] spapr: Simplify spapr_cpu_core_realize() and spapr_cpu_core_unrealize()

2020-10-15 Thread Greg Kurz
Now that the error path of spapr_cpu_core_realize() is just to call idempotent spapr_cpu_core_unrealize() for rollback, no need to create and realize the vCPUs in two separate loops. Merge them and do them same in spapr_cpu_core_unrealize() for symmetry. Signed-off-by: Greg Kurz --- hw/ppc

[PATCH v2 2/5] spapr: Unrealize vCPUs with qdev_unrealize()

2020-10-15 Thread Greg Kurz
have the sPAPR CPU core code to call qdev_unrealize(). This requires to add a missing stub because translate_init.c.inc is also compiled for user mode. Signed-off-by: Greg Kurz --- accel/tcg/user-exec-stub.c |4 hw/ppc/spapr_cpu_core.c |4 ++-- target/ppc/translate_in

[PATCH v2 3/5] spapr: Drop spapr_delete_vcpu() unused argument

2020-10-15 Thread Greg Kurz
The 'sc' argument is unused. Drop it. Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index e4aeb93c0299..45eb2121876e 100644 --- a/hw/ppc/spapr_cpu_co

[PATCH v2 4/5] spapr: Make spapr_cpu_core_unrealize() idempotent

2020-10-15 Thread Greg Kurz
mless, - allocate the array of vCPUs with g_new0() to be able to filter out unused slots, - make sure to only unrealize vCPUs that have been already realized. Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c | 41 + 1 file changed, 21 insertions(+

[PATCH] Makefile: Ensure cscope.out/tags/TAGS are generated in the source tree

2020-10-15 Thread Greg Kurz
Tools usually expect the index files to be in the source tree, eg. emacs. This is already the case when doing out-of-tree builds, but with in-tree builds they end up in the build directory. Force cscope, ctags and etags to put them in the source tree. Signed-off-by: Greg Kurz --- Makefile

Re: [PATCH v4 08/12] tests/9pfs: change qtest name prefix to synth

2020-10-14 Thread Greg Kurz
On Wed, 14 Oct 2020 17:25:35 +0200 Christian Schoenebeck wrote: > On Donnerstag, 8. Oktober 2020 20:34:56 CEST Christian Schoenebeck wrote: > > All existing 9pfs test cases are using the 'synth' fs driver so far, which > > means they are not accessing real files, but a purely simulated (in RAM >

[PATCH] cpus: Drop declaration of cpu_remove()

2020-10-14 Thread Greg Kurz
n removing a vCPU") Cc: pbonz...@redhat.com Signed-off-by: Greg Kurz --- include/hw/core/cpu.h |8 1 file changed, 8 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 4879f2502659..ace443e88297 100644 --- a/include/hw/core/cpu.h +++ b/includ

Re: [PATCH] Makefile: Add *.[ch].inc files to cscope/ctags/TAGS

2020-10-13 Thread Greg Kurz
On Tue, 13 Oct 2020 11:05:53 +0200 Greg Kurz wrote: > The code base has some C source and header files that don't get indexed > because their name ends with .inc: > > $ git ls-files "*.[ch].inc" | wc -l > 66 > > Add them to the list. > > Signed-of

[PATCH v2] Makefile: Add *.[ch].inc files to cscope/ctags/TAGS

2020-10-13 Thread Greg Kurz
The code base has some C source and header files that don't get indexed because their name ends with .inc: $ git ls-files "*.[ch].inc" | wc -l 66 Add them to the list. Signed-off-by: Greg Kurz -- v2: add the missing \( and \) --- Makefile |2 +- 1 file changed, 1 insertion

[PATCH] Makefile: Add *.[ch].inc files to cscope/ctags/TAGS

2020-10-13 Thread Greg Kurz
The code base has some C source and header files that don't get indexed because their name ends with .inc: $ git ls-files "*.[ch].inc" | wc -l 66 Add them to the list. Signed-off-by: Greg Kurz --- Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

Re: [PATCH] spapr: Move spapr_create_nvdimm_dr_connectors() to core machine code

2020-10-13 Thread Greg Kurz
On Tue, 13 Oct 2020 11:40:14 +1100 David Gibson wrote: > On Mon, Oct 12, 2020 at 12:15:21PM +0200, Greg Kurz wrote: > > The spapr_create_nvdimm_dr_connectors() function doesn't need to access > > any internal details of the sPAPR NVDIMM implementation. Also, pretty > &

Re: [PATCH 4/4] spapr: Make spapr_cpu_core_unrealize() idempotent

2020-10-12 Thread Greg Kurz
On Mon, 12 Oct 2020 17:20:07 +0200 Greg Kurz wrote: > spapr_cpu_core_realize() has an err_unrealize label which partially > duplicates the code of spapr_cpu_core_realize(). > > Let's make spapr_cpu_core_unrealize() idempotent and call it instead. > The registration and u

[PATCH 1/4] spapr: Fix leak of CPU machine specific data

2020-10-12 Thread Greg Kurz
When a CPU core is being removed, the machine specific data of each CPU thread object is leaked. Fix this by calling the dedicated helper we have for that instead of simply unparenting the CPU object. Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c | 20 ++-- 1 file

[PATCH 0/4] spapr: Fix and cleanups for sPAPR CPU core

2020-10-12 Thread Greg Kurz
While reading the code _again_ I spotted a memory leak and I realized we can simplify some paths that deal with vCPU removal. --- Greg Kurz (4): spapr: Fix leak of CPU machine specific data spapr: Drop spapr_delete_vcpu() unused argument spapr: Introduce an .instance_finalize

[PATCH 4/4] spapr: Make spapr_cpu_core_unrealize() idempotent

2020-10-12 Thread Greg Kurz
more. Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index cffd74f542ba..e3fd81eb9741 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_c

[PATCH 3/4] spapr: Introduce an .instance_finalize hook for TYPE_SPAPR_CPU_CORE

2020-10-12 Thread Greg Kurz
zeroes so that the finalize hook can be made idempotent. Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 64ce6a0cb781..cffd74f542ba 100644

[PATCH 2/4] spapr: Drop spapr_delete_vcpu() unused argument

2020-10-12 Thread Greg Kurz
The 'sc' argument is unused. Drop it. Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index b6b217876750..64ce6a0cb781 100644 --- a/hw/ppc/spapr_cpu_co

Re: [PATCH qemu v9] spapr: Implement Open Firmware client interface

2020-10-12 Thread Greg Kurz
On Mon, 12 Oct 2020 13:40:33 +0200 BALATON Zoltan via wrote: > On Mon, 12 Oct 2020, Alexey Kardashevskiy wrote: > > On 29/09/2020 20:35, Alexey Kardashevskiy wrote: > >> > >> On 16/07/2020 23:22, David Gibson wrote: > >>> On Thu, Jul 16, 2020 at 07:04:56PM +1000, Alexey Kardashevskiy wrote: > >>

[PATCH] spapr: Clarify why DR connectors aren't user creatable

2020-10-12 Thread Greg Kurz
PHB (PCI devices). Signed-off-by: Greg Kurz --- hw/ppc/spapr_drc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 697b28c34305..77718cde1ff2 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -586,7 +586,8 @@ static

[PATCH] spapr: Move spapr_create_nvdimm_dr_connectors() to core machine code

2020-10-12 Thread Greg Kurz
ction static in hw/ppc/spapr.c. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c| 10 ++ hw/ppc/spapr_nvdimm.c | 11 --- include/hw/ppc/spapr_nvdimm.h |1 - 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c

Re: [PATCH] hw/net: move allocation to the heap due to very large stack frame

2020-10-09 Thread Greg Kurz
e > Something seems to have gone wrong with the message body here, which results in an awkward changelog... but maybe someone can fix that when applying the patch. > Signed-off-by: Elena Afanasova > --- Reviewed-by: Greg Kurz > hw/net/spapr_llan.c | 5 +++-- > 1 file changed

Re: [PATCH v4 0/5] pseries NUMA distance calculation

2020-10-08 Thread Greg Kurz
On Wed, 7 Oct 2020 14:28:44 -0300 Daniel Henrique Barboza wrote: > This forth version is based on review comments and suggestion Series for SLOF ? ;-) ;-) ;-) > from David in v3. > > changes from v3: > - patch 4: > * copied the explanation in spapr_numa_define_associativity_domains() >

[PATCH] vhost: Don't special case vq->used_phys in vhost_get_log_size()

2020-10-07 Thread Greg Kurz
o abort. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1879349 Signed-off-by: Greg Kurz --- This supersedes "vhost: Ignore vrings in dirty log when using a vIOMMU" http://patchwork.ozlabs.org/project/qemu-devel/patch/160105498386.68108.2145229309875282336.st...@bahia.lan/ --- hw/virtio

Re: [PATCH v2 6/6] spapr/xive: Introduce a new CAS value for the StoreEOI capability

2020-10-07 Thread Greg Kurz
On Tue, 6 Oct 2020 19:56:20 +0200 Cédric Le Goater wrote: > On 10/6/20 7:39 PM, Greg Kurz wrote: > > On Mon, 5 Oct 2020 18:51:47 +0200 > > Cédric Le Goater wrote: > > > >> When the StoreEOI capability is set to "cas", let CAS decide when > >> S

Re: [PATCH v2 3/6] spapr/xive: Add a warning when StoreEOI is activated on POWER9 CPUs

2020-10-07 Thread Greg Kurz
On Tue, 6 Oct 2020 19:03:28 +0200 Cédric Le Goater wrote: > On 10/6/20 6:58 PM, Greg Kurz wrote: > > On Mon, 5 Oct 2020 18:51:44 +0200 > > Cédric Le Goater wrote: > > > >> StoreEOI on POWER9 CPUs is racy because load-after-store ordering is > >> not enfor

Re: [PATCH v2 5/6] spapr/xive: Activate StoreEOI at the source level

2020-10-07 Thread Greg Kurz
On Tue, 6 Oct 2020 19:41:28 +0200 Cédric Le Goater wrote: > On 10/6/20 7:06 PM, Greg Kurz wrote: > > On Mon, 5 Oct 2020 18:51:46 +0200 > > Cédric Le Goater wrote: > > > >> When the StoreEOI capability is "on", the H_INT_GET_SOURCE_INFO will > >

Re: [PATCH v2 1/6] spapr/xive: Introduce a StoreEOI capability

2020-10-07 Thread Greg Kurz
On Wed, 7 Oct 2020 07:59:26 +0200 Cédric Le Goater wrote: > > > On 10/6/20 6:42 PM, Greg Kurz wrote: > > On Mon, 5 Oct 2020 18:51:42 +0200 > > Cédric Le Goater wrote: > > > >> When an interrupt has been handled, the OS notifies the interrupt > >>

Re: [PATCH v2 6/6] spapr/xive: Introduce a new CAS value for the StoreEOI capability

2020-10-06 Thread Greg Kurz
On Mon, 5 Oct 2020 18:51:47 +0200 Cédric Le Goater wrote: > When the StoreEOI capability is set to "cas", let CAS decide when > StoreEOI should be advertised. StoreEOI is safe to use with a P10 > compat machine because the OS enforces load-after-store ordering but > not with P9 compat. > > The q

Re: [PATCH v2 5/6] spapr/xive: Activate StoreEOI at the source level

2020-10-06 Thread Greg Kurz
On Mon, 5 Oct 2020 18:51:46 +0200 Cédric Le Goater wrote: > When the StoreEOI capability is "on", the H_INT_GET_SOURCE_INFO will > set the StoreEOI flag for all sources. This could be an issue if > StoreEOI is not supported on a specific source, of a passthrough > device for instance. In that cas

Re: [PATCH v2 4/6] spapr/xive: Enforce load-after-store ordering

2020-10-06 Thread Greg Kurz
of this offset to quiesce the sources before a > migration. Enforce the load-after-store ordering always when doing so > without querying the characteristics of the sources on the host. The > performance penalty will be very small for QEMU. > > Signed-off-by: Cédric Le Goater

Re: [PATCH v2 3/6] spapr/xive: Add a warning when StoreEOI is activated on POWER9 CPUs

2020-10-06 Thread Greg Kurz
On Mon, 5 Oct 2020 18:51:44 +0200 Cédric Le Goater wrote: > StoreEOI on POWER9 CPUs is racy because load-after-store ordering is > not enforced. > > Signed-off-by: Cédric Le Goater > --- > hw/ppc/spapr_caps.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/hw/ppc/spapr_caps.

Re: [PATCH v2 2/6] spapr/xive: Add a warning when StoreEOI is activated on POWER8 CPUs

2020-10-06 Thread Greg Kurz
On Mon, 5 Oct 2020 18:51:43 +0200 Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- > hw/ppc/spapr_caps.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c > index 57c62c22e4cc..b0a9d0227db2 100644 > --- a/hw/ppc/spapr_caps

Re: [PATCH v2 1/6] spapr/xive: Introduce a StoreEOI capability

2020-10-06 Thread Greg Kurz
On Mon, 5 Oct 2020 18:51:42 +0200 Cédric Le Goater wrote: > When an interrupt has been handled, the OS notifies the interrupt > controller with an EOI sequence. On the XIVE interrupt controller > (POWER9 and POWER10), this can be done with a load or a store > operation on the ESB interrupt manage

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

2020-10-06 Thread Greg Kurz
On Tue, 6 Oct 2020 06:49:28 -0400 "Michael S. Tsirkin" wrote: > On Tue, Oct 06, 2020 at 11:58:50AM +0200, Greg Kurz wrote: > > On Mon, 5 Oct 2020 10:18:03 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Sep 28, 2020 at 09:37:18AM +020

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

2020-10-06 Thread Greg Kurz
On Mon, 5 Oct 2020 10:18:03 -0400 "Michael S. Tsirkin" wrote: > On Mon, Sep 28, 2020 at 09:37:18AM +0200, Greg Kurz wrote: > > On Mon, 28 Sep 2020 16:23:43 +1000 > > David Gibson wrote: > > > > > On Fri, Sep 25, 2020 at 07:29:43PM +0200, Greg Kurz wrot

[PATCH v3 3/3] vhost: Don't call log_access_ok() when using IOTLB

2020-10-03 Thread Greg Kurz
the used structure when there isn't an IOTLB device around. Signed-off-by: Greg Kurz --- drivers/vhost/vhost.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 9d2c225fb518..9ad45e1d27f0 100644

[PATCH v3 2/3] vhost: Use vhost_get_used_size() in vhost_vring_set_addr()

2020-10-03 Thread Greg Kurz
The open-coded computation of the used size doesn't take the event into account when the VIRTIO_RING_F_EVENT_IDX feature is present. Fix that by using vhost_get_used_size(). Signed-off-by: Greg Kurz --- drivers/vhost/vhost.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v3 0/3] vhost: Skip access checks on GIOVAs

2020-10-03 Thread Greg Kurz
tch 2 from v2 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 (3): vhost: Don't call access_ok() when using IOTLB vhost: Use vhost_get_used_size() in vhost_vring_set_

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

2020-10-03 Thread Greg Kurz
t.com CC: sta...@vger.kernel.org # 4.14+ Signed-off-by: Greg Kurz Acked-by: Jason Wang --- 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/

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

2020-10-03 Thread Greg Kurz
On Sat, 3 Oct 2020 09:58:59 +0800 Jason Wang wrote: > > On 2020/9/30 上午12:30, Greg Kurz wrote: > > When the IOTLB device is enabled, the log_guest_addr that is passed by > > userspace to the VHOST_SET_VRING_ADDR ioctl, and which is then written > > to vq->log_addr

[PATCH] hw/acpi/piix4: Rename piix4_pm_add_propeties() to piix4_pm_add_properties()

2020-10-02 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/acpi/piix4.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 894d357f8c35..67a1ea41914f 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -437,7 +437,7 @@ static void piix4_pm_machine_ready

Re: [PATCH v2 11/11] tests/9pfs: add local Tmkdir test

2020-10-02 Thread Greg Kurz
On Fri, 2 Oct 2020 13:56:14 +0100 Daniel P. Berrangé wrote: > On Fri, Oct 02, 2020 at 01:51:54PM +0200, Christian Schoenebeck wrote: > > This test case uses the 9pfs 'local' driver to create a directory > > and then checks if the expected directory was actually created > > (as real directory) on

Re: [PATCH] ppc/pnv: Increase max firware size

2020-10-02 Thread Greg Kurz
On Fri, 2 Oct 2020 08:15:46 +0200 Cédric Le Goater wrote: > That was sent a bit fast. Can you please add in the commit log : > > Builds enabling GCOV can be bigger than 4MB and the limit on FSP > systems is 16MB. > > Thanks > And also s/firware/firmware in the title. Cheers, -- Greg

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