[PATCH for-6.0 v2 3/4] spapr: Simplify error path of spapr_core_plug()

2020-12-01 Thread Greg Kurz
spapr_drc_attach() shouldn't fail. Pass &error_abort to spapr_drc_attach() and simplify error handling. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 3a3

[PATCH for-6.0 v2 2/4] spapr: Abort if ppc_set_compat() fails for hot-plugged CPUs

2020-12-01 Thread Greg Kurz
ame value that was valid for the boot CPU, it should definitely not fail for hot-plugged CPUS. Pass &error_abort to ppc_set_compat(). Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/

[PATCH for-6.0 v2 1/4] spapr: Fix pre-2.10 dummy ICP hack

2020-12-01 Thread Greg Kurz
the end of spapr_core_plug(). Signed-off-by: Greg Kurz --- The next patch makes this patch a bit useless. I post it anyway for the records because it is a programming error. --- hw/ppc/spapr.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/p

[PATCH for-6.0 v2 0/4] spapr: Perform hotplug sanity checks at pre-plug

2020-12-01 Thread Greg Kurz
iling conditions are caught at pre-plug time instead of plug time for all devices. v2: - hopefully less fragile way of setting compat mode for hot-plugged CPUs Greg Kurz (4): spapr: Fix pre-2.10 dummy ICP hack spapr: Abort if ppc_set_compat() fails for hot-plugged CPUs spapr: Simplify error pa

Re: [PATCH for-6.0 v2 1/3] spapr: Improve naming of some vCPU id related items

2020-11-30 Thread Greg Kurz
On Mon, 30 Nov 2020 18:32:27 +0100 Cédric Le Goater wrote: > On 11/30/20 5:52 PM, Greg Kurz wrote: > > The machine tells the IC backend the number of vCPU ids it will be > > exposed to, in order to: > > - fill the "ibm,interrupt-server-ranges" property in the DT

[PATCH for-6.0 v2 1/3] spapr: Improve naming of some vCPU id related items

2020-11-30 Thread Greg Kurz
server_number" naming can mislead people info thinking it is about a quantity of CPUs. Make it clear this is all about vCPU ids. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr.h | 2 +- include/hw/ppc/spapr_irq.h | 8 include/hw/ppc/spapr_xive.h | 2 +- include/hw/ppc

[PATCH for-6.0 v2 2/3] spapr/xive: Fix size of END table and number of claimed IPIs

2020-11-30 Thread Greg Kurz
ids() in spapr_irq_init() for the latest machine type. Older machine types continue to use spapr_max_vcpu_ids() since the size of the ENDT is migration visible. [1] https://bugs.launchpad.net/qemu/+bug/1900241 Signed-off-by: Greg Kurz --- include/hw/ppc/spapr.h | 1 + hw/ppc/spapr.c |

[PATCH for-6.0 v2 0/3] spapr: Address the confusion between IPI numbers and vCPU ids

2020-11-30 Thread Greg Kurz
Updated the cover letter accordingly. - completely new approach. Instead of messing with device properties, pass the appropriate values to the IC backend handlers. - rename a few things using the "max_vcpu_ids" wording instead of "nr_servers" and "max_server_

[PATCH for-6.0 v2 3/3] spapr/xive: Fix the "ibm, xive-lisn-ranges" property

2020-11-30 Thread Greg Kurz
dt() handler to convey the maximum number of vCPUs. Have the latest machine type to pass smp.max_cpus and sPAPR XIVE to use that for "ibm,xive-lisn-ranges". Older machine types go on with the previous behavior since this is guest visible. Signed-off-by: Greg Kurz --- include/hw

Re: [PATCH for-6.0 4/9] spapr: Set compat mode in spapr_reset_vcpu()

2020-11-27 Thread Greg Kurz
On Fri, 27 Nov 2020 15:59:16 +1100 David Gibson wrote: [...] > > > > This can't happen AFAICT. > > > > (qemu) qom-get /machine/unattached/device[1] core-id > > 0 > > (qemu) device_del /machine/unattached/device[1] > > Error: Boot CPU core may not be unplugged > > > > commit 62be8b044adf47327eb

Re: [PATCH] virtfs-proxy-helper: Fix a resource leak in main()

2020-11-27 Thread Greg Kurz
On Thu, 26 Nov 2020 19:44:24 +0100 Christian Schoenebeck wrote: [...] > > The only justification that'd deserve to be in the changelog of > > such a patch is something like "because this is good practice > > to rollback in case code moves to another function than main()". > > Well, the actual mo

Re: [PATCH] virtfs-proxy-helper: Fix a resource leak in main()

2020-11-26 Thread Greg Kurz
On Thu, 26 Nov 2020 18:52:39 +0100 Christian Schoenebeck wrote: > On Donnerstag, 26. November 2020 14:15:51 CET Alex Chen wrote: > > Hi Greg, > > > > Thanks for your review. > > > > On 2020/11/26 20:07, Greg Kurz wrote: > > > On Thu, 26 Nov 2020 10

Re: [PATCH] virtfs-proxy-helper: Fix a resource leak in main()

