Re: [RFC PATCH 3/8] spapr_numa.c: wait for CAS before writing rtas DT

2021-06-15 Thread Daniel Henrique Barboza
On 6/15/21 1:02 AM, David Gibson wrote: On Mon, Jun 14, 2021 at 10:33:04PM -0300, Daniel Henrique Barboza wrote: spapr_numa_write_rtas_dt() is called from spapr_dt_rtas(), which in turned is called by spapr_build_fdt(). spapr_build_fdt() is called in two places: spapr_machine_reset

[RFC PATCH v2 7/7] spapr: move memory/cpu less check to spapr_numa_FORM1_affinity_init()

2021-06-15 Thread Daniel Henrique Barboza
FORM2 NUMA affinity is prepared to deal with memory/cpu less NUMA nodes. This is used by the DAX KMEM driver to locate a PAPR SCM device that has a different latency than the original NUMA node from the regular memory. Move this verification to FORM1 affinity code. Signed-off-by: Daniel Henrique

[RFC PATCH v2 6/7] spapr_numa, spapr_nvdimm: write secondary NUMA domain for nvdimms

2021-06-15 Thread Daniel Henrique Barboza
affected by this change. CC: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_numa.c | 20 hw/ppc/spapr_nvdimm.c | 5 +++-- include/hw/ppc/spapr_numa.h | 3 +++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/hw/ppc

[RFC PATCH v2 3/7] spapr_numa.c: base FORM2 NUMA affinity support

2021-06-15 Thread Daniel Henrique Barboza
per information based on user distance, something that we're not doing with FORM2. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 21 ++ hw/ppc/spapr_numa.c | 140 +++- include/hw/ppc/spapr_ovec.h | 1 + 3 files changed, 161 inserti

Re: [RFC PATCH 6/8] nvdimm: add PPC64 'device-node' property

2021-06-15 Thread Daniel Henrique Barboza
On 6/15/21 6:33 AM, Aneesh Kumar K.V wrote: Daniel Henrique Barboza writes: The spapr-nvdimm driver is able to operate in two ways. The first one is as a regular memory in which the NUMA node of the parent pc-dimm class is used. The second mode, as persistent memory, allows for a different

[RFC PATCH v2 4/7] spapr: simplify spapr_numa_associativity_init params

2021-06-15 Thread Daniel Henrique Barboza
a pointer to SpaprMachineState. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_hcall.c| 2 +- hw/ppc/spapr_numa.c | 4 ++-- include/hw/ppc/spapr_numa.h | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw

[RFC PATCH 3/8] spapr_numa.c: wait for CAS before writing rtas DT

2021-06-14 Thread Daniel Henrique Barboza
chooses it), postpone the writing of ibm,associativity-reference-points and ibm,max-associativity-domains until we're sure what was negotiated with the guest. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_numa.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/ppc/spapr_numa.c

[RFC PATCH 7/8] spapr_numa, spapar_nvdimm: write secondary NUMA domain for nvdimms

2021-06-14 Thread Daniel Henrique Barboza
Using the new 'device-node' property, write it in the nvdimm DT to set a secondary domain for the persistent memory operation mode. Note that this is only available in FORM2 affinity. FORM1 affinity NVDIMMs aren't affected by this change. CC: Shivaprasad G Bhat Signed-off-by: Daniel Henrique

[RFC PATCH 2/8] spapr_numa.c: split FORM1 code into helpers

2021-06-14 Thread Daniel Henrique Barboza
the distances will be written directly into new DT properties. Let's split FORM1 code into its own functions to allow for easier insertion of FORM2 logic later on. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_numa.c | 61 + 1 file changed, 39

[RFC PATCH 4/8] spapr_numa.c: base FORM2 NUMA affinity support

2021-06-14 Thread Daniel Henrique Barboza
be to write the DT twice if the guest is in pre-CAS stage. Otherwise, we're making sure that a FORM1 guest will have the spapr->numa_assoc_array initialized with the proper information based on user distance, something that we're not doing with FORM2. Signed-off-by: Daniel Henrique Barboza --- hw/

[RFC PATCH 0/8] pSeries base FORM2 NUMA affinity support

2021-06-14 Thread Daniel Henrique Barboza
...@linux.ibm.com/ Daniel Henrique Barboza (8): spapr: move NUMA data init to do_client_architecture_support() spapr_numa.c: split FORM1 code into helpers spapr_numa.c: wait for CAS before writing rtas DT spapr_numa.c: base FORM2 NUMA affinity support spapr: simplify spapr_numa_associativity_init

[RFC PATCH 1/8] spapr: move NUMA data init to do_client_architecture_support()

2021-06-14 Thread Daniel Henrique Barboza
to wait until CAS to determine whether we're going to use FORM1 and FORM2. This patch starts doing that by moving spapr_numa_associativity_init() from spapr_machine_init() to do_client_architecture_support(). Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 3 --- hw/ppc

[RFC PATCH 5/8] spapr: simplify spapr_numa_associativity_init params

2021-06-14 Thread Daniel Henrique Barboza
a pointer to SpaprMachineState. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_hcall.c| 2 +- hw/ppc/spapr_numa.c | 4 ++-- include/hw/ppc/spapr_numa.h | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw

[RFC PATCH 6/8] nvdimm: add PPC64 'device-node' property

2021-06-14 Thread Daniel Henrique Barboza
have a way to express this second NUMA node for the persistent memory mode. This patch introduces a new 'device-node' property that will be used by the PPC64 spapr-nvdimm driver to set a second NUMA node for the nvdimm. CC: Shivaprasad G Bhat CC: Igor Mammedov Signed-off-by: Daniel Henrique

