Re: [PATCH 06/22] vfio/spapr.c: use QOM casts where appropriate

2025-07-16 Thread Harsh Prateek Bora
On 7/15/25 14:55, Mark Cave-Ayland wrote: Use QOM casts to convert between VFIOContainer and VFIOContainerBase instead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Harsh Prateek Bora --- hw/vfio/spapr.c | 16 ++-- 1 file changed, 6

Re: [PATCH 05/22] ppc/spapr_pci_vfio.c: use QOM casts where appropriate

2025-07-16 Thread Harsh Prateek Bora
On 7/15/25 14:55, Mark Cave-Ayland wrote: Use a QOM cast to convert to VFIOContainer instead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Harsh Prateek Bora --- hw/ppc/spapr_pci_vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH 5/6] treewide: update docs file extensions (.txt -> .rst) in comments

2025-07-01 Thread Harsh Prateek Bora
/hw/acpi/pcihp.h| 2 +- include/hw/misc/ivshmem-flat.h | 2 +- tests/qtest/vmgenid-test.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) Reviewed-by: Harsh Prateek Bora diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 9ba90806f2..732d613ac0 100644 --- a/hw/acpi

[PATCH] ppc/spapr: remove dead logic for non-existent machine type

2025-06-16 Thread Harsh Prateek Bora
This logic was kept here to support pseries-2.12 and older machine type to enable them to calculate supported page size. Since the support for such older machine types is already removed, this becomes dead code and hence removed. Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr_caps.c | 13

Re: [PATCH 25/31] hw/ppc/spapr_tpm_proxy: skip automatic zero-init of large arrays