2020-11-26 Thread Greg Kurz
On Thu, 26 Nov 2020 10:16:24 + Alex Chen wrote: > Only one of the options -s and -f can be used. When -f is used, > the fd is created externally and does not need to be closed. The process running virtfs-proxy-helper has its own copy of the fd inherited from its parent. And this fd will be c

Re: [PATCH for-6.0 4/9] spapr: Set compat mode in spapr_reset_vcpu()

2020-11-26 Thread Greg Kurz
On Thu, 26 Nov 2020 15:57:37 +1100 David Gibson wrote: > On Wed, Nov 25, 2020 at 10:51:05AM +0100, Greg Kurz wrote: > > On Wed, 25 Nov 2020 13:39:47 +1100 > > David Gibson wrote: > > > > > On Mon, Nov 23, 2020 at 12:51:08PM +0100, Greg Kurz wrote: > > &g

Re: [PATCH for-6.0 2/8] spapr/xive: Introduce spapr_xive_nr_ends()

2020-11-25 Thread Greg Kurz
On Mon, 23 Nov 2020 14:33:55 +1100 David Gibson wrote: > On Fri, Nov 20, 2020 at 06:46:40PM +0100, Greg Kurz wrote: > > We're going to kill the "nr_ends" field in a subsequent patch. > > Prepare ground by using an helper instead of peeking into > &g

Re: [PATCH for-6.0 2/8] spapr/xive: Introduce spapr_xive_nr_ends()

2020-11-25 Thread Greg Kurz
On Wed, 25 Nov 2020 12:34:25 +0100 Cédric Le Goater wrote: > > >>> This complexifies migration because we have to guess at > >>> post load if we should claim the IPI in KVM or not. The > >>> simple presence of the vCPU isn't enough : we need to > >>> guess if the guest actually configured the I

Re: [PATCH for-6.0 4/9] spapr: Set compat mode in spapr_reset_vcpu()

2020-11-25 Thread Greg Kurz
On Wed, 25 Nov 2020 13:39:47 +1100 David Gibson wrote: > On Mon, Nov 23, 2020 at 12:51:08PM +0100, Greg Kurz wrote: > > On Mon, 23 Nov 2020 16:11:30 +1100 > > David Gibson wrote: > > > > > On Sat, Nov 21, 2020 at 12:42:03AM +0100, Greg Kurz wrote: > > >

Re: [PATCH for-6.0 2/8] spapr/xive: Introduce spapr_xive_nr_ends()

2020-11-25 Thread Greg Kurz
On Tue, 24 Nov 2020 18:56:02 +0100 Cédric Le Goater wrote: [...] > > > > I guess you're talking about KVM_DEV_XIVE_NR_SERVERS in > > kvmppc_xive_connect() actually. We're currently passing > > spapr_max_server_number() (vCPU id) but you might be > > right. > > > > I need to re-read the story a

Re: [PATCH for-6.0 4/8] spapr/xive: Add "nr-ipis" property

2020-11-24 Thread Greg Kurz
On Mon, 23 Nov 2020 11:13:21 +0100 Cédric Le Goater wrote: > On 11/20/20 6:46 PM, Greg Kurz wrote: > > The sPAPR XIVE device exposes a range of LISNs that the guest uses > > for IPIs. This range is currently sized according to the highest > > vCPU id, ie. spapr_max_server_

Re: [PATCH for-6.0 2/8] spapr/xive: Introduce spapr_xive_nr_ends()

2020-11-24 Thread Greg Kurz
On Tue, 24 Nov 2020 14:54:38 +0100 Cédric Le Goater wrote: > On 11/23/20 12:16 PM, Greg Kurz wrote: > > On Mon, 23 Nov 2020 10:46:38 +0100 > > Cédric Le Goater wrote: > > > >> On 11/20/20 6:46 PM, Greg Kurz wrote: > >>> We're going to

Re: [PATCH for-6.0 5/9] spapr: Simplify error path of spapr_core_plug()

2020-11-24 Thread Greg Kurz
On Mon, 23 Nov 2020 16:13:18 +1100 David Gibson wrote: > On Sat, Nov 21, 2020 at 12:42:04AM +0100, Greg Kurz wrote: > > spapr_core_pre_plug() already guarantees that the slot for the given core > > ID is available. It is thus safe to assume that spapr_find_cpu_slot() > >

[PULL 1/1] tests/9pfs: Mark "local" tests as "slow"

2020-11-24 Thread Greg Kurz
ts as "slow" so that they aren't executed with a simple "make check" like in the case above. Reported-by: Cole Robinson Signed-off-by: Greg Kurz Reviewed-by: Thomas Huth Acked-by: Christian Schoenebeck Message-Id: <160620382310.1423262.7364287092069513483.st...@bahia.l

[PULL 0/1] 9p fixes for 5.2 2020-11-24