[RFC PATCH 8/8] spapr: move memory/cpu less check to spapr_numa_FORM1_affinity_init()

2021-06-14 Thread Daniel Henrique Barboza
FORM2 NUMA affinity is prepared to deal with memory/cpu less NUMA nodes. This is used by the DAX KMEM driver to locate a PAPR SCM device that has a different latency than the original NUMA node from the regular memory. Move this verification to FORM1 affinity code. Signed-off-by: Daniel Henrique

Re: [PATCH v2 2/2] spapr: use DEVICE_UNPLUG_ERROR to report unplug errors

2021-06-16 Thread Daniel Henrique Barboza
On 6/11/21 9:18 AM, Markus Armbruster wrote: Daniel Henrique Barboza writes: Linux Kernel 5.12 is now unisolating CPU DRCs in the device_removal error path, signalling that the hotunplug process wasn't successful. This allow us to send a DEVICE_UNPLUG_ERROR in drc_unisolate_logical

Re: [PATCH v2 1/2] qapi/machine.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-06-16 Thread Daniel Henrique Barboza
On 6/11/21 9:12 AM, Markus Armbruster wrote: Daniel Henrique Barboza writes: At this moment we only provide one event to report a hotunplug error, MEM_UNPLUG_ERROR. As of Linux kernel 5.12 and QEMU 6.0.0, the pseries machine is now able to report unplug errors for other device types

[PATCH v3 1/3] qapi/qdev.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-06-21 Thread Daniel Henrique Barboza
new device, create a generic DEVICE_UNPLUG_ERROR event that can be used by all unplug errors in the future. With this new generic event, MEM_UNPLUG_ERROR is now marked as deprecated. Signed-off-by: Daniel Henrique Barboza --- docs/system

[PATCH v3 2/3] spapr: use DEVICE_UNPLUG_ERROR to report unplug errors

2021-06-21 Thread Daniel Henrique Barboza
in spapr_memory_unplug_rollback() for configured LMB DRCs. Kernels older than 5.13 will not unisolate the LMBs in the hotunplug error path, but it will reconfigure them. Let's send the DEVICE_UNPLUG_ERROR event in that code path as well to cover the case of older kernels. Signed-off-by: Daniel Henrique

[PATCH v3 3/3] memory_hotplug.c: send DEVICE_UNPLUG_ERROR in acpi_memory_hotplug_write()

2021-06-21 Thread Daniel Henrique Barboza
MEM_UNPLUG_ERROR is deprecated since the introduction of DEVICE_UNPLUG_ERROR. Keep emitting both while the deprecation of MEM_UNPLUG_ERROR is pending. CC: Michael S. Tsirkin CC: Igor Mammedov Signed-off-by: Daniel Henrique Barboza --- hw/acpi/memory_hotplug.c | 13 +++-- 1 file

[PATCH v3 0/3] DEVICE_UNPLUG_ERROR QAPI event

2021-06-21 Thread Daniel Henrique Barboza
event in the device unplug error path of CPUs and DIMMs - v1 link: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg04682.html Daniel Henrique Barboza (3): qapi/qdev.json: add DEVICE_UNPLUG_ERROR QAPI event spapr: use DEVICE_UNPLUG_ERROR to report unplug errors memory_hotplug.c

Re: [PATCH updated v2] spapr: Fix EEH capability issue on KVM guest for PCI passthru

2021-05-10 Thread Daniel Henrique Barboza
@atest-guest ~]# dmesg | grep EEH [0.048139] EEH: pSeries platform initialized [0.405115] EEH: Capable adapter found: recovery enabled. [root@atest-guest ~]# Signed-off-by: Mahesh Salgaonkar --- Reviewed-by: Daniel Henrique Barboza Change in v2: - Fix ibm,set-eeh-option instead of ret

[PATCH 1/1] ppc/pef.c: initialize cgs->ready in kvmppc_svm_init()

2021-05-28 Thread Daniel Henrique Barboza
asserted in qemu_machine_creation_done() during machine start. cgs->ready is set in s390_pv_kvm_init() and sev_kvm_init(). Let's set it in kvmppc_svm_init() as well. Reported-by: Ram Pai Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pef.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --

[PATCH v2 0/2] DEVICE_UNPLUG_ERROR QAPI event

2021-06-04 Thread Daniel Henrique Barboza
' - patch 2 (former 4): add a DEVICE_UNPLUG_ERROR event in the device unplug error path of CPUs and DIMMs [1] v1 link: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg04682.html Daniel Henrique Barboza (2): qapi/machine.json: add DEVICE_UNPLUG_ERROR QAPI event spapr: use

[PATCH v2 1/2] qapi/machine.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-06-04 Thread Daniel Henrique Barboza
, create a generic DEVICE_UNPLUG_ERROR event that can be used by all unplug errors in the future. Signed-off-by: Daniel Henrique Barboza --- qapi/machine.json | 23 +++ 1 file changed, 23 insertions(+) diff --git a/qapi/machine.json b/qapi/machine.json index 58a9c86b36..f0c7e56be0

[PATCH v2 2/2] spapr: use DEVICE_UNPLUG_ERROR to report unplug errors

2021-06-04 Thread Daniel Henrique Barboza
in spapr_memory_unplug_rollback() for configured LMB DRCs. Kernels older than 5.13 will not unisolate the LMBs in the hotunplug error path, but it will reconfigure them. Let's send the DEVICE_UNPLUG_ERROR event in that code path as well to cover the case of older kernels. Signed-off-by: Daniel Henrique

