#
d41ccf6e |
| 04-May-2022 |
Víctor Colombo <victor.colombo@eldorado.org.br> |
target/ppc: Remove msr_pr macro
msr_pr macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter.
Suggested-by: Rich
target/ppc: Remove msr_pr macro
msr_pr macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter.
Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220504210541.115256-4-victor.colombo@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
show more ...
|
#
4e610064 |
| 11-Apr-2022 |
Frederic Barrat <fbarrat@linux.ibm.com> |
target/ppc: Add two missing register callbacks on POWER10
This patch adds tcg accessors for 2 SPRs which were missing on P10:
- the TBU40 register is used to write the upper 40 bits of the timebase
target/ppc: Add two missing register callbacks on POWER10
This patch adds tcg accessors for 2 SPRs which were missing on P10:
- the TBU40 register is used to write the upper 40 bits of the timebase register. It is used by kvm to update the timebase when entering/exiting the guest on P9 and above. The missing definition was causing erratic decrementer interrupts in a pseries/kvm guest running in a powernv10/tcg host, typically resulting in hangs.
- the missing DPDES SPR was found through code inspection. It exists unchanged on P10.
Both existed on previous versions of the processor and a bit of git archaeology hints that they were added while the P10 model was already being worked on so they may have simply fallen through the cracks.
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com> Message-Id: <20220411125900.352028-1-fbarrat@linux.ibm.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
show more ...
|
#
ee3eb3a7 |
| 23-Mar-2022 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
Replace TARGET_WORDS_BIGENDIAN
Convert the TARGET_WORDS_BIGENDIAN macro, similarly to what was done with HOST_BIG_ENDIAN. The new TARGET_BIG_ENDIAN macro is either 0 or 1, and thus should always be
Replace TARGET_WORDS_BIGENDIAN
Convert the TARGET_WORDS_BIGENDIAN macro, similarly to what was done with HOST_BIG_ENDIAN. The new TARGET_BIG_ENDIAN macro is either 0 or 1, and thus should always be defined to prevent misuse.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Suggested-by: Halil Pasic <pasic@linux.ibm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220323155743.1585078-8-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
cb76bbc4 |
| 02-Mar-2022 |
Daniel Henrique Barboza <danielhb413@gmail.com> |
target/ppc: add PPC_INTERRUPT_EBB and EBB exceptions
PPC_INTERRUPT_EBB is a new interrupt that will be used to deliver EBB exceptions that had to be postponed because the thread wasn't in problem st
target/ppc: add PPC_INTERRUPT_EBB and EBB exceptions
PPC_INTERRUPT_EBB is a new interrupt that will be used to deliver EBB exceptions that had to be postponed because the thread wasn't in problem state at the time the event-based branch was supposed to occur.
ISA 3.1 also defines two EBB exceptions: Performance Monitor EBB exception and External EBB exception. They are being added as POWERPC_EXCP_PERFM_EBB and POWERPC_EXCP_EXTERNAL_EBB.
PPC_INTERRUPT_EBB will check BESCR bits to see the EBB type that occurred and trigger the appropriate exception. Both exceptions are doing the same thing in this first implementation: clear BESCR_GE and enter the branch with env->nip retrieved from SPR_EBBHR.
The checks being done by the interrupt code are msr_pr and BESCR_GE states. All other checks (EBB facility check, BESCR_PME bit, specific bits related to the event type) must be done beforehand.
Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220225101140.1054160-4-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
33edcde7 |
| 02-Mar-2022 |
Daniel Henrique Barboza <danielhb413@gmail.com> |
target/ppc: make power8-pmu.c CONFIG_TCG only
This is an exclusive TCG helper. Gating it with CONFIG_TCG and changing meson.build accordingly will prevent problems --disable-tcg and --disable-linux-
target/ppc: make power8-pmu.c CONFIG_TCG only
This is an exclusive TCG helper. Gating it with CONFIG_TCG and changing meson.build accordingly will prevent problems --disable-tcg and --disable-linux-user later on.
We're also changing the uses of !kvm_enabled() to tcg_enabled() to avoid adding "defined(CONFIG_TCG)" ifdefs, since tcg_enabled() will be defaulted to false with --disable-tcg and the block will always be skipped.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220225101140.1054160-2-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
65e0446c |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: Move common SPR functions out of cpu_init
Let's leave cpu_init with just generic CPU initialization and QOM-related functions.
The rest of the SPR registration functions will be moved i
target/ppc: Move common SPR functions out of cpu_init
Let's leave cpu_init with just generic CPU initialization and QOM-related functions.
The rest of the SPR registration functions will be moved in the following patches along with the code that uses them. These are only the commonly used ones.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-28-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
b58fd0c3 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Move check_pow and QOM macros to a header
These will need to be accessed from other files once we move the CPUs code to separate files.
The check_pow_hid0 and check_pow_hid0_7
target/ppc: cpu_init: Move check_pow and QOM macros to a header
These will need to be accessed from other files once we move the CPUs code to separate files.
The check_pow_hid0 and check_pow_hid0_74xx are too specific to be moved to a header so I'll deal with them later when splitting this code between the multiple CPU families.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-27-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
565873b3 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Move SPR registration macros to a header
Put the SPR registration macros in a header that is accessible outside of cpu_init.c. The following patches will move CPU-specific code
target/ppc: cpu_init: Move SPR registration macros to a header
Put the SPR registration macros in a header that is accessible outside of cpu_init.c. The following patches will move CPU-specific code to separate files and will need to access it.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-26-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
917ea438 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Expose some SPR registration helpers
The following patches will move CPU-specific code into separate files, so expose the most used SPR registration functions:
register_sdr1_s
target/ppc: cpu_init: Expose some SPR registration helpers
The following patches will move CPU-specific code into separate files, so expose the most used SPR registration functions:
register_sdr1_sprs | 22 callers register_low_BATs | 20 callers register_non_embedded_sprs | 19 callers register_high_BATs | 10 callers register_thrm_sprs | 8 callers register_usprgh_sprs | 6 callers register_6xx_7xx_soft_tlb | only 3 callers, but it helps to keep the soft TLB code consistent.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-25-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
99e964ef |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: Rename spr_tcg.h to spr_common.h
Initial intent for the spr_tcg header was to expose the spr_read|write callbacks that are only used by TCG code. However, although these routines are TCG
target/ppc: Rename spr_tcg.h to spr_common.h
Initial intent for the spr_tcg header was to expose the spr_read|write callbacks that are only used by TCG code. However, although these routines are TCG-specific, the KVM code needs access to env->sprs which creation is currently coupled to the callback registration.
We are probably not going to decouple SPR creation and TCG callback registration any time soon, so let's rename the header to spr_common to accomodate the register_*_sprs functions that will be moved out of cpu_init.c in the following patches.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-24-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
2a48d83d |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Remove register_usprg3_sprs
This function registers just one SPR and has only two callers, so open code it.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: D
target/ppc: cpu_init: Remove register_usprg3_sprs
This function registers just one SPR and has only two callers, so open code it.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-23-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
217781af |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Rename register_ne_601_sprs
The important part of this function is that it applies to non-embedded CPUs, not that it also applies to the 601. We removed support for the 601 any
target/ppc: cpu_init: Rename register_ne_601_sprs
The important part of this function is that it applies to non-embedded CPUs, not that it also applies to the 601. We removed support for the 601 anyway, so rename this function.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-22-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
c1f21577 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Reuse init_proc_745 for the 755
The init_proc_755 function is identical to the 745 one except for the 755-specific registers. I think it is worth it to make them share code.
S
target/ppc: cpu_init: Reuse init_proc_745 for the 755
The init_proc_755 function is identical to the 745 one except for the 755-specific registers. I think it is worth it to make them share code.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-21-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
0df0ca16 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Reuse init_proc_604 for the 604e
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.188592
target/ppc: cpu_init: Reuse init_proc_604 for the 604e
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-20-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
9f33f3d8 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Reuse init_proc_603 for the e300
init_proc_603 is defined after init_proc_e300, so I had to move some code around to make it work.
Signed-off-by: Fabiano Rosas <farosas@linux.
target/ppc: cpu_init: Reuse init_proc_603 for the e300
init_proc_603 is defined after init_proc_e300, so I had to move some code around to make it work.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-19-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
3b18ec76 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Move 604e SPR registration into a function
This is done to improve init_proc readability and to make subsequent patches that touch this code a bit cleaner.
Signed-off-by: Fabi
target/ppc: cpu_init: Move 604e SPR registration into a function
This is done to improve init_proc readability and to make subsequent patches that touch this code a bit cleaner.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-18-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
a3a27674 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Move e300 SPR registration into a function
This is done to improve init_proc readability and to make subsequent patches that touch this code a bit cleaner.
Signed-off-by: Fabi
target/ppc: cpu_init: Move e300 SPR registration into a function
This is done to improve init_proc readability and to make subsequent patches that touch this code a bit cleaner.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-17-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
28930245 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Move 755 L2 cache SPRs into a function
This is just to have 755-specific registers contained into a function, intead of leaving them open-coded in init_proc_755. It makes init_
target/ppc: cpu_init: Move 755 L2 cache SPRs into a function
This is just to have 755-specific registers contained into a function, intead of leaving them open-coded in init_proc_755. It makes init_proc easier to read and keeps later patches that touch this code a bit cleaner.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-16-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
0301b39c |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Deduplicate 7xx SPR registration
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.188592
target/ppc: cpu_init: Deduplicate 7xx SPR registration
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-15-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
a5d1120b |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Deduplicate 745/755 SPR registration
The 745 and 755 can share the HID registration, so move it all into register_755_sprs, which applies for both CPUs.
Also rename that funct
target/ppc: cpu_init: Deduplicate 745/755 SPR registration
The 745 and 755 can share the HID registration, so move it all into register_755_sprs, which applies for both CPUs.
Also rename that function to register_745_sprs, since the 745 is the earliest of the two. This will help with separating 755-specific registers in a subsequent patch.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-14-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
20f6fb99 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Deduplicate 604 SPR registration
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.188592
target/ppc: cpu_init: Deduplicate 604 SPR registration
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-13-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
d2b29d0a |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Deduplicate 603 SPR registration
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.188592
target/ppc: cpu_init: Deduplicate 603 SPR registration
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-12-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
49ed82b2 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Deduplicate 440 SPR registration
Move some of the 440 registers that are being repeated in the 440* CPUs to register_440_sprs.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.
target/ppc: cpu_init: Deduplicate 440 SPR registration
Move some of the 440 registers that are being repeated in the 440* CPUs to register_440_sprs.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-11-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
674f4509 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Decouple 74xx SPR registration from 7xx
We're considering these two to be from different CPU families, so duplicate some code to keep them separate.
Signed-off-by: Fabiano Ros
target/ppc: cpu_init: Decouple 74xx SPR registration from 7xx
We're considering these two to be from different CPU families, so duplicate some code to keep them separate.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-10-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
#
1a71c5d1 |
| 18-Feb-2022 |
Fabiano Rosas <farosas@linux.ibm.com> |
target/ppc: cpu_init: Decouple G2 SPR registration from 755
We're considering these two to be in different CPU families (6xx and 7xx), so keep their SPR registration separate.
The code was copied i
target/ppc: cpu_init: Decouple G2 SPR registration from 755
We're considering these two to be in different CPU families (6xx and 7xx), so keep their SPR registration separate.
The code was copied into register_G2_sprs and the common function was renamed to apply only to the 755.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-9-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|