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

2025-02-16 Thread Aditya Gupta
[0.00] fadump: Failed to find memory chunk for reservation! And even with anything from 2GB - 19GB, the kernel fails to boot due to some memory issues. Trying with >20GB memory is recommended for now Signed-off-by: Aditya Gupta --- hw/ppc/pnv.c | 49

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

2025-02-16 Thread Aditya Gupta
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 + 1 file changed, 13

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

2025-02-16 Thread Aditya Gupta
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. Signed-off-by: Aditya Gupta --- hw/ppc/pnv_sbe.c | 27 +++ 1 file changed, 27 insertions(+) diff

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

2025-02-16 Thread Aditya Gupta
ved the regions, and export /proc/vmcore, but the vmcore won't have most basic kernel structures hence crash will be unable to analyse the vmcore Signed-off-by: Aditya Gupta --- hw/ppc/pnv_sbe.c | 57 1 file changed, 57 insertions(+) diff --git a/

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

2025-02-16 Thread Aditya Gupta
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 --- hw/ppc/pnv_s

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

2025-02-16 Thread Aditya Gupta
0 interrupt as pause_vcpus + guest_reset See 'stopClocksS0' in SBE source code for more information. Signed-off-by: Aditya Gupta --- hw/ppc/pnv_sbe.c | 50 +++- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/hw/ppc/pnv_sb

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

2025-02-16 Thread Aditya Gupta
ccess relocated OPAL base address to get MDST, MDDT tables. Hence send relocated base address to SBE via 'stash MPIPL config' chip-op. During next IPL SBE will send stashed data to hostboot... so that hostboot can access these data. Signed-off-by: Aditya Gupta --- h

[PATCH 0/7] Implement MPIPL for PowerNV

2025-02-16 Thread Aditya Gupta
ive, which kernel then exports in /proc/vmcore Git Tree for Testing https://github.com/adi-g15-ibm/qemu/tree/fadump-powernv-v1 Known Issues * CPU save area has not been implemented Aditya Gupta (7): hw/ppc: Log S0/S1 Interrupt triggers by OPAL hw/ppc: Implement S0 SBE interrupt as

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

2025-02-16 Thread Aditya Gupta
estination address to where the memory is to be copied. Implement the preserving/copying of the Real Mode Regions and the Parameter Save Area in QEMU Pseries Signed-off-by: Aditya Gupta --- hw/ppc/spapr_rtas.c| 117 - include/hw/ppc/spapr.h | 27 +

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

2025-02-16 Thread Aditya Gupta
strictions on particular order of few registers, and is free to be in any order for other registers. Some registers mentioned in PAPR have not been exported as they are not implemented in QEMU / don't make sense in QEMU. Implement saving of CPU state according to the PAPR documen

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

2025-02-16 Thread Aditya Gupta
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. Signed-off-by: Aditya Gupta --- hw/ppc/spapr_rtas

[PATCH 0/6] Implement Firmware Assisted Dump for PSeries

2025-02-16 Thread Aditya Gupta
all registers with the same value * The implementation doesn't pass all the registers mentioned in PAPR since QEMU doesn't implement them/doesn't need them. The linux kernel uses only 9 of the 45 registers we are passing in QEMU. Aditya Gupta (6): hw/ppc: Implement skelet

[PATCH 6/6] hw/ppc: Enable Fadump for PSeries

2025-02-16 Thread Aditya Gupta
PANIC: "Kernel panic - not syncing: sysrq triggered crash" PID: 270 COMMAND: "sh" TASK: c9e7cc00 [THREAD_INFO: c9e7cc00] CPU: 3 STATE: TASK_RUNNING (PANIC) Signed-off-by: Aditya Gupta --- hw/ppc/spapr

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