Re: [PATCH v4 1/3] qapi/qdev.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-07-08 Thread Daniel Henrique Barboza
On 7/8/21 10:01 AM, Markus Armbruster wrote: Daniel Henrique Barboza writes: At this moment we only provide one event to report a hotunplug error, MEM_UNPLUG_ERROR. As of Linux kernel 5.12 and QEMU 6.0.0, the pseries machine is now able to report unplug errors for other device types

Re: [PATCH v4 3/3] memory_hotplug.c: send DEVICE_UNPLUG_ERROR in acpi_memory_hotplug_write()

2021-07-11 Thread Daniel Henrique Barboza
On 7/10/21 3:57 AM, Markus Armbruster wrote: Igor Mammedov writes: On Fri, 09 Jul 2021 13:25:43 +0200 Markus Armbruster wrote: Igor Mammedov writes: On Thu, 08 Jul 2021 15:08:57 +0200 Markus Armbruster wrote: Daniel Henrique Barboza writes: MEM_UNPLUG_ERROR is deprecated

[PATCH v5 0/7] DEVICE_UNPLUG_ERROR QAPI event

2021-07-12 Thread Daniel Henrique Barboza
mer patches 1 and 2: dropped - patch 1 (former 3): changed the version to '6.1' - patch 2 (former 4): add a DEVICE_UNPLUG_ERROR event in the device unplug error path of CPUs and DIMMs - v1 link: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg04682.html Daniel Henrique Barboza (7): hw/acpi/

[PATCH v5 3/7] spapr_drc.c: do not error_report() when drc->dev->id == NULL

2021-07-12 Thread Daniel Henrique Barboza
uments. Besides, there is no utility into reporting that an unknown device was rejected by the guest. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_drc.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index a2f2634601..a4d9496f76 100

[PATCH v5 1/7] hw/acpi/memory_hotplug.c: avoid sending MEM_UNPLUG_ERROR if dev->id is NULL

2021-07-12 Thread Daniel Henrique Barboza
g existing APIs, but it'll be deprecated and removed in the future. Suggested-by: Markus Armbruster Signed-off-by: Daniel Henrique Barboza --- hw/acpi/memory_hotplug.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c in

[PATCH v5 4/7] qapi/qdev.json: fix DEVICE_DELETED parameters doc

2021-07-12 Thread Daniel Henrique Barboza
Clarify that @device is optional and that 'path' is the device path from QOM. This change follows Markus' suggestion verbatim, provided in full context here: https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg01891.html Suggested-by: Markus Armbruster Signed-off-by: Daniel Henrique

[PATCH v5 7/7] memory_hotplug.c: send DEVICE_UNPLUG_ERROR in acpi_memory_hotplug_write()

2021-07-12 Thread Daniel Henrique Barboza
MEM_UNPLUG_ERROR is deprecated since the introduction of DEVICE_UNPLUG_ERROR. Keep emitting both while the deprecation of MEM_UNPLUG_ERROR is pending. CC: Michael S. Tsirkin CC: Igor Mammedov Signed-off-by: Daniel Henrique Barboza --- hw/acpi/memory_hotplug.c | 10 ++ 1 file changed

[PATCH v5 2/7] spapr.c: avoid sending MEM_UNPLUG_ERROR if dev->id is NULL

2021-07-12 Thread Daniel Henrique Barboza
As done in hw/acpi/memory_hotplug.c, avoid sending qapi_event_send_mem_unplug_error() if dev->id is NULL. Suggested-by: Markus Armbruster Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr.c b

[PATCH v5 5/7] qapi/qdev.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-07-12 Thread Daniel Henrique Barboza
is now marked as deprecated. Signed-off-by: Daniel Henrique Barboza --- docs/system/deprecated.rst | 10 ++ qapi/machine.json | 6 +- qapi/qdev.json | 30 +- stubs/qdev.c | 7 +++ 4 files changed, 51 insertions(+), 2

[PATCH v5 6/7] spapr: use DEVICE_UNPLUG_ERROR to report unplug errors

2021-07-12 Thread Daniel Henrique Barboza
in spapr_memory_unplug_rollback() for configured LMB DRCs. Kernels older than 5.13 will not unisolate the LMBs in the hotunplug error path, but it will reconfigure them. Let's send the DEVICE_UNPLUG_ERROR event in that code path as well to cover the case of older kernels. Signed-off-by: Daniel Henrique

Re: [PATCH v3 1/3] qapi/qdev.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-07-06 Thread Daniel Henrique Barboza
On 7/5/21 1:52 AM, David Gibson wrote: On Mon, Jun 21, 2021 at 05:59:05PM -0300, Daniel Henrique Barboza wrote: At this moment we only provide one event to report a hotunplug error, MEM_UNPLUG_ERROR. As of Linux kernel 5.12 and QEMU 6.0.0, the pseries machine is now able to report unplug

[PATCH v4 3/3] memory_hotplug.c: send DEVICE_UNPLUG_ERROR in acpi_memory_hotplug_write()

2021-07-06 Thread Daniel Henrique Barboza
MEM_UNPLUG_ERROR is deprecated since the introduction of DEVICE_UNPLUG_ERROR. Keep emitting both while the deprecation of MEM_UNPLUG_ERROR is pending. CC: Michael S. Tsirkin CC: Igor Mammedov Reviewed-by: David Gibson Signed-off-by: Daniel Henrique Barboza --- hw/acpi/memory_hotplug.c | 13

[PATCH v4 2/3] spapr: use DEVICE_UNPLUG_ERROR to report unplug errors