2025-06-11 Thread Harsh Prateek Bora
uint8_t buf_in[TPM_SPAPR_BUFSIZE]; -uint8_t buf_out[TPM_SPAPR_BUFSIZE]; +QEMU_UNINITIALIZED uint8_t buf_in[TPM_SPAPR_BUFSIZE]; +QEMU_UNINITIALIZED uint8_t buf_out[TPM_SPAPR_BUFSIZE]; Reviewed-by: Harsh Prateek Bora ssize_t ret; trace_spapr_tpm_execute(data_in, da

Re: [PATCH 24/31] hw/ppc/pnv_occ: skip automatic zero-init of large struct

2025-06-11 Thread Harsh Prateek Bora
c.c @@ -789,7 +789,7 @@ static bool occ_opal_process_command(PnvOCC *occ, static bool occ_model_tick(PnvOCC *occ) { -struct occ_dynamic_data dynamic_data; +QEMU_UNINITIALIZED struct occ_dynamic_data dynamic_data; Reviewed-by: Harsh Prateek Bora if (!occ_read_dynamic_data(occ,

[PATCH 1/3] ppc/spapr: remove deprecated machine pseries-3.0

2025-05-06 Thread Harsh Prateek Bora
pseries-3.0 had been deprecated and due for removal now as per policy. Also remove legacy irq support which existed for pre pseries-3.1 machines. Suggested-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 1 - include/hw/ppc/spapr_irq.h | 1 - hw/ppc

[PATCH 2/3] ppc/spapr: remove deprecated machine pseries-3.1

2025-05-06 Thread Harsh Prateek Bora
pseries-3.1 had been deprecated and due for removal now as per policy. Also remove backward compatibility flags and related code introduced for pre pseries-4.0 machines. Suggested-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 3 -- hw/ppc/spapr.c

[PATCH 0/3] ppc/spapr: remove deprecated machines till pseries-4.0

2025-05-06 Thread Harsh Prateek Bora
pseries-3.0, 3.1 and 4.0 had been deprecated and due for removal now. Also removing pre-4.1 backward compatibility hacks that aren't needed anymore. Harsh Prateek Bora (3): ppc/spapr: remove deprecated machine pseries-3.0 ppc/spapr: remove deprecated machine pseries-3.1 ppc/spapr: r

[PATCH 3/3] ppc/spapr: remove deprecated machine pseries-4.0

2025-05-06 Thread Harsh Prateek Bora
pseries-4.0 had been deprecated and due for removal now as per policy. Also remove pre-4.1 migration hacks which were introduced for backward compatibility. Suggested-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 1 - hw/ppc/spapr.c | 27

[PATCH] ppc/spapr: init lrdr-capapcity phys with ram size if maxmem not provided

2025-05-05 Thread Harsh Prateek Bora
leads to bits being set to 0 in absence of maxmem param. Fix this by initializing the respective bits as per total mem size in such case. Reported-by: Gaurav Batra Tested-by: David Christensen Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr.c | 11 +++ 1 file changed, 7 insertions

Re: [PATCH v3 14/14] ppc/spapr: remove deprecated machine pseries-3.0

2025-05-02 Thread Harsh Prateek Bora
Hi Cedric, On 4/29/25 18:59, Cédric Le Goater wrote: Hello Harsh, On 10/11/24 07:57, Cédric Le Goater wrote: On 10/7/24 17:38, Harsh Prateek Bora wrote: As per Qemu's deprecation policy [1], and the mailing list discussion that happened on [2], pseries-3.0 is more than 6 years old

Re: [PATCH] tests/functional/test_ppc64_pseries: Skip test_ppc64_linux_smt_boot if necessary

2025-04-24 Thread Harsh Prateek Bora
-off-by: Thomas Huth Reviewed-by: Harsh Prateek Bora --- tests/functional/test_ppc64_pseries.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/test_ppc64_pseries.py b/tests/functional/test_ppc64_pseries.py index fdc404ed033..67057934e8d 100755 --- a/tests/functional/t

Re: [PATCH v4 1/8] hw/ppc: Implement skeleton code for fadump in PSeries

2025-04-21 Thread Harsh Prateek Bora
On 3/23/25 23:10, Aditya Gupta wrote: Add skeleton for handle "ibm,configure-kernel-dump" rtas call in QEMU. Verify basic details mandated by the PAPR, such as number of inputs/output, and add handling for the three fadump commands: regiser/unregister/invalidate. Currently fadump register wi

Re: [PATCH 5/7] hw/ppc: Preserve Memory Regions as per MDST/MDDT tables

2025-03-15 Thread Harsh Prateek Bora
On 2/17/25 12:49, Aditya Gupta wrote: When MPIPL is used, OPAL/Linux registers memory regions to be preserved on a Memory-Preserving boot ('crashkernel boot'). The regions are added to two tables: MDST and MDDT (source and destination tables) The MDST contains the start address of the region

[PATCH v2] ppc/spapr: fix default cpu for pre-9.0 machines.

2025-03-15 Thread Harsh Prateek Bora
0 CPU") Cc: qemu-sta...@nongnu.org Signed-off-by: Harsh Prateek Bora --- v2: addressed review comments from Philippe, Daniel --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index c15340a58d..825afba4f4 100644 --- a/hw/ppc/spapr.c +++ b/hw/p

Re: [PATCH] ppc/spapr: fix default cpu for pre-10.0 machines.

2025-03-13 Thread Harsh Prateek Bora
On 3/13/25 15:02, Daniel P. Berrangé wrote: On Wed, Mar 12, 2025 at 11:28:04AM +0530, Harsh Prateek Bora wrote: When POWER10 CPU was made as default, we missed keeping POWER9 as default for older pseries releases (pre-10.0) at that time. This caused breakge in default cpu evaluation for

Re: [PATCH] ppc/spapr: fix default cpu for pre-10.0 machines.

2025-03-12 Thread Harsh Prateek Bora
On 3/12/25 15:50, Harsh Prateek Bora wrote: On 3/12/25 15:39, Philippe Mathieu-Daudé wrote: On 12/3/25 06:58, Harsh Prateek Bora wrote: When POWER10 CPU was made as default, we missed keeping POWER9 as default for older pseries releases (pre-10.0) at that time. This caused breakge in

Re: [PATCH] ppc/spapr: fix default cpu for pre-10.0 machines.

2025-03-12 Thread Harsh Prateek Bora
On 3/12/25 15:39, Philippe Mathieu-Daudé wrote: On 12/3/25 06:58, Harsh Prateek Bora wrote: When POWER10 CPU was made as default, we missed keeping POWER9 as default for older pseries releases (pre-10.0) at that time. This caused breakge in default cpu evaluation for older pseries machines

[PATCH] ppc/spapr: fix default cpu for pre-10.0 machines.

2025-03-11 Thread Harsh Prateek Bora
0 CPU") Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index c15340a58d..b31a91e2e2 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4748,6 +4748,7 @@ static void spapr_machine_9_2_class_options(Ma

Re: [PATCH v4] spapr: nested: Add support for reporting Hostwide state counter

2025-03-11 Thread Harsh Prateek Bora
ept 'struct SpaprMachineState *' [ Nic ] * Updated code in 'spapr_nested.c' to pass around 'struct SpaprMachineState *' which eventually needs to be sent to the 'struct guest_state_element_type.location' callback. Loooks fine to me. Reviewed-by: Harsh Prateek Bo

Re: [PATCH 6/7] hw/ppc: [WIP] Add Processor Dump Area offsets in Pnv SBE

2025-03-11 Thread Harsh Prateek Bora
On 2/17/25 12:49, Aditya Gupta wrote: Add offsets for the processor state captured during MPIPL dump. This is incomplete. And might be implemented in future if the effort to implement MPIPL is resumed again. Please use RFC prefix in next iteration of patch series until the patches are requ

Re: [PATCH 3/7] hw/ppc: Handle stash command in PowerNV SBE

2025-03-10 Thread Harsh Prateek Bora
On 2/17/25 12:49, Aditya Gupta wrote: Earlier since the SBE_CMD_STASH_MPIPL_CONFIG command was not handled, so skiboot used to not get any response from SBE: [ 106.350742821,3] SBE: Message timeout [chip id = 0], cmd = d7, subcmd = 7 [ 106.352067746,3] SBE: Failed to send stash M

Re: [PATCH 7/7] hw/ppc: Implement MPIPL in PowerNV

2025-03-10 Thread Harsh Prateek Bora
On 2/17/25 12:49, Aditya Gupta wrote: Linux expect a "ibm,opal/dump" node to know whether MPIPL (aka fadump) is supported on the hardware. Export the "ibm,opal/dump" node in QEMU's device tree for Linux to know that PowerNV supports MPIPL. With the commit, kernel boots thinking fadump is sup

Re: [PATCH 4/7] hw/ppc: Add MDST/MDDT/MDRT table structures and offsets

2025-03-10 Thread Harsh Prateek Bora
On 2/17/25 12:49, Aditya Gupta wrote: Add the MDST, MDDT, MDRT tables offsets and structures as per current skiboot upstream: commit bc7b85db1e7e ("opal-ci: Remove centos7") These structures will be later populated when preserving memory regions for MPIPL Signed-off-by: Aditya Gupta -

Re: [PATCH 2/7] hw/ppc: Implement S0 SBE interrupt as cpu_pause then host reset

2025-03-10 Thread Harsh Prateek Bora
On 2/17/25 12:49, Aditya Gupta wrote: SBE's implementation of S0 seems to be basically "stop all clocks" and then "host reset" Nearest equivalent to the stop clocks seems to be 'pause_all_vcpus' in QEMU, Then reset the host, which is 'SHUTDOWN_CAUSE_GUEST_RESET' in QEMU. Implement the S0 in

Re: [PATCH 1/7] hw/ppc: Log S0/S1 Interrupt triggers by OPAL

2025-03-10 Thread Harsh Prateek Bora
On 2/17/25 12:49, Aditya Gupta wrote: During MPIPL (aka fadump), OPAL triggers the S0 SBE interrupt to trigger MPIPL. Currently QEMU treats it as "Unimplemented", handle the interrupts by just logging that the interrupt happened. Signed-off-by: Aditya Gupta --- hw/ppc/pnv_sbe.c | 13 +

Re: [PATCH 5/6] hw/ppc: Pass device tree properties for Fadump

2025-03-04 Thread Harsh Prateek Bora
On 2/27/25 08:58, Nicholas Piggin wrote: On Mon Feb 17, 2025 at 5:17 PM AEST, Aditya Gupta wrote: Platform (ie. QEMU) is expected to pass few device tree properties for details for fadump: * "ibm,configure-kernel-dump": RTAS call for fadump * "ibm,configure-kernel-dump-sizes": Space re

Re: [PATCH 4/6] hw/ppc: Implement saving CPU state in Fadump

2025-03-04 Thread Harsh Prateek Bora
On 2/17/25 12:47, Aditya Gupta wrote: Kernel expects CPU states/register states in the format mentioned in "Register Save Area" in PAPR. The platform (in our case, QEMU) saves each CPU register in the form of an array of "register entries", the start and end of this array is signified by "CPU

Re: [PATCH 3/6] hw/ppc: Preserve memory regions registered for fadump

2025-03-04 Thread Harsh Prateek Bora
On 2/17/25 12:47, Aditya Gupta wrote: While the first kernel boots, it registers memory regions for fadump such as: * CPU state data (has to be populated by the platform) * HPTE state data (has to be populated by the platform) * Real Mode Regions (platform should copy it to req

Re: [PATCH 2/6] hw/ppc: Trigger Fadump boot if fadump is registered

2025-03-04 Thread Harsh Prateek Bora
On 2/17/25 12:47, Aditya Gupta wrote: According to PAPR: R1–7.3.30–3. When the platform receives an ibm,os-term RTAS call, or on a system reset without an ibm,nmi-interlock RTAS call, if the platform has a dump structure registered through the ibm,configure-kernel-dump cal

Re: [PATCH 1/6] hw/ppc: Implement skeleton code for fadump in PSeries

2025-03-04 Thread Harsh Prateek Bora
On 2/17/25 12:47, Aditya Gupta wrote: Implement the handler for "ibm,configure-kernel-dump" rtas call in QEMU. Currently the handler just does basic checks and handles register/unregister/invalidate requests from kernel. Fadump will be enabled in a later patch. Let's use FADump or fadump f

Re: [PATCH v3 7/7] vfio: Remove superfluous error report in vfio_listener_region_add()

2025-02-06 Thread Harsh Prateek Bora
On 2/6/25 18:44, Cédric Le Goater wrote: For pseries machines, commit 567b5b309abe ("vfio/pci: Relax DMA map errors for MMIO regions") introduced 2 error reports to notify the user of MMIO mapping errors. Consolidate both code paths under one. Cc: Harsh Prateek Bora Cc: Shivapra

Re: [PATCH v2] spapr: nested: Add support for reporting Hostwide state counter

2025-01-31 Thread Harsh Prateek Bora
4) -#define H_GUEST_GETSET_STATE_FLAG_GUEST_WIDE 0x8000 -#define GUEST_STATE_REQUEST_GUEST_WIDE 0x1 -#define GUEST_STATE_REQUEST_SET 0x2 +#define H_GUEST_GET_STATE_FLAGS_MASK 0xC000ULL +#define H_GUEST_SET_STATE_FLAGS_MASK 0x8000ULL +#define H_GUEST_SET_STATE_FL

Re: [PATCH v2 13/15] target/ppc: Make powerpc_excp() prototype public

2025-01-28 Thread Harsh Prateek Bora
On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: In order to move TCG specific code dependent on powerpc_excp() in the next commit, expose its prototype in "internal.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Harsh Prateek Bora --- target/ppc/internal.h| 1

Re: [PATCH v2 14/15] target/ppc: Restrict ATTN / SCV / PMINSN helpers to TCG

2025-01-28 Thread Harsh Prateek Bora
On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: Move helper_attn(), helper_scv() and helper_pminsn() to tcg-excp_helper.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Harsh Prateek Bora --- target/ppc/excp_helper.c | 45 target/ppc/tcg

Re: [PATCH v2 12/15] target/ppc: Fix style in excp_helper.c

2025-01-28 Thread Harsh Prateek Bora
On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: Fix style in do_rfi() before moving the code around. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Harsh Prateek Bora --- target/ppc/excp_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/ppc

Re: [PATCH v2 11/15] target/ppc: Restrict various common helpers to TCG

2025-01-28 Thread Harsh Prateek Bora
{ diff --git a/target/ppc/tcg-excp_helper.c b/target/ppc/tcg-excp_helper.c index dc5601a4577..5ad39cacc92 100644 --- a/target/ppc/tcg-excp_helper.c +++ b/target/ppc/tcg-excp_helper.c @@ -66,6 +66,149 @@ void raise_exception(CPUPPCState *env, uint32_t exception) raise_exception_err_ra(env, exc

Re: [PATCH v2 10/15] target/ppc: Restrict ppc_tcg_hv_emu() to TCG

2025-01-28 Thread Harsh Prateek Bora
On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: Make is_prefix_insn_excp() prototype but have it guarded by a tcg_enabled() check. Inline part of it in powerpc_excp_books(). Extract POWERPC_EXCP_HV_EMU handling code to ppc_tcg_hv_emu(), also exposing its prototype in "internal.h". Signed-off

Re: [PATCH v2 09/15] target/ppc: Restrict exception helpers to TCG

2025-01-28 Thread Harsh Prateek Bora
On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: Move exception helpers to tcg-excp_helper.c so they are only built when TCG is selected. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/excp_helper.c | 34 target/ppc/tcg-excp_helper.c | 38

Re: [PATCH v2 07/15] target/ppc: Restrict powerpc_checkstop() to TCG

2025-01-28 Thread Harsh Prateek Bora
On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: Expose powerpc_checkstop() prototype, and move it to tcg-excp_helper.c, only built when TCG is available. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Harsh Prateek Bora --- target/ppc/internal.h| 4 +++- target/ppc

Re: [PATCH v2 08/15] target/ppc: Remove raise_exception_ra()

2025-01-28 Thread Harsh Prateek Bora
ion_err_ra calls passing error_code as 0, I hope removing this is fine as still unused. Reviewed-by: Harsh Prateek Bora --- target/ppc/cpu.h | 2 -- target/ppc/excp_helper.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 0

Re: [PATCH v2 06/15] target/ppc: Ensure powerpc_checkstop() is only called under TCG

2025-01-27 Thread Harsh Prateek Bora
On 1/28/25 12:13, Harsh Prateek Bora wrote: On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   target/ppc/excp_helper.c | 6 ++   1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c

Re: [PATCH v2 06/15] target/ppc: Ensure powerpc_checkstop() is only called under TCG

2025-01-27 Thread Harsh Prateek Bora
On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/excp_helper.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 8956466db1d..b08cd53688c 100644 --- a/targe

Re: [PATCH v2 05/15] target/ppc: Move ppc_ldl_code() to tcg-excp_helper.c

2025-01-27 Thread Harsh Prateek Bora
the function declaration introduced in internal.h in patch 3. Otherwise, Reviewed-by: Harsh Prateek Bora diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index b05eb7f5aec..8956466db1d 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -136,27 +136,6

Re: [PATCH v2 04/15] target/ppc: Move TCG specific exception handlers to tcg-excp_helper.c

2025-01-27 Thread Harsh Prateek Bora
, .debug_check_breakpoint = ppc_cpu_debug_check_breakpoint, .debug_check_watchpoint = ppc_cpu_debug_check_watchpoint, }; #endif /* CONFIG_TCG */ Thanks for capturing this in commit log. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Harsh Prateek Bora --- target/ppc

Re: [PATCH v2 03/15] target/ppc: Make ppc_ldl_code() declaration public

2025-01-27 Thread Harsh Prateek Bora
Reviewed-by: Harsh Prateek Bora --- target/ppc/internal.h| 2 ++ target/ppc/excp_helper.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/ppc/internal.h b/target/ppc/internal.h index 20fb2ec593c..46db6adfcf6 100644 --- a/target/ppc/internal.h +++ b/target/ppc

Re: [PATCH v2 02/15] hw/ppc/spapr: Restrict part of PAGE_INIT hypercall to TCG

2025-01-27 Thread Harsh Prateek Bora
On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: Restrict the tb_flush() call to TCG. Assert we are using KVM or TCG. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Harsh Prateek Bora --- hw/ppc/spapr_hcall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH v2 01/15] hw/ppc/spapr: Restrict CONFER hypercall to TCG

2025-01-27 Thread Harsh Prateek Bora
Hi Philippe, On 1/27/25 15:56, Philippe Mathieu-Daudé wrote: TODO: Add PPC folks why :) While this appear be TCG specific, may I know what caused you to bring this change? Usually we have blanks stubs for hcalls in KVM mode which are only TCG specific. That helps in avoiding building TCG spe

Re: [PATCH] spapr: nested: Add support for reporting Hostwide state counter

2025-01-23 Thread Harsh Prateek Bora
Hi Vaibhav, On 1/15/25 12:37, Vaibhav Jain wrote: Add support for reporting Hostwide state counters for nested KVM pseries guests running with 'cap-nested-hv' with Qemu-TCG acting as I hope you meant cap-nested-papr for APIv2 (cap-nested-hv is APIv1). L0-hypervisor. sPAPR supports reporting

Re: [PATCH v3 0/2] Add new PowerPC Special Purpose Registers

2025-01-07 Thread Harsh Prateek Bora
+ Shivaprasad (had posted patches for DAWR1/DAWRX1 earlier) https://lore.kernel.org/qemu-devel/170679876639.188422.11634974895844092362.st...@ltc-boston1.aus.stglabs.ibm.com/ On 1/8/25 02:21, dan tan wrote: From: dan tan *** BLURB HERE *** Version 3 summary: RWMR (Region Weighted Mode Re

Re: [PATCH v4 0/6] hw/ppc: Remove tswap() calls

2024-12-23 Thread Harsh Prateek Bora
hw/ppc/spapr: Convert DIRTY_HPTE() macro as hpte_set_dirty() method > hw/ppc/epapr: Do not swap ePAPR magic value > For spapr: Reviewed-by: Harsh Prateek Bora > hw/ppc/sam460ex.c | 2 +- > hw/ppc/spapr.c| 63 +-- > hw/ppc/vi

Re: [PATCH v8 2/2] ppc: spapr: Enable 2nd DAWR on Power10 pSeries machine

2024-12-20 Thread Harsh Prateek Bora
Typo corrected below. On 12/20/24 15:27, Harsh Prateek Bora wrote: Hi Shiva, On 2/1/24 20:16, Shivaprasad G Bhat wrote: As per the PAPR, bit 0 of byte 64 in pa-features property indicates availability of 2nd DAWR registers. i.e. If this bit is set, 2nd DAWR is present, otherwise not. Use

Re: [PATCH 2/5] spapr: Fix vpa dispatch count for record-replay

2024-12-20 Thread Harsh Prateek Bora
On 12/20/24 14:59, BALATON Zoltan wrote: On Fri, 20 Dec 2024, Harsh Prateek Bora wrote: Hi Nick, On 12/19/24 09:10, Nicholas Piggin wrote: The dispatch count is a field in guest memory that the hypervisor increments when preempting and dispatching the guest. This was not being done

Re: [PATCH v8 2/2] ppc: spapr: Enable 2nd DAWR on Power10 pSeries machine

2024-12-20 Thread Harsh Prateek Bora
CE_SET_DAWR0 ? +ppc_store_dawr1(env, value1); +ppc_store_dawrx1(env, value2); and then do an else g_assert_not_reached() ? With suggested changes after addressing other review comments from Nick/David: Reviewed-by: Harsh Prateek Bora +} return H_SUCCESS; } @@ -911,8 +917

Re: [PATCH 2/5] spapr: Fix vpa dispatch count for record-replay

2024-12-20 Thread Harsh Prateek Bora
Hi Nick, On 12/19/24 09:10, Nicholas Piggin wrote: The dispatch count is a field in guest memory that the hypervisor increments when preempting and dispatching the guest. This was not being done deterministically with respect to icount, because tcg exec exit is not deterministic (e.g., an async

Re: [PATCH 3/5] spapr: Generate random HASHPKEYR for spapr machines

2024-12-20 Thread Harsh Prateek Bora
Reviewed-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 1 + hw/ppc/spapr.c | 3 +++ hw/ppc/spapr_cpu_core.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index af4aa1cb0fb..db44893689b 100644 --- a/include/hw/ppc

Re: [PATCH v8 1/2] ppc: Enable 2nd DAWR support on Power10 PowerNV machine

2024-12-19 Thread Harsh Prateek Bora
t;msr & ((target_ulong)1 << MSR_DR)) { -if (!wt) { -return false; -} -} else { -if (wt) { - return false; -} -} +} else { +

Re: [PATCH v3 5/7] hw/ppc/spapr: Convert CLEAN_HPTE() macro as hpte_set_clean() method

2024-12-18 Thread Harsh Prateek Bora
On 12/18/24 23:51, Philippe Mathieu-Daudé wrote: Convert CLEAN_HPTE() macro as hpte_set_clean() method. Since sPAPR is in big endian configuration at reset, use the big endian LD/ST API to access the HPTEs. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr.c | 15 ++- 1 f

Re: [PATCH v3 4/7] hw/ppc/spapr: Convert HPTE_DIRTY() macro as hpte_is_dirty() method

2024-12-18 Thread Harsh Prateek Bora
Hi Philippe, Similar issue here as with patch 2 .. On 12/18/24 23:51, Philippe Mathieu-Daudé wrote: Convert HPTE_DIRTY() macro as hpte_is_dirty() method. Since sPAPR is in big endian configuration at reset, use the big endian LD/ST API to access the HPTEs. Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH v3 2/7] hw/ppc/spapr: Convert HPTE() macro as hpte_get() method

2024-12-18 Thread Harsh Prateek Bora
Hi Philippe, On 12/18/24 23:51, Philippe Mathieu-Daudé wrote: Convert HPTE() macro as hpte_get() method. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr.c | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/

Re: [PATCH 03/24] target/ppc: Remove empty property list

2024-12-15 Thread Harsh Prateek Bora
On 12/16/24 09:20, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Harsh Prateek Bora --- target/ppc/cpu_init.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 1253dbf622..5e95790def 100644 --- a

Re: [PATCH 07/71] target/ppc: Remove empty property list

2024-12-15 Thread Harsh Prateek Bora
On 12/14/24 00:36, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Harsh Prateek Bora --- target/ppc/cpu_init.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 1253dbf622..5e95790def 100644 --- a

Re: [PULL 0/6] ppc-for-9.2-2 queue

2024-11-27 Thread Harsh Prateek Bora
pegasos2: Fix IRQ routing from pci.0 > > > > Glenn Miles (1): > >target/ppc: Fix THREAD_SIBLING_FOREACH for multi-socket > > > > Harsh Prateek Bora (1): > >ppc/spapr: fix drc index mismatch for partially enabled vcpus > > I think at least this ^^^

[PATCH] ppc/spapr: fix drc index mismatch for partially enabled vcpus

2024-11-19 Thread Harsh Prateek Bora
the issue by using correct drc index for explicitly enabled vcpus during init. Reported-by: Anushree Mathur Tested-by: Anushree Mathur Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.

Re: [PATCH v2] spapr: nested: Add support for DPDES SPR in GSB for TCG L0

2024-10-21 Thread Harsh Prateek Bora
he GSB elements lookup table.") Suggested-by: Harsh Prateek Bora Signed-off-by: Amit Machhiwal Reviewed-by: Harsh Prateek Bora --- Changes since v1: - Addressed Harsh's comments on v1 - Updated the patch description to more precise details of the issue - v1: ht

Re: [PATCH] spapr: nested: Add support for DPDES SPR in GSB for TCG L0

2024-10-18 Thread Harsh Prateek Bora
Hi Amit, On 10/18/24 10:47, Harsh Prateek Bora wrote: Hi Amit, On 10/17/24 16:30, Amit Machhiwal wrote: The DPDES support for doorbell emulation and handling for KVM on PAPR guests was added in Linux via [1]. Subsequently, a new GSB element for DPDES was added in Linux; the same has been

Re: [PATCH] spapr: nested: Add support for DPDES SPR in GSB for TCG L0

2024-10-17 Thread Harsh Prateek Bora
With that: Reviewed-by: Harsh Prateek Bora KVM: unknown exit, hardware reason ffea NIP 0100 LR CTR XER CPU#0 MSR 3000 HID0 HF 6c002000 iidx 3 didx 3 TB DECR

[PATCH v4 02/13] ppc/spapr: remove deprecated machine pseries-2.2

2024-10-14 Thread Harsh Prateek Bora
Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.2 specific code with this patch for now. Suggested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw

[PATCH v4 08/13] ppc/spapr: remove deprecated machine pseries-2.8

2024-10-14 Thread Harsh Prateek Bora
Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.8 specific code with this patch for now. Suggested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr.c

[PATCH v4 13/13] ppc/spapr: remove deprecated machine pseries-2.12

2024-10-14 Thread Harsh Prateek Bora
Le Goater Signed-off-by: Harsh Prateek Bora --- docs/about/deprecated.rst | 8 include/hw/ppc/spapr_cpu_core.h | 1 - target/ppc/cpu.h| 4 hw/ppc/spapr.c | 25 - hw/ppc/spapr_cpu_core.c | 12

[PATCH v4 07/13] ppc/spapr: remove deprecated machine pseries-2.7

2024-10-14 Thread Harsh Prateek Bora
: Cédric Le Goater Acked-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/pci-host/spapr.h | 4 -- target/ppc/cpu.h| 5 --- hw/ppc/spapr.c | 75 - hw/ppc/spapr_pci.c | 57

[PATCH v4 06/13] ppc/spapr: remove deprecated machine pseries-2.6

2024-10-14 Thread Harsh Prateek Bora
Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.6 specific code with this patch for now. Suggested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr.c

[PATCH v4 12/13] ppc/spapr: remove deprecated machine pseries-2.12-sxxm

2024-10-14 Thread Harsh Prateek Bora
Commit 0cac0f1b964 marked pseries-2.12 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.12-sxxm specific code with this patch. Suggested-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr.c | 14 -- 1 file changed, 14

[PATCH v4 11/13] ppc/spapr: remove deprecated machine pseries-2.11

2024-10-14 Thread Harsh Prateek Bora
Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.11 specific code with this patch. Suggested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr.c | 15

[PATCH v4 04/13] ppc/spapr: remove deprecated machine pseries-2.4

2024-10-14 Thread Harsh Prateek Bora
Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 1 - hw/ppc/spapr.c | 38 -- 2 files changed, 4 insertions(+), 35 deletions(-) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index

[PATCH v4 10/13] ppc/spapr: remove deprecated machine pseries-2.10

2024-10-14 Thread Harsh Prateek Bora
Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.10 specific code with this patch for now. Suggested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- hw/ppc

[PATCH v4 05/13] ppc/spapr: remove deprecated machine pseries-2.5

2024-10-14 Thread Harsh Prateek Bora
: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 1 - hw/ppc/spapr.c | 25 + 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 1821ef96c7..6e9e62386c 100644 --- a

[PATCH v4 09/13] ppc/spapr: remove deprecated machine pseries-2.9

2024-10-14 Thread Harsh Prateek Bora
Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 1 - target/ppc/cpu.h | 1 - hw/intc/xics.c | 16 --- hw/ppc/spapr.c | 104 - migration/savevm.c | 19 target/ppc

[PATCH v4 01/13] ppc/spapr: remove deprecated machine pseries-2.1

2024-10-14 Thread Harsh Prateek Bora
Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.1 specific code with this patch for now. Suggested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw

[PATCH v4 00/13] ppc/spapr: remove deprecated machines specific code

2024-10-14 Thread Harsh Prateek Bora
bm.com> Harsh Prateek Bora (13): ppc/spapr: remove deprecated machine pseries-2.1 ppc/spapr: remove deprecated machine pseries-2.2 ppc/spapr: remove deprecated machine pseries-2.3 ppc/spapr: remove deprecated machine pseries-2.4 ppc/spapr: remove deprecated machine pseries-2.5

[PATCH v4 03/13] ppc/spapr: remove deprecated machine pseries-2.3

2024-10-14 Thread Harsh Prateek Bora
machines until pseries-2.3. Suggested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/boards.h | 3 --- include/hw/pci-host/spapr.h | 1 - hw/core/machine.c | 13 - hw/ppc/spapr.c | 15

[PATCH v4 3/9] target/ppc: optimize hreg_compute_pmu_hflags_value

2024-10-09 Thread Harsh Prateek Bora
The second if-condition can be true only if the first one above is true. Enclose the latter into the former to avoid un-necessary check if first condition fails. Reviewed-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora --- target/ppc/helper_regs.c | 6

[PATCH v4 8/9] target/ppc: combine multiple ail checks into one

2024-10-09 Thread Harsh Prateek Bora
ppc_excp_apply_ail has multiple if-checks for ail which is un-necessary. Combine them as appropriate. Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora --- target/ppc/excp_helper.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/target/ppc

[PATCH v4 5/9] target/ppc: optimize p8 exception handling routines

2024-10-09 Thread Harsh Prateek Bora
Most of the p8 exception handling accesses env->pending_interrupts and env->spr[SPR_LPCR] at multiple places. Passing it directly as local variables simplifies the code and avoids multiple indirect accesses. Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora --- targ

[PATCH v4 4/9] target/ppc: optimize p9 exception handling routines

2024-10-09 Thread Harsh Prateek Bora
Currently, p9 exception handling has multiple if-condition checks where it does an indirect access to pending_interrupts and LPCR via env. Pass the values during entry to avoid multiple indirect accesses. Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora --- target/ppc

[PATCH v4 2/9] target/ppc: optimize hreg_compute_pmu_hflags_value

2024-10-09 Thread Harsh Prateek Bora
Cache env->spr[SPR_POWER_MMCR0] in a local variable as used in multiple conditions to avoid multiple indirect accesses. Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora --- target/ppc/helper_regs.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --gi

[PATCH v4 7/9] target/ppc: simplify var usage in ppc_next_unmasked_interrupt

2024-10-09 Thread Harsh Prateek Bora
As previously done for arch specific handlers, simplify var usage in ppc_next_unmasked_interrupt by caching the env->pending_interrupts and env->spr[SPR_LPCR] in local vars and using it later at multiple places. Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora --- targ

[PATCH v4 0/9] misc ppc improvements/optimizations

2024-10-09 Thread Harsh Prateek Bora
tended improvements to other Power arch p7, p8 (Nick) other minor improvements v2: addressed review comments from BALATON Zoltan v1: Initial patch Harsh Prateek Bora (9): target/ppc: use locally stored msr and avoid indirect access target/ppc: optimize hreg_compute_pmu_hflags_value target/ppc: op

[PATCH v4 1/9] target/ppc: use locally stored msr and avoid indirect access

2024-10-09 Thread Harsh Prateek Bora
hreg_compute_hflags_value already stores msr locally to be used in most of the logic in the routine however some instances are still using env->msr which is unnecessary. Use locally stored value as available. Reviewed-by: Nicholas Piggin Reviewed-by: BALATON Zoltan Signed-off-by: Harsh Prat

[PATCH v4 6/9] target/ppc: optimize p7 exception handling routines

2024-10-09 Thread Harsh Prateek Bora
Like p8 and p9, simplifying p7 exception handling rotuines to avoid un-necessary multiple indirect accesses to env->pending_interrupts and env->spr[SPR_LPCR]. Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora --- target/ppc/excp_helper.

[PATCH v4 9/9] target/ppc: reduce duplicate code between init_proc_POWER{9, 10}

2024-10-09 Thread Harsh Prateek Bora
Historically, the registration of sprs have been inherited alongwith every new Power arch support being added leading to a lot of code duplication. It's time to do necessary cleanups now to avoid further duplication with newer arch support being added. Signed-off-by: Harsh Prateek Bora Rev

Re: [PATCH v3 01/14] ppc/spapr: remove deprecated machine pseries-2.1

2024-10-07 Thread Harsh Prateek Bora
Hi Philippe, On 10/8/24 01:53, Philippe Mathieu-Daudé wrote: Hi Harsh, On 7/10/24 12:38, Harsh Prateek Bora wrote: Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.1 specific code with this patch for now

[PATCH v3 14/14] ppc/spapr: remove deprecated machine pseries-3.0

2024-10-07 Thread Harsh Prateek Bora
rnel.org/qemu-devel/1d7c210e-d7a6-4233-b555-c99a41f3c...@kaod.org/ While at it, also remove related legacy irq hacks which are now obsolete. Suggested-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 1 - include/hw/ppc/spapr_irq.h | 1 - hw/ppc

[PATCH v3 09/14] ppc/spapr: remove deprecated machine pseries-2.9

2024-10-07 Thread Harsh Prateek Bora
Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 1 - target/ppc/cpu.h | 1 - hw/intc/xics.c | 16 --- hw/ppc/spapr.c | 104 - migration/savevm.c | 19 target/ppc

[PATCH v3 05/14] ppc/spapr: remove deprecated machine pseries-2.5

2024-10-07 Thread Harsh Prateek Bora
: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 1 - hw/ppc/spapr.c | 25 + 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 1821ef96c7..6e9e62386c 100644 --- a/include/hw/ppc/spapr.h +++ b

[PATCH v3 03/14] ppc/spapr: remove deprecated machine pseries-2.3

2024-10-07 Thread Harsh Prateek Bora
machines until pseries-2.3. Suggested-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- include/hw/pci-host/spapr.h | 1 - hw/ppc/spapr.c | 15 --- hw/ppc/spapr_pci.c | 35 --- 3 files changed, 51 deletions(-) diff

[PATCH v3 08/14] ppc/spapr: remove deprecated machine pseries-2.8

2024-10-07 Thread Harsh Prateek Bora
Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.8 specific code with this patch for now. Suggested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr.c

[PATCH v3 02/14] ppc/spapr: remove deprecated machine pseries-2.2

2024-10-07 Thread Harsh Prateek Bora
Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.2 specific code with this patch for now. Suggested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Harsh Prateek Bora --- hw/ppc/spapr.c

[PATCH v3 00/14] ppc/spapr: remove deprecated machines specific code

2024-10-07 Thread Harsh Prateek Bora
ments from Cedric on v2 patchset Removed some more pre-2.10 migration hacks in patch 9/14 Removed pseries-2.12 and pseries-3.10 also as due for removal. v2: <20241001092910.1030913-1-hars...@linux.ibm.com> v1: <20240917060300.943496-1-hars...@linux.ibm.com> Harsh Prateek Bora

  1   2   3   4   5   6   7   >