2020-11-24 Thread Greg Kurz
anted breakage of "make check" with some configurations (eg. Fedora's Copr automatic build system). ---- Greg Kurz (1): tests/9pfs: Mark "local" tests as "slow" tests/qtest/virtio-9p-test.c | 9 + 1 file changed, 9 insertions(+) -- 2.26.2

Re: [PATCH v2 for-5.2] tests/9pfs: Mark "local" tests as "slow"

2020-11-24 Thread Greg Kurz
On Tue, 24 Nov 2020 08:54:38 +0100 Thomas Huth wrote: > On 24/11/2020 08.43, Greg Kurz wrote: > > The "local" tests can fail on some automated build systems as > > reported here: > > > > https://lists.nongnu.org/archive/html/qemu-devel/2020-11/msg055

[PATCH v2 for-5.2] tests/9pfs: Mark "local" tests as "slow"

2020-11-23 Thread Greg Kurz
ts as "slow" so that they aren't executed with a simple "make check" like in the case above. Reported-by: Cole Robinson Signed-off-by: Greg Kurz --- v2: - less noisy patch --- tests/qtest/virtio-9p-test.c |9 + 1 file changed, 9 insertions(+) diff --git a/te

Re: [PATCH for-5.2] tests/9pfs: Mark "local" tests as "slow"

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 19:08:18 +0100 Christian Schoenebeck wrote: > On Montag, 23. November 2020 18:41:51 CET Greg Kurz wrote: > > The "local" tests can fail on some automated build systems as > > reported here: > > > > https://lists.nongnu.org/archive/

Re: [PATCH for-5.2] tests/9pfs: Mark "local" tests as "slow"

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 20:35:58 +0100 Christian Schoenebeck wrote: > On Montag, 23. November 2020 19:08:18 CET Christian Schoenebeck wrote: > > On Montag, 23. November 2020 18:41:51 CET Greg Kurz wrote: > > > The "local" tests can fail on some automated build sy

[PATCH for-5.2] tests/9pfs: Mark "local" tests as "slow"

2020-11-23 Thread Greg Kurz
ts as "slow" so that they aren't executed with a simple "make check" like in the case above. Reported-by: Cole Robinson Signed-off-by: Greg Kurz --- Unless there's a strong argument against merging this, I'll post a PR with this fix for RC3. --- tests/qtest/vi

Re: virtio-9p-test.c:300:v9fs_req_recv: assertion failed (hdr.id == id): (7 == 73)

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 14:48:15 +0100 Christian Schoenebeck wrote: > On Montag, 23. November 2020 14:17:34 CET Greg Kurz wrote: [...] > > Yeah, looks like the mkdir() call which is supposed to create the 9p test > directory, is failing there for some reason. The question is how

Re: virtio-9p-test.c:300:v9fs_req_recv: assertion failed (hdr.id == id): (7 == 73)

2020-11-23 Thread Greg Kurz
Fixed maintainer's address: s/o...@crudebyte.com/qemu_...@crudebyte.com On Sat, 21 Nov 2020 17:03:14 -0500 Cole Robinson wrote: > Hi, I'm consistently seeing this assertion running the qemu-5.2.0 test > suite. rc0, rc1, rc2 have been consistently affected, it reproduces > consistently in parts

Re: [PATCH for-6.0 4/9] spapr: Set compat mode in spapr_reset_vcpu()

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 16:11:30 +1100 David Gibson wrote: > On Sat, Nov 21, 2020 at 12:42:03AM +0100, Greg Kurz wrote: > > When it comes to resetting the compat mode of the vCPUS, there are > > two situations to consider: > > (1) machine reset should set the compat mode back t

Re: [PATCH for-6.0 3/8] spapr/xive: Add "nr-servers" property

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 10:56:13 +0100 Cédric Le Goater wrote: > On 11/20/20 6:46 PM, Greg Kurz wrote: > > The sPAPR XIVE object has an "nr-ends" property that is used > > to size the END table. This property is set by the machine > > code to a value derived from spap

Re: [PATCH for-6.0 2/8] spapr/xive: Introduce spapr_xive_nr_ends()

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 10:46:38 +0100 Cédric Le Goater wrote: > On 11/20/20 6:46 PM, Greg Kurz wrote: > > We're going to kill the "nr_ends" field in a subsequent patch. > > why ? it is one of the tables of the controller and its part of > the main XIVE concept

Re: [PATCH for-6.0 0/8] spapr: Address the confusion between IPI numbers and vCPU ids

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 09:04:42 +0100 Cédric Le Goater wrote: > On 11/20/20 6:46 PM, Greg Kurz wrote: > > A regression was recently fixed in the sPAPR XIVE code for QEMU 5.2 > > RC3 [1]. It boiled down to a confusion between IPI numbers and vCPU > > ids, which happen to be

Re: [PATCH for-6.0 7/8] spapr: Drop "nr_servers" argument of the sPAPR IC activate() operation

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 15:38:32 +1100 David Gibson wrote: > On Fri, Nov 20, 2020 at 06:46:45PM +0100, Greg Kurz wrote: > > This argument isn't used by the backends anymore. > > > > Signed-off-by: Greg Kurz > > --- > > include/hw/ppc/spapr_irq.h | 3 +

Re: [PATCH for-6.0 6/8] spapr/xics: Add "nr-servers" property

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 15:18:09 +1100 David Gibson wrote: > On Fri, Nov 20, 2020 at 06:46:44PM +0100, Greg Kurz wrote: > > The sPAPR ICS device exposes the range of vCPU ids it can handle in > > the "ibm,interrupt-server-ranges" FDT property. The highest vCPU > >

Re: [PATCH for-6.0 3/8] spapr/xive: Add "nr-servers" property

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 14:52:14 +1100 David Gibson wrote: > On Fri, Nov 20, 2020 at 06:46:41PM +0100, Greg Kurz wrote: > > The sPAPR XIVE object has an "nr-ends" property that is used > > to size the END table. This property is set by the machine > &g

[PATCH for-6.0 9/9] spapr: spapr_drc_attach() cannot fail

2020-11-20 Thread Greg Kurz
All users are passing &error_abort already. Document the fact that spapr_drc_attach() should only be passed a free DRC, which is supposedly the case if appropriate checking is done earlier. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_drc.h | 8 +++- hw/ppc/spapr.c

[PATCH for-6.0 4/9] spapr: Set compat mode in spapr_reset_vcpu()

2020-11-20 Thread Greg Kurz
ror path in spapr_core_plug(). It will allow further simplifications. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 16 hw/ppc/spapr_cpu_core.c | 13 + 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f58f77389e8e..d

[PATCH for-6.0 8/9] spapr: Do TPM proxy hotplug sanity checks at pre-plug

2020-11-20 Thread Greg Kurz
There can be only one TPM proxy at a time. This is currently checked at plug time. But this can be detected at pre-plug in order to error out earlier. This allows to get rid of error handling in the plug handler. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 23 ++- 1 file

[PATCH for-6.0 3/9] spapr: Fix pre-2.10 dummy ICP hack

2020-11-20 Thread Greg Kurz
the end of spapr_core_plug(). Signed-off-by: Greg Kurz --- The next patch makes this patch a bit useless. I post it anyway for the records because it is a programming error. --- hw/ppc/spapr.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/p

[PATCH for-6.0 7/9] spapr: Do PHB hoplug sanity check at pre-plug

2020-11-20 Thread Greg Kurz
We currently detect that a PHB index is already in use at plug time. But this can be decteted at pre-plug in order to error out earlier. This allows to pass &error_abort to spapr_drc_attach() and to end up with a plug handler that doesn't need to report errors anymore. Signed-off-by:

[PATCH for-6.0 1/9] spapr: Do PCI device hotplug sanity checks at pre-plug only

2020-11-20 Thread Greg Kurz
_abort to spapr_drc_attach() and to end up with a plug handler that doesn't need to report errors anymore. Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c | 43 +-- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/p

[PATCH for-6.0 5/9] spapr: Simplify error path of spapr_core_plug()

2020-11-20 Thread Greg Kurz
spapr_drc_attach() shouldn't fail. Pass &error_abort to spapr_drc_attach() and simplify error handling. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index da7

[PATCH for-6.0 2/9] spapr: Do NVDIMM/PC-DIMM device hotplug sanity checks at pre-plug only

2020-11-20 Thread Greg Kurz
_abort to spapr_drc_attach() in spapr_add_lmbs() and spapr_add_nvdimm(). This allows to greatly simplify error handling on the plug path. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_nvdimm.h | 2 +- hw/ppc/spapr.c| 40 --- hw/ppc/spapr_nvdimm.c

[PATCH for-6.0 6/9] spapr: Make PHB placement functions and spapr_pre_plug_phb() return status

2020-11-20 Thread Greg Kurz
Read documentation in "qapi/error.h" and changelog of commit e3fe3988d785 ("error: Document Error API usage rules") for rationale. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr.h | 2 +- hw/ppc/spapr.c | 40 +++- 2 files ch

[PATCH for-6.0 0/9] spapr: Perform hotplug sanity checks at pre-plug

2020-11-20 Thread Greg Kurz
iling conditions are caught at pre-plug time instead of plug time for all devices. Greg Kurz (9): spapr: Do PCI device hotplug sanity checks at pre-plug only spapr: Do NVDIMM/PC-DIMM device hotplug sanity checks at pre-plug only spapr: Fix pre-2.10 dummy ICP hack spapr: Set compat mo

[PATCH for-6.0 7/8] spapr: Drop "nr_servers" argument of the sPAPR IC activate() operation

2020-11-20 Thread Greg Kurz
This argument isn't used by the backends anymore. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_irq.h | 3 +-- hw/intc/spapr_xive.c | 3 +-- hw/intc/xics_spapr.c | 3 +-- hw/ppc/spapr_irq.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/in

[PATCH for-6.0 8/8] spapr: Drop "nr_servers" argument of the sPAPR IC dt() operation

2020-11-20 Thread Greg Kurz
This argument isn't used by the backends anymore. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_irq.h | 6 ++ hw/intc/spapr_xive.c | 4 ++-- hw/intc/xics_spapr.c | 4 ++-- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_irq.c | 5 ++--- 5 files changed, 9 inser

[PATCH for-6.0 2/8] spapr/xive: Introduce spapr_xive_nr_ends()

2020-11-20 Thread Greg Kurz
We're going to kill the "nr_ends" field in a subsequent patch. Prepare ground by using an helper instead of peeking into the sPAPR XIVE structure directly. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_xive.h | 1 + hw/intc/spapr_xive.c| 23 ++---

[PATCH for-6.0 6/8] spapr/xics: Add "nr-servers" property

2020-11-20 Thread Greg Kurz
"nr-servers" property and to use it for both purposes. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr.h | 4 ++-- include/hw/ppc/xics_spapr.h | 21 +--- hw/intc/xics_kvm.c | 2 +- hw/intc/xics_spapr.c| 38 - h

[PATCH for-6.0 0/8] spapr: Address the confusion between IPI numbers and vCPU ids

2020-11-20 Thread Greg Kurz
x only allocates one interrupt per vCPU and the higher part of the range was never used. [1] https://git.qemu.org/?p=qemu.git;a=commit;h=6d24795ee7e3199d199d3c415312c93382ad1807 Greg Kurz (8): spapr/xive: Turn some sanity checks into assertions spapr/xive: Introduce spapr_xive_nr_ends() spapr/xive:

[PATCH for-6.0 1/8] spapr/xive: Turn some sanity checks into assertions

2020-11-20 Thread Greg Kurz
which wouldn't make much sense by the way. Signed-off-by: Greg Kurz --- hw/intc/spapr_xive.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 1fa09f287ac0..60e0d5769dcc 100644 --- a/hw/intc/spapr_xive.c +

[PATCH for-6.0 3/8] spapr/xive: Add "nr-servers" property

2020-11-20 Thread Greg Kurz
will continue to be ignored as before without causing QEMU to exit. The associated nr_ends field cannot be dropped from SpaprXive because it is explicitly used by vmstate_spapr_xive(). It is thus renamed to nr_ends_vmstate. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_xive.h | 16

[PATCH for-6.0 5/8] spapr/xics: Drop unused argument to xics_kvm_has_broken_disconnect()

2020-11-20 Thread Greg Kurz
Never used from the start. Signed-off-by: Greg Kurz --- include/hw/ppc/xics_spapr.h | 2 +- hw/intc/xics_kvm.c | 2 +- hw/ppc/spapr_irq.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/ppc/xics_spapr.h b/include/hw/ppc/xics_spapr.h index

[PATCH for-6.0 4/8] spapr/xive: Add "nr-ipis" property

2020-11-20 Thread Greg Kurz
This doesn't cause any guest visible change when using the machine default settings (ie. VSMT == smp.threads). Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_xive.h | 8 hw/intc/spapr_xive.c| 4 +++- hw/ppc/spapr_irq.c | 4 +++- 3 files changed, 14 insertions(+), 2

[Bug 1900241] Re: [regression][powerpc] some vcpus are found offline inside guest with different vsmt setting from qemu-cmdline and breaks subsequent vcpu hotplug operation (xive)

2020-11-19 Thread Greg Kurz
Fixed by reverting the series that caused the regression. https://git.qemu.org/?p=qemu.git;a=commit;h=6d24795ee7e3199d199d3c415312c93382ad1807 The optimization needs to be reworked later. ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you

Re: [PULL 0/1] ppc-for-5.2 patch queue 2020-11-18

2020-11-18 Thread Greg Kurz
I created the PR manually and forgot to Cc qemu-ppc. Doing it now. On Wed, 18 Nov 2020 18:54:41 + Peter Maydell wrote: > On Wed, 18 Nov 2020 at 15:27, Greg Kurz wrote: > > > > The following changes since commit 66a300a107ec286725bdc943601cbd4247b82158: > > > >

[PULL 1/1] Revert series "spapr/xive: Allocate vCPU IPIs from the vCPU contexts"

2020-11-18 Thread Greg Kurz
spapr/xive: Allocate IPIs independently from the other sources") BugLink: https://bugs.launchpad.net/qemu/+bug/1900241 Signed-off-by: Greg Kurz Acked-by: Cédric Le Goater Message-Id: <160554086275.1325084.12110142252189044646.st...@bahia.lan> --- hw/intc/spapr_xive_kvm.c | 102 +++--

[PULL 0/1] ppc-for-5.2 patch queue 2020-11-18

2020-11-18 Thread Greg Kurz
cause IPIs end up misconfigured in the XIVE interrupt controller. Hopefully, the last fix for sPAPR. I'm sending this PR with the blessing of David who is currently on holidays. ---- Greg Kurz (1): Revert series "spapr/xive

Re: [PATCH for-5.2] Revert series "spapr/xive: Allocate vCPU IPIs from the vCPU contexts"

2020-11-16 Thread Greg Kurz
On Mon, 16 Nov 2020 16:54:32 +0100 Cédric Le Goater wrote: > On 11/16/20 4:34 PM, Greg Kurz wrote: > > This series was largely built on the assumption that IPI numbers are > > numerically equal to vCPU ids. Even if this happens to be the case > > in practice with the def

[PATCH for-5.2] Revert series "spapr/xive: Allocate vCPU IPIs from the vCPU contexts"

2020-11-16 Thread Greg Kurz
spapr/xive: Allocate IPIs independently from the other sources") BugLink: https://bugs.launchpad.net/qemu/+bug/1900241 Signed-off-by: Greg Kurz --- Peter, I'm Cc'ing you because we really want to fix this regression in 5.2. Reverting the culprit optimization seems a lot safer than the cha

Re: [PATCH for-5.2] spapr/xive: Create IPIs in KVM on demand

2020-11-16 Thread Greg Kurz
On Mon, 16 Nov 2020 14:43:12 +0100 Cédric Le Goater wrote: > On 11/13/20 4:14 PM, Greg Kurz wrote: > > Recent commit acbdb9956fe9 introduced a dedicated path to create > > IPIs in KVM. This is done from under kvmppc_xive_cpu_connect() with > > the assumption that the IPI n

Re: [PATCH] hw: add compat machines for 6.0

2020-11-16 Thread Greg Kurz
9d 100644 > --- a/hw/core/machine.c > +++ b/hw/core/machine.c > @@ -28,6 +28,9 @@ > #include "hw/mem/nvdimm.h" > #include "migration/vmstate.h" > > +GlobalProperty hw_compat_5_2[] = {}; Maybe worth putting the }; on the next line so that the next change ha

[PATCH for-5.2] spapr/xive: Create IPIs in KVM on demand

2020-11-13 Thread Greg Kurz
ive: Allocate IPIs independently from the other sources") BugLink: https://bugs.launchpad.net/qemu/+bug/1900241 Cc: c...@kaod.org Signed-off-by: Greg Kurz --- hw/intc/spapr_xive_kvm.c | 141 +- 1 file changed, 127 insertions(+), 14 deletions(-

Re: [PATCH 1/2] ppc/translate: Implement lxvwsx opcode

2020-11-11 Thread Greg Kurz
On Tue, 10 Nov 2020 10:14:23 +0100 LemonBoy wrote: > Is there any chance for this patch series to be merged for 5.2? > Not a chance. We're in hard freeze now. > On 09/11/20 18:39, Richard Henderson wrote: > > On 11/9/20 1:17 AM, LemonBoy wrote: > >> Implement the "Load VSX Vector Word & Splat

[PATCH for-5.2? 1/2] Makefile: Don't use $(quiet-@) within the body of a recipe

2020-11-05 Thread Greg Kurz
recipe. Since both recipes are already prefixed by @ anyway, just drop the $(quiet-@) invocations. Fixes: 09e93326e448 ("build: replace ninjatool with ninja") Cc: pbonz...@redhat.com Signed-off-by: Greg Kurz --- Makefile |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

[PATCH for-5.2? 2/2] Makefile: No echoing for 'make help V=1'

2020-11-05 Thread Greg Kurz
It doesn't bring much to have echoing with "make help". Suppress it unconditionally. Signed-off-by: Greg Kurz --- Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index df7a02a61a43..ba6b702107a5 100644 --- a/Makefile +++ b/Mak

Re: [PATCH-for-6.0 2/3] hw/virtio: Build most of virtio devices as arch-independent objects

2020-11-05 Thread Greg Kurz
On Thu, 5 Nov 2020 13:43:52 +0100 Philippe Mathieu-Daudé wrote: > VirtIO devices shouldn't be arch-specific. Some device have to > use PAGE_SIZE definition or access to CPUState. Keep building > them as arch-specific objects. Move all we can to libcommon.fa. > This patch breaks build: $ ./con

Re: [PATCH-for-5.2 v3 2/4] hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen

2020-11-05 Thread Greg Kurz
On Thu, 5 Nov 2020 13:15:59 +0100 Philippe Mathieu-Daudé wrote: > On 11/4/20 6:54 PM, Greg Kurz wrote: > > On Wed, 04 Nov 2020 13:18:09 +0100 > > Christian Schoenebeck wrote: > > > >> On Mittwoch, 4. November 2020 12:57:04 CET Philippe Mathieu-Daudé wrote: &g

Re: [PATCH v2 3/4] spapr/xive: Allocate IPIs independently from the other sources

2020-11-05 Thread Greg Kurz
On Thu, 5 Nov 2020 09:37:27 +0100 Cédric Le Goater wrote: > On 8/20/20 3:45 PM, Cédric Le Goater wrote: > > The vCPU IPIs are now allocated in kvmppc_xive_cpu_connect() when the > > vCPU connects to the KVM device and not when all the sources are reset > > in kvmppc_xive_source_reset() > > This

Re: [PATCH-for-5.2 v3 2/4] hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen

2020-11-04 Thread Greg Kurz
collect2: error: ld returned 1 exit status > > > > Fixes: b2c00bce54c ("meson: convert hw/9pfs, cleanup") > > Suggested-by: Paolo Bonzini > > Acked-by: Greg Kurz > > Tested-by: Greg Kurz > > Signed-off-by: Philippe Mathieu-Daudé > > Acke

Re: [PATCH-for-5.2 v2 2/4] hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen

2020-11-04 Thread Greg Kurz
ippe Mathieu-Daudé > --- > I'm not sure b2c00bce54c is the real culprit > FWIW this commit introduced the 9PFS config which isn't used anywhere. Backends depend on FSDEV_9P which itself depends on VIRTFS. So I tend to think b2c00bce54c is the culprit but _of couse_ I could be

Re: [PATCH-for-5.2 0/4] misc: Trivial format string fixes

2020-11-03 Thread Greg Kurz
On Tue, 3 Nov 2020 15:28:11 +0100 Philippe Mathieu-Daudé wrote: > On 11/3/20 3:03 PM, Dov Murik wrote: > > > > On 03/11/2020 15:58, Dov Murik wrote: > >> On 03/11/2020 13:25, Philippe Mathieu-Daudé wrote: > >>> IIUC qemu-trivial@ doesn't queue patches during freeze, > >>> > >>> so it might be ea

Re: [PATCH-for-5.2 3/4] hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

2020-11-03 Thread Greg Kurz
f-by: Philippe Mathieu-Daudé > --- Reviewed-by: Greg Kurz > hw/ppc/trace-events | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/ppc/trace-events b/hw/ppc/trace-events > index dcc06d49b5a..6d8d095aa28 100644 > --- a/hw/ppc/trace-events > +++ b/hw/p

Re: [PATCH v3 2/2] tests/9pfs: fix test dir for parallel tests

2020-11-01 Thread Greg Kurz
On Sun, 01 Nov 2020 20:14:16 +0100 Christian Schoenebeck wrote: > On Sonntag, 1. November 2020 18:44:44 CET Greg Kurz wrote: > > On Sun, 1 Nov 2020 15:37:12 +0100 > > > > Christian Schoenebeck wrote: > > > Use mkdtemp() to generate a unique directory for the 9p &#

Re: [PATCH v3 2/2] tests/9pfs: fix test dir for parallel tests

2020-11-01 Thread Greg Kurz
ld cause all apps that > link to libqos (i.e. entirely unrelated test suites) to create a 9pfs > test directory as well, which would even break other test suites. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz I could run 'make check -j' wit

Re: [PATCH v3 1/2] tests/9pfs: make create/remove test dir public

2020-11-01 Thread Greg Kurz
On Sun, 1 Nov 2020 15:25:14 +0100 Christian Schoenebeck wrote: > Make functions create_local_test_dir() and remove_local_test_dir() > public. They're going to be used in the next patch. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/q

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

2020-10-31 Thread Greg Kurz
On Sat, 31 Oct 2020 16:53:24 +1100 Alexey Kardashevskiy wrote: > Has anyone at least tried this, or everybody is busy KVMforuming? :) > Yeah virtualKVMforuming :) I had tried when you posted this v10 but I didn't get far at the time, because the kernel I was passing didn't want to boot and th

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