2021-07-06 Thread Daniel Henrique Barboza
-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 8 hw/ppc/spapr_drc.c | 15 +-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 4dd90b75cc..fc071a1767 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -29,6 +29,7

[PATCH v4 1/3] qapi/qdev.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-07-06 Thread Daniel Henrique Barboza
, create a generic DEVICE_UNPLUG_ERROR event that can be used by all unplug errors in the future. With this new generic event, MEM_UNPLUG_ERROR is now marked as deprecated. Reviewed-by: David Gibson Signed-off-by: Daniel Henrique Barboza --- docs/system/deprecated.rst | 10 ++ qapi

[PATCH v4 0/3] DEVICE_UNPLUG_ERROR QAPI event

2021-07-06 Thread Daniel Henrique Barboza
' - patch 2 (former 4): add a DEVICE_UNPLUG_ERROR event in the device unplug error path of CPUs and DIMMs - v1 link: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg04682.html *** BLURB HERE *** Daniel Henrique Barboza (3): qapi/qdev.json: add DEVICE_UNPLUG_ERROR QAPI event spapr

Re: [PATCH] spapr: Modify ibm, get-config-addr-info2 to set DEVNUM in PE config address.

2021-04-30 Thread Daniel Henrique Barboza
On 4/29/21 6:02 AM, Mahesh J Salgaonkar wrote: On 2021-04-28 22:33:45 Wed, Oliver O'Halloran wrote: On Tue, Apr 27, 2021 at 9:56 PM Mahesh Salgaonkar wrote: With upstream kernel, especially after commit 98ba956f6a389 ("powerpc/pseries/eeh: Rework device EEH PE determination") we see that

Re: [PATCH] spapr: Modify ibm, get-config-addr-info2 to set DEVNUM in PE config address.

2021-04-27 Thread Daniel Henrique Barboza
s and enable EEH recovery on it. [root@atest-guest ~]# dmesg | grep EEH [0.048139] EEH: pSeries platform initialized [0.405115] EEH: Capable adapter found: recovery enabled. [root@atest-guest ~]# Signed-off-by: Mahesh Salgaonkar --- Reviewed-by: Daniel Henrique Barboza hw/ppc/sp

[PATCH 0/3] spapr, spapr_numa: fix max-associativity-domains

2021-01-28 Thread Daniel Henrique Barboza
Hi, Patches 02 and 03 contain fixes for a problem Cedric found out when booting TCG guests with multiple NUMA nodes. See patch 03 commit message for more info. First patch is an unrelated cleanup I did while investigating. Daniel Henrique Barboza (3): spapr: move

[PATCH 2/3] spapr_numa.c: create spapr_numa_initial_nvgpu_NUMA_id() helper

2021-01-28 Thread Daniel Henrique Barboza
We'll need to check the initial value given to spapr->gpu_numa_id when building the rtas DT, so put it in a helper for easier access and to avoid repetition. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 12 ++-- hw/ppc/spapr_numa.c |

[PATCH 3/3] spapr_numa.c: fix ibm, max-associativity-domains calculation

2021-01-28 Thread Daniel Henrique Barboza
with 4 nodes being online. This patch fixes ibm,max-associativity-domains by considering the amount of NVGPUs NUMA nodes presented in the guest, instead of spapr->gpu_numa_id. Reported-by: Cédric Le Goater Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_numa.c | 16 +++-

[PATCH 1/3] spapr: move spapr_machine_using_legacy_numa() to spapr_numa.c

2021-01-28 Thread Daniel Henrique Barboza
This function is used only in spapr_numa.c. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 9 - hw/ppc/spapr_numa.c| 9 + include/hw/ppc/spapr.h | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index

Re: [PATCH 0/4] DEVICE_NOT_DELETED/DEVICE_UNPLUG_ERROR QAPI events

2021-03-24 Thread Daniel Henrique Barboza
On 3/23/21 10:40 PM, David Gibson wrote: On Tue, Mar 23, 2021 at 02:10:22PM -0300, Daniel Henrique Barboza wrote: On 3/22/21 10:12 PM, David Gibson wrote: On Fri, Mar 12, 2021 at 05:07:36PM -0300, Daniel Henrique Barboza wrote: Hi, This series adds 2 new QAPI events, DEVICE_NOT_DELETED

Re: [PATCH 1/2] spapr: number of SMP sockets must be equal to NUMA nodes

2021-03-25 Thread Daniel Henrique Barboza
On 3/25/21 5:56 AM, Cédric Le Goater wrote: On 3/25/21 3:10 AM, David Gibson wrote: On Tue, Mar 23, 2021 at 02:21:33PM -0300, Daniel Henrique Barboza wrote: On 3/22/21 10:03 PM, David Gibson wrote: On Fri, Mar 19, 2021 at 03:34:52PM -0300, Daniel Henrique Barboza wrote: Kernel commit

Re: [PATCH 0/4] DEVICE_NOT_DELETED/DEVICE_UNPLUG_ERROR QAPI events

2021-03-31 Thread Daniel Henrique Barboza
On 3/30/21 8:46 PM, David Gibson wrote: On Tue, Mar 30, 2021 at 01:28:31AM +0200, Igor Mammedov wrote: On Wed, 24 Mar 2021 16:09:59 -0300 Daniel Henrique Barboza wrote: On 3/23/21 10:40 PM, David Gibson wrote: On Tue, Mar 23, 2021 at 02:10:22PM -0300, Daniel Henrique Barboza wrote

Re: [PATCH 0/4] DEVICE_NOT_DELETED/DEVICE_UNPLUG_ERROR QAPI events