2025-02-16 Thread Aditya Gupta
ing reboot (GUEST_RESET in QEMU doesn't clear the memory) Memory regions registered by fadump will be handled in a later patch. Signed-off-by: Aditya Gupta --- hw/ppc/spapr_rtas.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/hw/ppc/sp

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

2025-02-16 Thread Aditya Gupta
ive of whether it's a fadump boot or not, so that kernel can reserve memory to store the firmware provided dump sections in case of a crash Also, in case of a fadump boot, pass the fadump memory structure to the kernel in "ibm,kernel-dump" device tree property. Si

Re: [PATCH v4] hw/ppc: Implement -dtb support for PowerNV

2024-11-03 Thread Aditya Gupta
On 03/11/24 17:04, Nicholas Piggin wrote: On Tue Aug 20, 2024 at 8:30 PM AEST, Aditya Gupta wrote: Currently any device tree passed with -dtb option in QEMU, was ignored by the PowerNV code. Read and pass the passed -dtb to the kernel, thus enabling easier debugging with custom DTBs. The

Re: [PATCH v4] hw/ppc: Implement -dtb support for PowerNV

2024-10-21 Thread Aditya Gupta
Hi all, Just a ping for this. Any comments ? Thanks, Aditya Gupta On 20/08/24 16:00, Aditya Gupta wrote: Currently any device tree passed with -dtb option in QEMU, was ignored by the PowerNV code. Read and pass the passed -dtb to the kernel, thus enabling easier debugging with custom DTBs

Re: [PATCH] typo: Fix description of '--disable-debug-info'

2024-09-23 Thread Aditya Gupta
Hi, Seems there are more confusing option descriptions like: +  printf "%s\n" '  --disable-install-blobs  install provided firmware blobs' ... +  printf "%s\n" '  --disable-coroutine-pool coroutine freelist (better performance)' Should we change t

Re: [RFC PATCH] ppc/spapr: Change printf format to %HWADDR_PRId for MIN_RMA_SLOF

2024-09-23 Thread Aditya Gupta
Hi Philippe, Sorry for the late reply. On 12/09/24 12:34, Philippe Mathieu-Daudé wrote: Hi Aditya, On 12/9/24 08:52, Aditya Gupta wrote: Currently starting a pSeries machine, with lesser than 128MiB shows below error: qemu-system-ppc64: pSeries SLOF firmware requires >= 80ld

[PATCH] typo: Fix description of '--disable-debug-info'

2024-09-22 Thread Aditya Gupta
logic, the description should be 'Disable debug symbols...' instead of 'Enable debug symbols...', Fix the typo by replacing Enable with Disable. Signed-off-by: Aditya Gupta --- scripts/meson-buildoptions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[RFC PATCH] ppc/spapr: Change printf format to %HWADDR_PRId for MIN_RMA_SLOF

2024-09-11 Thread Aditya Gupta
value to use 'HWADDR_PRId', instead of 'HWADDR_PRIx' thus showing decimal value instead of hex. Thus, change the message to below error: qemu-system-ppc64: pSeries SLOF firmware requires >= 128MiB guest RMA (Real Mode Area memory) Signed-off-by: Aditya Gupta --- This is an

Re: [PATCH v6 RESEND 0/5] Power11 support for QEMU [PSeries]

2024-09-02 Thread Aditya Gupta
Hi Amit, On 02/09/24 11:19, Amit Machhiwal wrote: On 2024/07/31 11:20 AM, Aditya Gupta wrote: <...snip...> Git Tree for Testing QEMU: https://github.com/adi-g15-ibm/qemu/tree/p11-v6-pseries Has been tested with following cases: * '-M pseries' / '-M

Re: [PATCH v6 RESEND 0/5] Power11 support for QEMU [PSeries]

2024-08-30 Thread Aditya Gupta
Hi Amit, On 29/08/24 17:49, Amit Machhiwal wrote: Hi Aditya, On 2024/07/31 11:20 AM, Aditya Gupta wrote: Overview Split "Power11 support for QEMU" into 2 patch series: pseries & powernv. This patch series is for pseries support for Power11. As Power11 core is s

Re: [PATCH v6 RESEND 0/5] Power11 support for QEMU [PSeries]

2024-08-20 Thread Aditya Gupta
Hi, Any comments on this ? Thanks, Aditya Gupta On 31/07/24 11:20, Aditya Gupta wrote: Overview Split "Power11 support for QEMU" into 2 patch series: pseries & powernv. This patch series is for pseries support for Power11. As Power11 core is same as Power10,

[PATCH v4] hw/ppc: Implement -dtb support for PowerNV

2024-08-20 Thread Aditya Gupta
' is passed, it completely overrides any dtb nodes or changes QEMU might have done, such as '-append' arguments to the kernel (which are mentioned in /chosen/bootargs in the dtb), hence add warning when -dtb is being used Signed-off-by: Aditya Gupta --- Changelog === v4: + use

Re: [PATCH v3] hw/ppc: Implement -dtb support for PowerNV

2024-08-19 Thread Aditya Gupta
on about CAS, I don't have idea on it, other than the minimum basics. But thanks to you and Cedric, got to know somethings. Thanks, Aditya Gupta The other question... Some machines rebuild fdt at init, others at reset time. As far as I understood, spapr has to rebuild on reset becau

Re: [PATCH v3] hw/ppc: Implement -dtb support for PowerNV

2024-08-19 Thread Aditya Gupta
e little nit is MachineState.fdt vs PnvMachineState.fdt which is now confusing. I would call the new PnvMachineState member something like fdt_from_dtb, or fdt_override? I agree. this is confusing. machine->fdt could be used instead ? Sure, will use it. Thanks, Aditya Gupta The othe

[PATCH v3] hw/ppc: Implement -dtb support for PowerNV

2024-08-13 Thread Aditya Gupta
' is passed, it completely overrides any dtb nodes or changes QEMU might have done, such as '-append' arguments to the kernel (which are mentioned in /chosen/bootargs in the dtb), hence add warning when -dtb is being used Signed-off-by: Aditya Gupta --- Changelog === v3: + use

Re: [PATCH v2] hw/ppc: Implement -dtb support for PowerNV

2024-08-07 Thread Aditya Gupta
Hi Cedric, Sorry for the late reply. On 01/08/24 15:22, Cédric Le Goater wrote: On 8/1/24 10:51, Aditya Gupta wrote: Currently any device tree passed with -dtb option in QEMU, was ignored by the PowerNV code. Read and pass the passed -dtb to the kernel, thus enabling easier debugging with

[PATCH v2] hw/ppc: Implement -dtb support for PowerNV

2024-08-01 Thread Aditya Gupta
' is passed, it completely overrides any dtb nodes or changes QEMU might have done, such as '-append' arguments to the kernel (which are mentioned in /chosen/bootargs in the dtb), hence add warning when -dtb is being used Signed-off-by: Aditya Gupta --- Changelog === v2: + m

Re: [PATCH] hw/ppc: Implement -dtb support for PowerNV

2024-08-01 Thread Aditya Gupta
27;", machine->dtb); +    exit(1); +    } We should try to report such errors earlier than in reset. Thanks, I will remember this from next time. Can you please introduce a PnvMachineState::dtb attribute and initialize it in pnv_init() after ->initrd_filename. Sure, I w

[PATCH] hw/ppc: Implement -dtb support for PowerNV

2024-07-31 Thread Aditya Gupta
' is passed, it completely overrides any dtb nodes or changes QEMU might have done, such as '-append' arguments to the kernel (which are mentioned in /chosen/bootargs in the dtb), hence add warning when -dtb is being used Signed-off-by: Aditya Gupta --- Changelog === v1: + use

Re: [RFC PATCH] hw/ppc: Implement -dtb support for PowerNV

2024-07-31 Thread Aditya Gupta
Hi Cedric, On 24/07/31 04:43PM, Cédric Le Goater wrote: > Hello Aditya, > > On 7/31/24 15:22, Aditya Gupta wrote: > > Currently any device tree passed with -dtb option in QEMU, was ignored > > by the PowerNV code. > > > > Read and pass the passed -dtb to

Re: [RFC PATCH] hw/ppc: Implement -dtb support for PowerNV

2024-07-31 Thread Aditya Gupta
Hi Daniel, Thank you for the review. On 24/07/31 02:34PM, Daniel P. Berrangé wrote: > On Wed, Jul 31, 2024 at 06:52:35PM +0530, Aditya Gupta wrote: > > Currently any device tree passed with -dtb option in QEMU, was ignored > > by the PowerNV code. > > > > Read and

[RFC PATCH] hw/ppc: Implement -dtb support for PowerNV

2024-07-31 Thread Aditya Gupta
' is passed, it completely overrides any dtb nodes or changes QEMU might have done, such as '-append' arguments to the kernel (which are mentioned in /chosen/bootargs in the dtb), hence add warning when -dtb is being used Signed-off-by: Aditya Gupta --- This is an RFC patch, an

[PATCH v6 RESEND 0/5] Power11 support for QEMU [PSeries]

2024-07-30 Thread Aditya Gupta
reduce code duplication by reusing power10 code + make power11 as default + rebase on qemu upstream/master + add more information in commit descriptions + update docs + update skiboot.lid Aditya Gupta (4): target/ppc: Introduce 'PowerPCCPUClass::spapr_logical_pvr' target/ppc

[PATCH v6 RESEND 1/5] target/ppc: Reduce code duplication across Power9/10 init code

2024-07-30 Thread Aditya Gupta
added. Remove the duplicate code and share using common macros. Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora [adityag: renamed many POWERPC_* flags to PPC_* flags, checkpatch fixes] Signed-off-by: Aditya Gupta --- target/ppc/cpu_init.c | 124

[PATCH v6 RESEND 5/5] ppc/pseries: Add Power11 cpu type

2024-07-30 Thread Aditya Gupta
-off-by: Aditya Gupta --- docs/system/ppc/pseries.rst | 17 + hw/ppc/spapr_cpu_core.c | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/system/ppc/pseries.rst b/docs/system/ppc/pseries.rst index a876d897b6e4..bbc51aa7fcdb 100644 --- a/docs/system/ppc

[PATCH v6 RESEND 2/5] target/ppc: Introduce 'PowerPCCPUClass::spapr_logical_pvr'

2024-07-30 Thread Aditya Gupta
egressions with compat-mode. Cc: Cédric Le Goater Cc: Daniel Henrique Barboza Cc: Harsh Prateek Bora Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/cpu.h | 1 + target/ppc/cpu_init.c | 4 +++

[PATCH v6 RESEND 4/5] target/ppc: Add Power11 DD2.0 processor

2024-07-30 Thread Aditya Gupta
Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/compat.c | 7 + target/ppc/cpu-models.c | 3 ++ target/ppc/cpu-models.h | 3 ++ target/ppc/cpu.h | 2 ++ target/ppc/cpu_init.c| 60 target/ppc

[PATCH v6 RESEND 3/5] target/ppc: Fix regression due to Power10 and Power11 having same PCR

2024-07-30 Thread Aditya Gupta
Bora Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/compat.c | 4 1 file changed, 4 insertions(+) diff --git a/target/ppc/compat.c b/target/ppc/compat.c index ebef2cccecf3..5b20fd7ef04c 100644 -

[PATCH v6 1/5] target/ppc: Reduce code duplication across Power9/10 init code

2024-07-30 Thread Aditya Gupta
added. Remove the duplicate code and share using common macros. Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora [PMM: renamed many POWERPC_* flags to PPC_* flags, checkpatch fixes] Signed-off-by: Aditya Gupta --- target/ppc/cpu_init.c | 124

[PATCH v6 3/5] target/ppc: Fix regression due to Power10 and Power11 having same PCR

2024-07-30 Thread Aditya Gupta
Bora Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/compat.c | 4 1 file changed, 4 insertions(+) diff --git a/target/ppc/compat.c b/target/ppc/compat.c index ebef2cccecf3..5b20fd7ef04c 100644 -

[PATCH v6 5/5] ppc/pseries: Add Power11 cpu type

2024-07-30 Thread Aditya Gupta
-off-by: Aditya Gupta --- docs/system/ppc/pseries.rst | 17 + hw/ppc/spapr_cpu_core.c | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/system/ppc/pseries.rst b/docs/system/ppc/pseries.rst index a876d897b6e4..bbc51aa7fcdb 100644 --- a/docs/system/ppc

[PATCH v6 4/5] target/ppc: Add Power11 DD2.0 processor

2024-07-30 Thread Aditya Gupta
Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/compat.c | 7 + target/ppc/cpu-models.c | 3 ++ target/ppc/cpu-models.h | 3 ++ target/ppc/cpu.h | 2 ++ target/ppc/cpu_init.c| 60 target/ppc

[PATCH v6 2/5] target/ppc: Introduce 'PowerPCCPUClass::spapr_logical_pvr'

2024-07-30 Thread Aditya Gupta
egressions with compat-mode. Cc: Cédric Le Goater Cc: Daniel Henrique Barboza Cc: Harsh Prateek Bora Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/cpu.h | 1 + target/ppc/cpu_init.c | 4 +++

[PATCH v6 0/5] Power11 support for QEMU [PSeries]

2024-07-30 Thread Aditya Gupta
default + rebase on qemu upstream/master + add more information in commit descriptions + update docs + update skiboot.lid Aditya Gupta (4): target/ppc: Introduce 'PowerPCCPUClass::spapr_logical_pvr' target/ppc: Fix regression due to Power10 and Power11 having same PCR target/ppc

Re: [PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-07-24 Thread Aditya Gupta
e used in header files like this to make up some complex flags. In above case, `PPC_INSNS_FLAGS_POWER9` and `PPC_INSNS_BASE` seem somewhat similar to me, but are very different considering the values. What do you think ? - Aditya Gupta On 23/07/24 10:52, Nicholas Piggin wrote: On Thu J

Re: [PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-07-23 Thread Aditya Gupta
C_FLAGS_COMMON \ POWERPC_FLAG_POWER9 Can we keep PPC_FLAG_POWER9 here ? Like if all PowerPC flags start with PPC_* ? Thanks, Aditya Gupta +POWERPC_FLAG_VRE | POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ +POWERPC_FLAG_PMM | POWERP

Re: [PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-07-23 Thread Aditya Gupta
Hi Harsh, Is it okay if I do, the changes in your patch ? Thanks, Aditya Gupta On 23/07/24 10:52, Nicholas Piggin wrote: On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: From: Harsh Prateek Bora Power9/10 initialization code consists of a lot of logical OR of various flag bits

Re: [PATCH v5 4/5] target/ppc: Introduce 'PowerPCCPUClass::logical_pvr'

2024-07-22 Thread Aditya Gupta
On 23/07/24 10:43, Nicholas Piggin wrote: On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: Introduce 'PnvChipClass::logical_pvr' to know corresponding logical PVR of a PowerPC CPU. This helps to have a one-to-one mapping between PVR and logical PVR for a CPU, and used

Re: [PATCH v5 5/5] target/ppc: Fix regression due to Power10 and Power11 having same PCR

2024-07-22 Thread Aditya Gupta
On 23/07/24 10:28, Nicholas Piggin wrote: On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: Power11 has the same PCR (Processor Compatibility Register) value, as Power10. Due to this, QEMU considers Power11 as a valid compat-mode for Power10, ie. earlier it was possible to run QEMU

Re: [PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-07-22 Thread Aditya Gupta
On 23/07/24 09:51, Nicholas Piggin wrote: On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: From: Harsh Prateek Bora Power9/10 initialization code consists of a lot of logical OR of various flag bits as supported by respective Power platform during its initialization, most of which

Re: [PATCH v5 2/5] target/ppc: Add Power11 DD2.0 processor

2024-07-22 Thread Aditya Gupta
e in bike shed painting. The functionality of the patch looks okay. I am okay if you want to do it, or i can do it in a separate follow up patch. Reviewed-by: Nicholas Piggin Thanks for the tag Nick ! - Aditya Gupta + +pcc->lpcr_pm = LPCR_PDEE | LPCR_HDEE | LPCR_EEE |

Re: [PATCH] ppc/pnv: Update Power10's cfam id to use Power10 DD2

2024-07-22 Thread Aditya Gupta
Hi Nick, On 23/07/24 09:48, Nicholas Piggin wrote: On Mon Jul 22, 2024 at 7:17 PM AEST, Aditya Gupta wrote: Hello, Any comments on this change ? Though this isn't urgent and won't change behaviour much, mainly other than skiboot recognising the chip as P10 DD2. Hey Aditya, Yea

Re: [PATCH] ppc/pnv: Update Power10's cfam id to use Power10 DD2

2024-07-22 Thread Aditya Gupta
Hello, Any comments on this change ? Though this isn't urgent and won't change behaviour much, mainly other than skiboot recognising the chip as P10 DD2. Thanks - Aditya Gupta On 02/05/24 13:51, Cédric Le Goater wrote: On 5/2/24 08:27, Aditya Gupta wrote: Power10 DD1.0 was

Re: [PATCH v5 0/5] Power11 support for QEMU [PSeries]

2024-07-22 Thread Aditya Gupta
Any comments on this ? This series is containing only the pseries support for Power11, hence independent of skiboot patches. powernv is on hold till skiboot changes are released. Thanks, Aditya Gupta On 06/06/24 17:46, Aditya Gupta wrote: Overview Split "Power11 su

Re: [PATCH v5 0/5] Power11 support for QEMU [PSeries]

2024-06-06 Thread Aditya Gupta
11's instance_init. Also, I have applied Harsh's patch that should simplify the rest of the patches. Thanks, Aditya Gupta On 06/06/24 17:46, Aditya Gupta wrote: Overview Split "Power11 support for QEMU" into 2 patch series: pseries & powernv. This

[PATCH v5 2/5] target/ppc: Add Power11 DD2.0 processor

2024-06-06 Thread Aditya Gupta
Piggin Signed-off-by: Aditya Gupta --- target/ppc/compat.c | 7 ++ target/ppc/cpu-models.c | 3 +++ target/ppc/cpu-models.h | 3 +++ target/ppc/cpu_init.c | 54 + 4 files changed, 67 insertions(+) diff --git a/target/ppc/compat.c b/target/ppc

[PATCH v5 4/5] target/ppc: Introduce 'PowerPCCPUClass::logical_pvr'

2024-06-06 Thread Aditya Gupta
sions with compat-mode. Cc: Cédric Le Goater Cc: Daniel Henrique Barboza Cc: Harsh Prateek Bora Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/cpu.h | 1 + target/ppc/cpu_init.c | 5 + 2 files changed, 6 insertions(+) di

[PATCH v5 0/5] Power11 support for QEMU [PSeries]

2024-06-06 Thread Aditya Gupta
+ make power11 as default + rebase on qemu upstream/master + add more information in commit descriptions + update docs + update skiboot.lid Aditya Gupta (4): target/ppc: Add Power11 DD2.0 processor ppc/pseries: Add Power11 cpu type target/ppc: Introduce 'PowerPCCPUClass::logi

[PATCH v5 3/5] ppc/pseries: Add Power11 cpu type

2024-06-06 Thread Aditya Gupta
Piggin Reviewed-by: Harsh Prateek Bora Signed-off-by: Aditya Gupta --- docs/system/ppc/pseries.rst | 17 + hw/ppc/spapr_cpu_core.c | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/system/ppc/pseries.rst b/docs/system/ppc/pseries.rst index

[PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-06-06 Thread Aditya Gupta
From: Harsh Prateek Bora Power9/10 initialization code consists of a lot of logical OR of various flag bits as supported by respective Power platform during its initialization, most of which is duplicated and only selected bits are added or removed as needed with each new platform support being a

[PATCH v5 5/5] target/ppc: Fix regression due to Power10 and Power11 having same PCR

2024-06-06 Thread Aditya Gupta
Bora Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/compat.c | 4 1 file changed, 4 insertions(+) diff --git a/target/ppc/compat.c b/target/ppc/compat.c index 12dd8ae290ca..168a3c06316f 100644 --- a/target/ppc/compat.c +++ b

Re: [PATCH v4 11/11] ppc/pnv: Update skiboot.lid to support Power11

2024-05-30 Thread Aditya Gupta
Hello Nick, On Wed, May 29, 2024 at 10:16:58AM GMT, Nicholas Piggin wrote: > On Tue May 28, 2024 at 5:15 PM AEST, Cédric Le Goater wrote: > > On 5/28/24 09:05, Aditya Gupta wrote: > > > Skiboot/OPAL patches are in discussion upstream [1], with corresponding > > > comm

Re: [PATCH v4 01/11] ppc: Add Power11 DD2.0 processor

2024-05-29 Thread Aditya Gupta
Hello Harsh, On Thu, May 30, 2024 at 10:57:31AM GMT, Harsh Prateek Bora wrote: > Hi Aditya, > > On 5/28/24 12:35, Aditya Gupta wrote: > > Add CPU target code to add support for new Power11 Processor. > > > > Power11 core is same as Power10, hence reuse functi

Re: [PATCH v4 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-29 Thread Aditya Gupta
Hello Cedric, Thanks for your reviews. On Tue, May 28, 2024 at 09:40:12AM GMT, Cédric Le Goater wrote: > Hello Aditya > > On 5/28/24 09:05, Aditya Gupta wrote: > > Power11 core is same as Power10, use the existing functionalities to > > introduce a Power11 chip and machine,

Re: [PATCH v4 11/11] ppc/pnv: Update skiboot.lid to support Power11

2024-05-29 Thread Aditya Gupta
Hello Cedric, On Tue, May 28, 2024 at 09:15:29AM GMT, Cédric Le Goater wrote: > On 5/28/24 09:05, Aditya Gupta wrote: > > Skiboot/OPAL patches are in discussion upstream [1], with corresponding > > commits in github repository [2]. > > > > Update skiboot.

[PATCH v4 10/11] ppc/pnv: Add SBE model for Power11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10, reuse PNV10_SBER initialisation, by declaring PNV11_PSI as child class of PNV10_PSI Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta

[PATCH v4 02/11] ppc/pseries: Add Power11 cpu type

2024-05-28 Thread Aditya Gupta
: Aditya Gupta --- docs/system/ppc/pseries.rst | 6 +++--- hw/ppc/spapr_cpu_core.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/system/ppc/pseries.rst b/docs/system/ppc/pseries.rst index a876d897b6e4..3277564b34c2 100644 --- a/docs/system/ppc/pseries.rst +++ b/docs

[PATCH v4 04/11] target/ppc: Fix regression due to Power10 and Power11 having same PCR

2024-05-28 Thread Aditya Gupta
onkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Aditya Gupta --- Multiple alternative approaches were tried to fix this: 1. New PCR for Power11: No 2. 'Hacky fix': chose (n-1) entry in compat table in case of Power10. Commit: ht

[PATCH v4 09/11] ppc/pnv: Add a PSI bridge model for Power11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10, reuse PNV10_PSI initialisation, by declaring 'PNV11_PSI' as child class of 'PNV10_PSI' Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-

[PATCH v4 08/11] ppc/pnv: Add OCC for Power11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10, reuse PNV10_OCC initialisation, by declaring `PNV11_OCC` as child class of `PNV10_OCC` Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta

[PATCH v4 00/11] Power11 support for QEMU

2024-05-28 Thread Aditya Gupta
stream/master + add more information in commit descriptions + update docs + update skiboot.lid Aditya Gupta (11): ppc: Add Power11 DD2.0 processor ppc/pseries: Add Power11 cpu type target/ppc: Introduce 'PowerPCCPUClass::logical_pvr' target/ppc: Fix regression due to Powe

[PATCH v4 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-28 Thread Aditya Gupta
: Nicholas Piggin Signed-off-by: Aditya Gupta --- docs/system/ppc/powernv.rst | 9 +-- hw/ppc/pnv.c| 120 ++-- hw/ppc/pnv_core.c | 11 include/hw/ppc/pnv.h| 5 ++ include/hw/ppc/pnv_chip.h | 7 +++ include/hw/ppc/pnv_core.h

[PATCH v4 06/11] ppc/pnv: Add HOMER for POWER11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10, declare PNV11_HOMER as a child class of PNV10_HOMER, so it goes through same class init Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta

[PATCH v4 07/11] ppc/pnv: Add a LPC controller for POWER11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10 core, declare PNV11_LPC as a child class of PNV10_LPC, so it goes through same class init Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta

[PATCH v4 03/11] target/ppc: Introduce 'PowerPCCPUClass::logical_pvr'

2024-05-28 Thread Aditya Gupta
sions with compat-mode. Cc: Cédric Le Goater Cc: Daniel Henrique Barboza Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/cpu.h | 1 + target/ppc/cpu_init.c | 5 + 2 files changed, 6 insertions(+) diff --git a/target/ppc/cpu.

[PATCH v4 01/11] ppc: Add Power11 DD2.0 processor

2024-05-28 Thread Aditya Gupta
: Aditya Gupta --- target/ppc/compat.c | 7 +++ target/ppc/cpu-models.c | 3 ++ target/ppc/cpu-models.h | 3 ++ target/ppc/cpu_init.c | 102 4 files changed, 115 insertions(+) diff --git a/target/ppc/compat.c b/target/ppc/compat.c index

Re: [PATCH v3 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-27 Thread Aditya Gupta
On Mon, May 27, 2024 at 05:15:05PM GMT, Cédric Le Goater wrote: > On 5/27/24 09:10, Aditya Gupta wrote: > > Power11 core is same as Power10, use the existing functionalities to > > introduce a Power11 chip and machine, with Power10 chip as parent of > > Power11 chip, thus

[PATCH v3 10/11] ppc/pnv: Add SBE model for Power11

2024-05-27 Thread Aditya Gupta
Power11 core is same as Power10, reuse PNV10_SBER initialisation, by declaring PNV11_PSI as child class of PNV10_PSI Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta

[PATCH v3 08/11] ppc/pnv: Add OCC for Power11

2024-05-27 Thread Aditya Gupta
Power11 core is same as Power10, reuse PNV10_OCC initialisation, by declaring `PNV11_OCC` as child class of `PNV10_OCC` Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta

[PATCH v3 00/11] Power11 support for QEMU

2024-05-27 Thread Aditya Gupta
- remove commit to make Power11 as default v2: + split powernv patch into homer,lpc,occ,psi,sbe + reduce code duplication by reusing power10 code + make power11 as default + rebase on qemu upstream/master + add more information in commit descriptions + update docs + update sk

[PATCH v3 04/11] target/ppc: Fix regression due to Power10 and Power11 having same PCR

2024-05-27 Thread Aditya Gupta
onkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Aditya Gupta --- Multiple alternative approaches were tried to fix this: 1. New PCR for Power11: No 2. 'Hacky fix': chose (n-1) entry in compat table in case of Power10. Commit: ht

[PATCH v3 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-27 Thread Aditya Gupta
: Nicholas Piggin Signed-off-by: Aditya Gupta --- docs/system/ppc/powernv.rst | 9 +-- hw/ppc/pnv.c| 119 ++-- hw/ppc/pnv_core.c | 11 include/hw/ppc/pnv.h| 5 ++ include/hw/ppc/pnv_chip.h | 7 +++ include/hw/ppc/pnv_core.h

[PATCH v3 09/11] ppc/pnv: Add a PSI bridge model for Power11

2024-05-27 Thread Aditya Gupta
Power11 core is same as Power10, reuse PNV10_PSI initialisation, by declaring 'PNV11_PSI' as child class of 'PNV10_PSI' Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-

[PATCH v3 01/11] ppc: Add Power11 DD2.0 processor

2024-05-27 Thread Aditya Gupta
: Aditya Gupta --- target/ppc/compat.c | 7 +++ target/ppc/cpu-models.c | 3 ++ target/ppc/cpu-models.h | 3 ++ target/ppc/cpu_init.c | 102 4 files changed, 115 insertions(+) diff --git a/target/ppc/compat.c b/target/ppc/compat.c index

[PATCH v3 03/11] target/ppc: Introduce 'PowerPCCPUClass::logical_pvr'

2024-05-27 Thread Aditya Gupta
sions with compat-mode. Cc: Cédric Le Goater Cc: Daniel Henrique Barboza Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Aditya Gupta --- target/ppc/cpu.h | 1 + target/ppc/cpu_init.c | 5 + 2 files changed, 6 insertions(+) diff --git a/target/ppc/cpu.

[PATCH v3 07/11] ppc/pnv: Add a LPC controller for POWER11

2024-05-27 Thread Aditya Gupta
Power11 core is same as Power10 core, declare PNV11_LPC as a child class of PNV10_LPC, so it goes through same class init Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta

[PATCH v3 06/11] ppc/pnv: Add HOMER for POWER11

2024-05-27 Thread Aditya Gupta
Power11 core is same as Power10, declare PNV11_HOMER as a child class of PNV10_HOMER, so it goes through same class init Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta

[PATCH v3 02/11] ppc/pseries: Add Power11 cpu type

2024-05-27 Thread Aditya Gupta
: Aditya Gupta --- docs/system/ppc/pseries.rst | 6 +++--- hw/ppc/spapr_cpu_core.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/system/ppc/pseries.rst b/docs/system/ppc/pseries.rst index a876d897b6e4..3277564b34c2 100644 --- a/docs/system/ppc/pseries.rst +++ b/docs

Re: PCIE Memory Information

2024-05-05 Thread Aditya Gupta
e(&address_space_memory, ADI_REGION_BASE, &xlat, &l, false, MEMTXATTRS_UNSPECIFIED); or +    cpu_physical_memory_read(ADI_REGION_BASE, &val, 4); 1st should return your MemoryRegion, and second one should call your .read callback. Thanks, Aditya Gupta

Re: [PATCH v2 09/10] ppc: Make Power11 as default cpu type for 'pseries' and 'powernv'

2024-05-03 Thread Aditya Gupta
On 03/05/24 10:22, Nicholas Piggin wrote: On Sat Apr 27, 2024 at 12:32 AM AEST, Cédric Le Goater wrote: On 4/26/24 13:00, Aditya Gupta wrote: Make Power11 as default cpu type for 'pseries' and 'powernv' machine type, with Power11 being the newest supported Power process

[PATCH] ppc/pnv: Update Power10's cfam id to use Power10 DD2

2024-05-01 Thread Aditya Gupta
: Nicholas Piggin Cc: Paolo Bonzini Cc: Thomas Huth Signed-off-by: Aditya Gupta --- hw/ppc/pnv.c| 2 +- tests/qtest/pnv-xscom.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 6e3a5ccdec76..06a4e4d13948 100644 --- a/hw/ppc/pnv.

Re: [PATCH v2 01/10] ppc/pseries: Add Power11 cpu type

2024-05-01 Thread Aditya Gupta
parate patch ? Thanks, Aditya Gupta Thanks, - Aditya Gupta C.

Re: [PATCH v2 09/10] ppc: Make Power11 as default cpu type for 'pseries' and 'powernv'

2024-05-01 Thread Aditya Gupta
Hello David, On 29/04/24 07:14, David Gibson wrote: On Fri, Apr 26, 2024 at 04:32:18PM +0200, Cédric le Goater wrote: On 4/26/24 13:00, Aditya Gupta wrote: Make Power11 as default cpu type for 'pseries' and 'powernv' machine type, with Power11 being the newest supporte

Re: [PATCH v2 03/10] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-01 Thread Aditya Gupta
pass type_name as "power11" vs "power10". Do the Power11 and Power10 processors have the same XSCOM and MMIO address spaces ? Yes. Hence using the same base and sizes. Thanks, Aditya Gupta Will do it. pnv_xscom_add_subregion(chip, PNV10_XSCOM_EQ_BASE(eq->quad_id), @

Re: [PATCH v2 01/10] ppc/pseries: Add Power11 cpu type

2024-05-01 Thread Aditya Gupta
v3. Skiboot reports : [    0.121234172,6] P11 DD1.00 detected It is a DD2.0, with major revision = 0x2, and minor revision = 0. Might need some change in skiboot. Will post a v3 series with changes. Thanks, - Aditya Gupta C.

Re: [PATCH v2 01/10] ppc/pseries: Add Power11 cpu type

2024-04-26 Thread Aditya Gupta
e that 'chipTOD' was added in commit 9a69950feb098. I2C mentions > > yet to merge, is it merged yet ? > > yes. Thanks for confirming Cédric ! - Aditya Gupta > > > > > I will check whether this needs updating, but might do it in a separate > > patch than this series. > > Thanks, > >

Re: [PATCH v2 10/10] ppc/pnv: Update skiboot.lid to support Power11

2024-04-26 Thread Aditya Gupta
On Fri, Apr 26, 2024 at 04:38:13PM +0200, Cédric Le Goater wrote: > On 4/26/24 13:00, Aditya Gupta wrote: > > Skiboot/OPAL patches are in discussion upstream [1], with corresponding > > commits in github repository [2]. > > > > Update skiboot.lid, with binary built fro

  1   2   >