2020-10-30 Thread Greg Kurz
On Wed, 28 Oct 2020 16:22:16 +0100 Igor Mammedov wrote: > On Tue, 27 Oct 2020 16:18:58 +0100 > Greg Kurz wrote: > [...] > > > > It might require some more code refactoring because the way regular > > PC-DIMMs are broken down into a set of logical memory blocks (LMB

Re: [PATCH v2 0/2] 9pfs: test suite fixes

2020-10-30 Thread Greg Kurz
> tests/9pfs: fix coverity error in create_local_test_dir() > > tests/qtest/libqos/virtio-9p.c | 32 +--- > 1 file changed, 25 insertions(+), 7 deletions(-) > Series, Reviewed-by: Greg Kurz

[PATCH] tests/9pfs: Force removing of local 9pfs test directory

2020-10-30 Thread Greg Kurz
No need to get a complaint from "rm" if some path disappeared for some reason. Signed-off-by: Greg Kurz --- I remember seeing a "rm: cannot remove 'some-path': No such file or directory" recently but I can't reproduce it with current master :) --- tests/qt

Re: [PATCH 2/2] tests/9pfs: fix coverity error in create_local_test_dir()

2020-10-30 Thread Greg Kurz
On Fri, 30 Oct 2020 12:59:48 +0100 Christian Schoenebeck wrote: > On Freitag, 30. Oktober 2020 12:44:18 CET Greg Kurz wrote: > > On Fri, 30 Oct 2020 09:19:46 +0100 > > > > Christian Schoenebeck wrote: > > > Coverity wants the return value of mkdir() to be checked

Re: [PATCH 2/2] tests/9pfs: fix coverity error in create_local_test_dir()

2020-10-30 Thread Greg Kurz
irectory exists and we have an existence check for that in place > already. > I see that sometimes changelog shows a copy of the original coverity report (e.g. commit df1a312fea58). > Reported-by: Greg Kurz Please give credits to coverity, not me :-) And most importantly, we want to m