2021-03-31 Thread Daniel Henrique Barboza
On 3/29/21 8:28 PM, Igor Mammedov wrote: On Wed, 24 Mar 2021 16:09:59 -0300 Daniel Henrique Barboza wrote: On 3/23/21 10:40 PM, David Gibson wrote: On Tue, Mar 23, 2021 at 02:10:22PM -0300, Daniel Henrique Barboza wrote: On 3/22/21 10:12 PM, David Gibson wrote: On Fri, Mar 12, 2021

Re: [PATCH 1/2] spapr: number of SMP sockets must be equal to NUMA nodes

2021-03-31 Thread Daniel Henrique Barboza
On 3/31/21 12:18 PM, Cédric Le Goater wrote: On 3/31/21 2:57 AM, David Gibson wrote: On Mon, Mar 29, 2021 at 03:32:37PM -0300, Daniel Henrique Barboza wrote: On 3/29/21 12:32 PM, Cédric Le Goater wrote: On 3/29/21 6:20 AM, David Gibson wrote: On Thu, Mar 25, 2021 at 09:56:04AM +0100

Re: [PATCH 0/4] DEVICE_NOT_DELETED/DEVICE_UNPLUG_ERROR QAPI events

2021-03-23 Thread Daniel Henrique Barboza
On 3/22/21 10:12 PM, David Gibson wrote: On Fri, Mar 12, 2021 at 05:07:36PM -0300, Daniel Henrique Barboza wrote: Hi, This series adds 2 new QAPI events, DEVICE_NOT_DELETED and DEVICE_UNPLUG_ERROR. They were (and are still being) discussed in [1]. Patches 1 and 3 are independent of the ppc

Re: [PATCH 1/2] spapr: number of SMP sockets must be equal to NUMA nodes

2021-03-23 Thread Daniel Henrique Barboza
On 3/22/21 10:03 PM, David Gibson wrote: On Fri, Mar 19, 2021 at 03:34:52PM -0300, Daniel Henrique Barboza wrote: Kernel commit 4bce545903fa ("powerpc/topology: Update topology_core_cpumask") cause a regression in the pseries machine when defining certain SMP topologies [1]. The

Re: [PATCH 1/2] spapr: number of SMP sockets must be equal to NUMA nodes

2021-03-29 Thread Daniel Henrique Barboza
On 3/29/21 12:32 PM, Cédric Le Goater wrote: On 3/29/21 6:20 AM, David Gibson wrote: On Thu, Mar 25, 2021 at 09:56:04AM +0100, Cédric Le Goater wrote: On 3/25/21 3:10 AM, David Gibson wrote: On Tue, Mar 23, 2021 at 02:21:33PM -0300, Daniel Henrique Barboza wrote: On 3/22/21 10:03 PM

[PATCH 0/2] pSeries: revert CPU unplug timeout

2021-03-31 Thread Daniel Henrique Barboza
state present in QEMU. This will give users a way to retry hotunplugging CPUs without relying on unplug timeouts. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg04399.html Daniel Henrique Barboza (2): spapr: rollback 'unplug timeout' for CPU hotunplugs spapr.c: always pulse guest

[PATCH 1/2] spapr: rollback 'unplug timeout' for CPU hotunplugs

2021-03-31 Thread Daniel Henrique Barboza
g04682.html CC: Paolo Bonzini Signed-off-by: Daniel Henrique Barboza --- Paolo, I'm CCing you in this patch because I reverted a change in qemu_timer.c that added the timer_deadline_ms() helper that was used only by pseries code that I'm removing with this patch. Figured that a helper that is not used

[PATCH 2/2] spapr.c: always pulse guest IRQ in spapr_core_unplug_request()

2021-03-31 Thread Daniel Henrique Barboza
ove spapr_hotplug_req_remove_by_index() back out of the "if (!spapr_drc_unplug_requested(drc))" conditional, allowing for multiple 'device_del' requests to the same CPU core to reach the guest, in case the CPU core didn't fully hotunplugged previously. Signed-off-by: Daniel Henrique Barboza --- hw/ppc

Re: [PATCH 1/2] spapr: number of SMP sockets must be equal to NUMA nodes

2021-03-30 Thread Daniel Henrique Barboza
On 3/29/21 8:51 PM, Igor Mammedov wrote: On Tue, 23 Mar 2021 12:03:58 +1100 David Gibson wrote: On Fri, Mar 19, 2021 at 03:34:52PM -0300, Daniel Henrique Barboza wrote: Kernel commit 4bce545903fa ("powerpc/topology: Update topology_core_cpumask") cause a regression in the pseri

Re: [PATCH 1/4] qapi/qdev.json: add DEVICE_NOT_DELETED event

2021-03-23 Thread Daniel Henrique Barboza
On 3/23/21 3:00 PM, Eric Blake wrote: On 3/12/21 2:07 PM, Daniel Henrique Barboza wrote: This new event informs QAPI listeners that a previously issued 'device_del' command failed to delete the device from the machine. Note that no assertion can be made about the failure reason. The goal

[PATCH 1/1] spapr.c: remove 'ibm,chip-id' from DT

2021-03-11 Thread Daniel Henrique Barboza
el uses 'ibm,chip-id' for PowerNV related code only - the pseries kernel does not rely on it. All that said, since it's not in PAPR and the pseries kernel does not rely on it, let's remove ibm,chip-id from the DT. CC: Alexey Kardashevskiy Suggested-by: Cédric Le Goater Signed-off-by: Daniel Henrique

