Re: [kvm-unit-tests v3 04/13] powerpc: Abstract H_CEDE calls into a sleep functions

Thomas Huth
2023-03-27T14:50:28Z

On 27/03/2023 14.45, Nicholas Piggin wrote:
> This consolidates several implementations, and it no longer leaves
> MSR[EE] enabled after the decrementer interrupt is handled, but
> rather disables it on return.
>
> The handler no longer allows a continuous ticking, but rather dec
> has to be re-armed and EE re-enabled (e.g., via H_CEDE hcall) each
> time.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> Since v2:
> - Comment about DEC interrupt firing [Thomas review]
>
> lib/powerpc/asm/handlers.h | 2 +-
> lib/powerpc/asm/ppc_asm.h | 1 +
> lib/powerpc/asm/processor.h | 7 ++++++
> lib/powerpc/handlers.c | 10 ++++-----
> lib/powerpc/processor.c | 43 +++++++++++++++++++++++++++++++++++++
> powerpc/sprs.c | 6 +-----
> powerpc/tm.c | 20 +----------------
> 7 files changed, 58 insertions(+), 31 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>