Re: [PATCH 1/2] tests/9pfs: fix test dir for parallel tests

2020-10-30 Thread Greg Kurz
tion for creating and removing the test directory instead. > Unfortunately libqos currently does not support setup/teardown callbacks > to handle this more cleanly. > > Signed-off-by: Christian Schoenebeck > --- LGTM I've been running 'make check-qtest -j' with 4 arc

Re: [PULL v3 3/6] tests/9pfs: introduce local tests

2020-10-29 Thread Greg Kurz
On Thu, 8 Oct 2020 20:34:56 +0200 Christian Schoenebeck wrote: > This patch introduces 9pfs test cases using the 9pfs 'local' > filesystem driver which reads/writes/creates/deletes real files > and directories. > > In this initial version, there is only one local test which actually > only check

[PATCH 1/2] spapr: Drop dead code in spapr_reallocate_hpt()

2020-10-29 Thread Greg Kurz
n the specific case of spapr_reallocate_hpt(), the outcome would be to terminate QEMU anyway since no HPT means no MMU for the guest. Drop the dead code instead. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |6 -- 1 file changed, 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c

[PATCH 2/2] spapr: Convert hpt_prepare_thread() to use qemu_try_memalign()

2020-10-29 Thread Greg Kurz
() which aborts on OOM and never returns NULL. Since we seem to have path to report the failure to the guest with an H_NO_MEM return value, use qemu_try_memalign() instead of qemu_memalign(). Signed-off-by: Greg Kurz --- hw/ppc/spapr_hcall.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH v2 1/3] hw/9pfs : add spaces around operator