Re: [PATCH 1/1] spapr.c: remove 'ibm,chip-id' from DT

2021-03-11 Thread Daniel Henrique Barboza
On 3/11/21 1:29 PM, Greg Kurz wrote: On Thu, 11 Mar 2021 12:15:57 -0300 Daniel Henrique Barboza wrote: The attribute 'ibm,chip-id' does not exist in PAPR. This alone would be enough reason to remove it from the spapr DT, but before doing that, let's give a brief context on how and why

Re: [RFC] adding a generic QAPI event for failed device hotunplug

2021-03-11 Thread Daniel Henrique Barboza
writes: On Mon, Mar 08, 2021 at 03:01:53PM -0300, Daniel Henrique Barboza wrote: On 3/8/21 2:04 PM, Markus Armbruster wrote: Daniel Henrique Barboza writes: On 3/6/21 3:57 AM, Markus Armbruster wrote: [...] We should document the event's reliability. Are there unplug operations where we

[PATCH 0/4] DEVICE_NOT_DELETED/DEVICE_UNPLUG_ERROR QAPI events

2021-03-12 Thread Daniel Henrique Barboza
on the QAPI patches. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg01900.html Daniel Henrique Barboza (4): qapi/qdev.json: add DEVICE_NOT_DELETED event spapr_drc.c: send DEVICE_NOT_DELETED event on unplug timeout qapi/machine.json: add DEVICE_UNPLUG_ERROR QAPI event spapr.c: use

[PATCH 1/4] qapi/qdev.json: add DEVICE_NOT_DELETED event

2021-03-12 Thread Daniel Henrique Barboza
an official way to report the hotunplug error back to the hypervisor, such as PowerPC and the pseries machine type. Signed-off-by: Daniel Henrique Barboza --- qapi/qdev.json | 28 1 file changed, 28 insertions(+) diff --git a/qapi/qdev.json b/qapi/qdev.json index

[PATCH 3/4] qapi/machine.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-03-12 Thread Daniel Henrique Barboza
event that can be used by all unplug errors in the future. Signed-off-by: Daniel Henrique Barboza --- qapi/machine.json | 23 +++ 1 file changed, 23 insertions(+) diff --git a/qapi/machine.json b/qapi/machine.json index 330189efe3..9b2c93aad3 100644 --- a/qapi/machine.json +++ b

[PATCH 4/4] spapr.c: use DEVICE_UNPLUG_ERROR event in spapr_memory_unplug_rollback()

2021-03-12 Thread Daniel Henrique Barboza
Other device types in the pseries machine will use DEVICE_UNPLUG_ERROR to report hotunplug errors. Use it to report the memory hotunplug error in spapr_memory_unplug_rollback() as well. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 2/4] spapr_drc.c: send DEVICE_NOT_DELETED event on unplug timeout

2021-03-12 Thread Daniel Henrique Barboza
quot;: {"id": "core1"} } {"error": {"class": "GenericError", "desc": "core-id 1 unplug is still pending, 5 seconds timeout remaining"}} {"timestamp": {"seconds": 1615570254, "microseconds": 573

Re: [PATCH] spapr: Assert DIMM unplug state in spapr_memory_unplug()

2021-03-15 Thread Daniel Henrique Barboza
with spapr_recover_pending_dimm_state() if missing. g_assert() that spapr_pending_dimm_unplugs_find() cannot return NULL in spapr_memory_unplug() to make this clear and silence Coverity. Fixes: Coverity CID 1450767 Signed-off-by: Greg Kurz --- Reviewed-by: Daniel Henrique Barboza hw/ppc/spapr.c |3

[PATCH 0/2] pseries: SMP sockets must match NUMA nodes

2021-03-19 Thread Daniel Henrique Barboza
/reported together with patch 01 since they 'share history'. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg04029.html Daniel Henrique Barboza (2): spapr: number of SMP sockets must be equal to NUMA nodes spapr.c: remove 'ibm,chip-id' from DT hw/ppc/spapr.c | 10

[PATCH 1/2] spapr: number of SMP sockets must be equal to NUMA nodes

2021-03-19 Thread Daniel Henrique Barboza
s were made to adapt to this new condition. [1] https://bugzilla.redhat.com/1934421 [2] https://lore.kernel.org/linuxppc-dev/daa5d05f-dbd0-05ad-7395-5d5a3d364...@gmail.com/ CC: Srikar Dronamraju CC: Cédric Le Goater CC: Igor Mammedov CC: Laurent Vivier CC: Thomas Huth Signed-off-by: Daniel Henri

[PATCH 2/2] spapr.c: remove 'ibm,chip-id' from DT

2021-03-19 Thread Daniel Henrique Barboza
's not in PAPR and the pseries kernel does not rely on it, let's remove ibm,chip-id from the DT for the default machine type. This removal is related to the previous SMP change, so re-use the same smc->pre_6_0_smp_topology flag. CC: Alexey Kardashevskiy Suggested-by: Cédric Le Goater Signe

Re: [PATCH v2 1/8] powerpc/xive: Use cpu_to_node() instead of ibm,chip-id property

2021-03-12 Thread Daniel Henrique Barboza
On 3/12/21 6:53 AM, Cédric Le Goater wrote: On 3/12/21 2:55 AM, David Gibson wrote: On Tue, 9 Mar 2021 18:26:35 +0100 Cédric Le Goater wrote: On 3/9/21 6:08 PM, Daniel Henrique Barboza wrote: On 3/9/21 12:33 PM, Cédric Le Goater wrote: On 3/8/21 6:13 PM, Greg Kurz wrote: On Wed, 3

[PATCH v2 0/2] send QAPI_EVENT_MEM_UNPLUG_ERROR for ppc64 unplugs

2021-03-02 Thread Daniel Henrique Barboza
Greg's R-b - v1 link: https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg08378.html Daniel Henrique Barboza (2): spapr.c: remove duplicated assert in spapr_memory_unplug_request() spapr.c: send QAPI event when memory hotunplug fails hw/ppc/spapr.c | 14 +++--- hw/ppc

[PATCH v2 2/2] spapr.c: send QAPI event when memory hotunplug fails

2021-03-02 Thread Daniel Henrique Barboza
. Reviewed-by: Greg Kurz Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 13 +++-- hw/ppc/spapr_drc.c | 5 ++--- include/hw/ppc/spapr.h | 3 +-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index b579830832

[PATCH v2 1/2] spapr.c: remove duplicated assert in spapr_memory_unplug_request()

2021-03-02 Thread Daniel Henrique Barboza
We are asserting the existence of the first DRC LMB after sending unplug requests to all LMBs of the DIMM, where every DRC is being asserted inside the loop. This means that the first DRC is being asserted twice. Remove the duplicated assert. Signed-off-by: Daniel Henrique Barboza --- hw/ppc

Re: [PATCH qemu] spapr: Fix typo in the patb_entry comment

2021-02-25 Thread Daniel Henrique Barboza
On 2/25/21 12:23 AM, Alexey Kardashevskiy wrote: There is no H_REGISTER_PROCESS_TABLE, it is H_REGISTER_PROC_TBL handler for which is still called h_register_process_table() though. Signed-off-by: Alexey Kardashevskiy --- Reviewed-by: Daniel Henrique Barboza include/hw/ppc/spapr.h

Re: [PATCH 2/5] spapr.c: check unplug_request flag in spapr_memory_unplug_request()

2021-03-02 Thread Daniel Henrique Barboza
On 3/1/21 11:03 PM, David Gibson wrote: On Fri, Feb 26, 2021 at 01:32:58PM -0300, Daniel Henrique Barboza wrote: Now that we're asserting the first DRC LMB earlier, use it to query if the DRC is already pending unplug and, in this case, issue the same error we already do. The previous check

Re: [PATCH v2 0/1] vl.c: fix trace backend init ordering

2021-03-02 Thread Daniel Henrique Barboza
Ping There is at least one user in the Libvirt ML experiencing the same problem this patch is fixing, using QEMU upstream compiling with the trace backend, and it seems like the daemonization is still not working. Thanks, DHB On 1/5/21 3:14 PM, Daniel Henrique Barboza wrote: changes from v2

[PATCH 1/1] qemu_timer.c: add timer_deadline_ms() helper

2021-02-25 Thread Daniel Henrique Barboza
to the PPC code. CC: Paolo Bonzini Signed-off-by: Daniel Henrique Barboza --- This patch is applicable on top of David's ppc-for-6.0. hw/ppc/spapr_drc.c | 5 ++--- include/qemu/timer.h | 8 util/qemu-timer.c| 13 + 3 files changed, 23 insertions(+), 3 deletions

[PATCH 0/5] send QAPI_EVENT_MEM_UNPLUG_ERROR for ppc64 unplugs

2021-02-26 Thread Daniel Henrique Barboza
don't have this event available yet. Next time. Daniel Henrique Barboza (5): spapr.c: assert first DRC LMB earlier in spapr_memory_unplug_request() spapr.c: check unplug_request flag in spapr_memory_unplug_request() spapr.c: add 'unplug already in progress' message for PHB unplug spapr_pci.c

[PATCH 1/5] spapr.c: assert first DRC LMB earlier in spapr_memory_unplug_request()

2021-02-26 Thread Daniel Henrique Barboza
of removing the duplicated assert, let's do it earlier. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6eaddb12cb..74e046b522 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc

[PATCH 2/5] spapr.c: check unplug_request flag in spapr_memory_unplug_request()

2021-02-26 Thread Daniel Henrique Barboza
of looking for the existence of the sPAPRDIMMState. It's also compliant with what is already done in other unplug_request functions for other devices. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/ppc/spapr.c b/hw

[PATCH 4/5] spapr_pci.c: add 'unplug already in progress' message for PCI unplug

2021-02-26 Thread Daniel Henrique Barboza
Hotunplug for all other devices are warning the user when the hotunplug is already in progress. Do the same for PCI devices in spapr_pci_unplug_request(). Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_pci.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/ppc/spapr_pci.c b

Re: [RFC] adding a generic QAPI event for failed device hotunplug

2021-03-08 Thread Daniel Henrique Barboza
On 3/6/21 3:57 AM, Markus Armbruster wrote: Cc: ACPI maintainers for additional expertise. Daniel Henrique Barboza writes: Hi, Recent changes in pseries code (not yet pushed, available at David's ppc-for-6.0) are using the QAPI event MEM_UNPLUG_ERROR to report memory hotunplug errors

Re: [RFC] adding a generic QAPI event for failed device hotunplug

2021-03-08 Thread Daniel Henrique Barboza
On 3/8/21 2:04 PM, Markus Armbruster wrote: Daniel Henrique Barboza writes: On 3/6/21 3:57 AM, Markus Armbruster wrote: Cc: ACPI maintainers for additional expertise. Daniel Henrique Barboza writes: Hi, Recent changes in pseries code (not yet pushed, available at David's ppc-for-6.0

[PATCH v2 0/1] qemu_timer.c: add timer_deadline_ms() helper

2021-03-01 Thread Daniel Henrique Barboza
Changes from v1: - Added Paolo's ACK - Changed the helper to get the clock via timer->timer_list->clock->type instead of assuming QEMU_CLOCK_VIRTUAL, as suggested by Greg - v1 link: https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg08097.html Daniel Henrique Barboza (1): qem

[PATCH v2 1/1] qemu_timer.c: add timer_deadline_ms() helper

2021-03-01 Thread Daniel Henrique Barboza
to the PPC code. CC: Paolo Bonzini Acked-by: Paolo Bonzini Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_drc.c | 5 ++--- include/qemu/timer.h | 8 util/qemu-timer.c| 13 + 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_drc.c b

[RFC] adding a generic QAPI event for failed device hotunplug

2021-03-05 Thread Daniel Henrique Barboza
Hi, Recent changes in pseries code (not yet pushed, available at David's ppc-for-6.0) are using the QAPI event MEM_UNPLUG_ERROR to report memory hotunplug errors in the pseries machine. The pseries machine is also using a timeout to cancel CPU hotunplugs that takes too long to finish (in which

[PATCH 3/5] spapr.c: add 'unplug already in progress' message for PHB unplug

2021-02-26 Thread Daniel Henrique Barboza
Both CPU hotunplug and PC_DIMM unplug reports an user warning, mentioning that the hotunplug is in progress, if consecutive 'device_del' are issued in quick succession. Do the same for PHBs in spapr_phb_unplug_request(). Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 4 1

[PATCH 5/5] spapr.c: send QAPI event when memory hotunplug fails

2021-02-26 Thread Daniel Henrique Barboza
. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 13 +++-- hw/ppc/spapr_drc.c | 5 ++--- include/hw/ppc/spapr.h | 3 +-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6ef72ee7bd..cbe5cafb14 100644 --- a/hw

[PATCH 2/2] spapr.h: increase FDT_MAX_SIZE

2021-04-08 Thread Daniel Henrique Barboza
izeof(segs))): FDT_ERR_NOSPACE 2048 is the default NR_CPUS value for the pSeries kernel. It's expected that users will want QEMU to be able to handle this kind of configuration. Bumping FDT_MAX_SIZE to 2MB is enough for these setups to be created. Signed-off-by: Daniel Henrique Barboza --- incl

[PATCH 1/2] spapr.c: do not use MachineClass::max_cpus to limit CPUs

2021-04-08 Thread Daniel Henrique Barboza
. machine.c:machine_smp_parse() will not fail the verification based on max_cpus, letting kvm_init() do the checking with actual host settings. And TCG guests get to do whatever the hardware is capable of emulating. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 11 ++- 1 file changed, 10 insertions

[PATCH 0/2] ppc64: do not use MachineClass::max_cpus to limit CPUs

2021-04-08 Thread Daniel Henrique Barboza
Hello, After having to change hardcoded values to launch a 2048 KVM pSeries guests I decided to post these upstream because, at least for me, the current max_cpus usage is lackluster for pSeries. More info in patch 01. Patch 02 is a trivial follow-up to increase the FDT size. Daniel Henrique

Re: [PATCH 2/2] spapr.c: always pulse guest IRQ in spapr_core_unplug_request()

2021-04-12 Thread Daniel Henrique Barboza
On 3/31/21 11:37 PM, David Gibson wrote: On Wed, Mar 31, 2021 at 09:04:37PM -0300, Daniel Henrique Barboza wrote: Commit 47c8c915b162 fixed a problem where multiple spapr_drc_detach() requests were breaking QEMU. The solution was to just spapr_drc_detach() once, and use

[PATCH v2 1/1] spapr_drc.c: handle hotunplug errors in drc_unisolate_logical()

2021-04-20 Thread Daniel Henrique Barboza
avid Gibson Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_drc.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 9e16505fa1..6918e0c9d1 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -151,9 +15

[PATCH v2 0/1] pSeries: handle hotunplug errors in drc_unisolate_logical()

2021-04-20 Thread Daniel Henrique Barboza
ort mechanism. [1] https://lore.kernel.org/linuxppc-dev/20210416210216.380291-3-danielhb...@gmail.com/ [2] https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg06395.html Daniel Henrique Barboza (1): spapr_drc.c: handle hotunplug errors in drc_unisolate_logical() hw/ppc/spapr_drc.c |

Re: [PATCH 0/4] DEVICE_NOT_DELETED/DEVICE_UNPLUG_ERROR QAPI events

2021-04-20 Thread Daniel Henrique Barboza
machine, starting with CPUs. Thanks, DHB [1] https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210416210216.380291-3-danielhb...@gmail.com/ On 3/12/21 5:07 PM, Daniel Henrique Barboza wrote: Hi, This series adds 2 new QAPI events, DEVICE_NOT_DELETED and DEVICE_UNPLUG_ERROR. They were

[PATCH 0/1] pSeries: handle hotunplug errors in drc_unisolate_logical()

2021-04-16 Thread Daniel Henrique Barboza
-02/msg06395.html Daniel Henrique Barboza (1): spapr_drc.c: handle hotunplug errors in drc_unisolate_logical() hw/ppc/spapr_drc.c | 23 +++ 1 file changed, 23 insertions(+) -- 2.30.2

[PATCH 1/1] spapr_drc.c: handle hotunplug errors in drc_unisolate_logical()

2021-04-16 Thread Daniel Henrique Barboza
one in rtas_ibm_configure_connector(). Although at this moment the Linux kernel is only reporting CPU removal errors, let's get the code ready to handle LMBs as well. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_drc.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/ppc/spapr_dr

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