2020-10-29 Thread Greg Kurz
ou (see commit d7d26226b for an example of the latter). With that fixed, you can add my r-b for all three patches. Reviewed-by: Greg Kurz > Signed-off-by: Kai Deng > Reported-by: Euler Robot > --- > hw/9pfs/9p-local.c | 10 +- > hw/9pfs/9p.c | 16 &

Re: [PULL 00/13] 9p queue 2020-10-23

2020-10-29 Thread Greg Kurz
On Thu, 29 Oct 2020 13:57:45 + Peter Maydell wrote: > On Thu, 29 Oct 2020 at 13:48, Christian Schoenebeck > wrote: > > So I'll append the architecture to the test dir location. To nail it this > > time, anyting else that would come to your mind regarding test dirs? > > I think most tests th

[PATCH] block: Move bdrv_drain_all_end_quiesce() to block_int.h

2020-10-28 Thread Greg Kurz
This function is really an internal helper for bdrv_close(). Update its doc comment to make this clear and make the function private. Signed-off-by: Greg Kurz --- As suggested by Stefan here: https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg08235.html --- include/block/block.h

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

2020-10-27 Thread Greg Kurz
On Tue, 27 Oct 2020 13:54:04 + Stefan Hajnoczi wrote: > On Fri, Oct 23, 2020 at 05:01:10PM +0200, Greg Kurz wrote: > > +/** > > + * End all quiescent sections started by bdrv_drain_all_begin(). This is > > + * only needed when deleting a BDS before bdrv_drai

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

2020-10-27 Thread Greg Kurz
On Tue, 27 Oct 2020 12:54:24 +0100 Igor Mammedov wrote: > On Sun, 25 Oct 2020 16:24:44 +0100 > Greg Kurz wrote: > > > On Fri, 23 Oct 2020 21:15:09 +0200 > > Igor Mammedov wrote: > > > > > On Mon, 19 Oct 2020 10:48:41 +0200 > > > Greg Kurz wrote

Re: [PATCH 1/4] spapr: qemu_memalign() doesn't return NULL

2020-10-27 Thread Greg Kurz
On Tue, 27 Oct 2020 12:56:40 +1100 David Gibson wrote: > On Mon, Oct 26, 2020 at 03:46:47PM +0100, Greg Kurz wrote: > > On Mon, 26 Oct 2020 14:43:08 +0100 > > Philippe Mathieu-Daudé wrote: > > > > > On 10/26/20 1:40 PM, Greg Kurz wrote: > > > > qem

Re: [PULL 00/13] 9p queue 2020-10-23

2020-10-26 Thread Greg Kurz
On Mon, 26 Oct 2020 13:48:37 +0100 Christian Schoenebeck wrote: > On Montag, 26. Oktober 2020 11:33:42 CET Peter Maydell wrote: > > On Fri, 23 Oct 2020 at 12:46, Christian Schoenebeck > > > > wrote: > > > The following changes since commit > > > 4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430: > > >

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

2020-10-26 Thread Greg Kurz
On Mon, 26 Oct 2020 14:49:34 +0100 Philippe Mathieu-Daudé wrote: > On 10/26/20 1:40 PM, Greg Kurz wrote: > > spapr_reallocate_hpt() has three users, two of which pass &error_fatal > > and the third one, htab_load(), passes &local_err, uses it to detect > > failures

Re: [PATCH 1/4] spapr: qemu_memalign() doesn't return NULL

2020-10-26 Thread Greg Kurz
On Mon, 26 Oct 2020 14:43:08 +0100 Philippe Mathieu-Daudé wrote: > On 10/26/20 1:40 PM, Greg Kurz wrote: > > qemu_memalign() aborts if OOM. Drop some dead code. > > > > Signed-off-by: Greg Kurz > > --- > > hw/ppc/spapr.c |6 -- > > hw/pp

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

2020-10-26 Thread Greg Kurz
Heh... this is round 4 actually :) On Mon, 26 Oct 2020 13:40:26 +0100 Greg Kurz wrote: > 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. > &g

[PATCH 3/4] target/ppc: Fix kvmppc_load_htab_chunk() error reporting

2020-10-26 Thread Greg Kurz
in case of short write. While here, propagate the error message through an @errp argument and have the caller to print it with error_report_err() instead of relying on fprintf(). Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |4 +++- target/ppc/kvm.c | 11 +-- target/ppc

[PATCH 1/4] spapr: qemu_memalign() doesn't return NULL

2020-10-26 Thread Greg Kurz
qemu_memalign() aborts if OOM. Drop some dead code. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |6 -- hw/ppc/spapr_hcall.c |8 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0cc19b5863a4..f098d0ee6d98 100644

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